VBdotnet2005
asked on
LINQ - using union
I have the following Transact SQL query using a union. I need some samples as to how this would look in LINQ.
internaltional_zip does not have id.
SELECT transnoid, zip from domestic_zip
UNION
SELECT '' as transnoid, zip from internaltional_zip
internaltional_zip does not have id.
SELECT transnoid, zip from domestic_zip
UNION
SELECT '' as transnoid, zip from internaltional_zip
ASKER
Hi Fernando,
I changed my question a few minutes ago.
I changed my question a few minutes ago.
ASKER
I would like to know on how to do the following in LINQ instead.
SELECT transnoid, zip from domestic_zip
UNION
SELECT '' as transnoid, zip from internaltional_zip
SELECT transnoid, zip from domestic_zip
UNION
SELECT '' as transnoid, zip from internaltional_zip
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Did you also change the topic areas?
ASKER
My problem is there is no transnoid in internaltional_zip .
ASKER
What would you suggest to do?
To your statements, "My problem is there is no transnoid in internaltional_zip ." and "What would you suggest to do?", well I can only go by what you stated and in your SQL statement, you state that you have two columns in both tables you want to return, one being transnoid and the other being zip. If you are stating that you do not have transnoid how can I suggest something if I do not know what is available or what your requirements are.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
@Lokesh B R;
The authors resent statement is that transonic is not a member of the table.
The authors resent statement is that transonic is not a member of the table.
ASKER
thank you
Was your question answered?
Have you tried something like this?
Open in new window