Click to See Complete Forum and Search --> : SELECT statement


gecastill
01-27-2006, 01:39 PM
I am trying to assign a field value [say column_B] from another table [say table_B] to a column name [say column_A] that is part of the query result set of table_A.



See example below.



SELECT A.Product, A.Customer, A.Vendor, ProductManager = (SELECT B.user_desc FROM TABLE B WHERE user_name = 'gecastill'), A.LaunchDate FROM TABLE A



How can I do that? I used to know how to do that but I have not done it in a year.



Please advise, thanks

chazzy
01-27-2006, 02:05 PM
I think you want this:


SELECT A.Product, A.Customer, A.Vendor, (SELECT B.user_desc FROM TABLE B WHERE user_name = 'gecastill') ProductManager, A.LaunchDate FROM TABLE A

but I'm not too sure what you're asking to be honest.

gecastill
01-27-2006, 03:02 PM
chazzy,

Thank you for your time.