Expression Builder

luke.bourke

New member
Local time
Today, 11:37
Joined
Apr 22, 2011
Messages
3
Hi, I would like to know how to take the first character from one field as the character to show for a new field that has a text string and then the second and third characters of that same one field as the two characters to show in the new field's text string.

For example, if I have a field named Player that has something like A03456565656 for the values and I want to make a new field called Tag that reads for its values: First Authorization: A Second Authorization: 03. How would I build the expression in expression builder or manually in the query field name so that it returns that result?
 
Check out the Left() and Mid() functions in help. You can concatenate them and literal text together in your query:

NewField: "Some text " & Left(...) & " some more text"
 
Yes, I know that there are many different functions like Left and Mid, but I don't know how to make the text inside the values for the new field. My example that I am trying to demonstrate is most likely going to need to use those types of functions and I know how to use the Left function. My confusion is the Authorization 1 and Authorization 2 text that needs to go as the value in the new field.

Example:

ID
123

Player No.
A239008833354545089

Tag
Authorization 1: A Authorization 23



So here the first letter from Player No. is taken for Authorization 1 and the next two numbers are taken for Authorization 2. I don't know how to add those Authorization 1 and Authorization 2 into the value of the new column?
 
I thought I showed that with this (a new field in query design view):

NewField: "Some text " & Left(...) & " some more text"

Is this clearer?

NewField: "Authorization 1: " & Left(...) & " Authorization " & Mid(...)
 
Yes it worked,

Thankyou very much. It seems like you know expressions well. I am just getting into it and hope that it will benefit me in my job. Do you recommend any learning sites/books/etc.?

Thankyou Respectfully,
Luke Bourke
 

Users who are viewing this thread

Back
Top Bottom