Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Union Concatenation Question

Status
Not open for further replies.

jrshaw03

Technical User
Jan 14, 2005
18
US
I have a large Union query, where I am joining many fields together so they display as follows.

Header
Entry 1
Entry 2

Header
Entry 1
Entry 2
Entry 3

My problem is that each entry is limited to 255 chars even though it is based on a memo field. To get around this I have tried to use this:

ProgMgt2OPN: Mid([Program Management_OPN],256,255)

and scan to the next 255 chars. This works but I need a way to concatenate the next 255 chars onto the first 255 in SQL.
The method below puts the second 255 chars under a new heading which I do not want. If I insert ...[Program Management_OPN], [ProgMgt2OPN] FROM ... An error about the columns not being equal comes up.

UNION Select "c (1) Program Management", [Program Management_OPN] FROM [Mk 53 01Jan Source]

UNION Select "c (1) Program Management1 ", [ProgMgt2] FROM [Mk 53 01Jan Source]

Please help.

Thanks,
Jimmy
 


Concatenate on a select is done as follows.

Code:
'Example

Name: [FirstName] & [LastName]

The result will be a column called name. Try using Mid function to the left of the &.

 
When I do this, I am put over the 255 char threshold thus the concatenated part is not concatenated.

Jimmy
 


You can not exceed the 255 limit. You will have to concatenate the results back into a memo field.

Sorry...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top