question

leaa avatar image
leaa asked

concatenate fields in openquery

i supposed to concatenate areacode and phone number field and have this inner joined with other table but it only gave me the phone data. I used open query syntax .. select areacode+phone from openquery (dbname,'select * from table where campain="x"')
openquery
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Grant Fritchey avatar image
Grant Fritchey answered
From the openquery you're showing, you're doing a SELECT *. If you're not getting areacode, that must be because it's not filled out in that table. If the column itself was missing, you'd get an error.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.