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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Merging two columns 1

Status
Not open for further replies.

wdbouk

Technical User
May 28, 2003
81
CA
Hello ,

I am trying to merge two columns in the following way
(table's name=ISSUE,first column=issuer_cusip, second column=issue_cusip)
UPDATE ISSUE SET issuer_cusip = CONCAT (issuer_cusip,issue_cusip);

but i am receiving the following error message:
undefined function "CONCAT" in expression. Any hint of what went wrong or if possible how to do it?
 
does this work?: (disclaimer - run as a select first!!

SELECT issuer_cusip & issue_cusip from ISSUE and make sure you get the correct results)

then:

UPDATE ISSUE SET issuer_cusip = issuer_cusip & issue_cusip;

Leslie
 
A couple of extra thoughts ...

If you need a space between the two original data items, as you would (for example) if they were names, write:

UPDATE ISSUE SET issuer_cusip = issuer_cusip & ' ' & issue_cusip;

If this is a 'one off' job, it might be quicker / easier to write an update query, with the update formula written as:

[issuer_cusip] & [issue_cusip]

You can then look at the underlying SQL in SQL view, which may provide other useful ideas!


Bob Stubbs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top