Link to home
Start Free TrialLog in
Avatar of tmajor99
tmajor99

asked on

SQL Select - Inserting a new column into the result set

I need a SQL Select that will insert a new column with a static values into the result set.  I need a new column called "Attribute Name" with the value set to "SUBS_ID" inserted into the result set from the SQL below,

SELECT TABLE1.ID, TABLE2.Trilogie_SUBS_ID  
FROM TABLE1
INNER JOIN TABLE2
ON TABLE1.S_MASTER.PRODUCT = TABLE2.S_MASTER.PRODUCT

This what I want the result set to look like:
ID         Trilogie_SUBS_ID       Attribute Name
303           600                          SUBS_ID
ASKER CERTIFIED SOLUTION
Avatar of Brian Crowe
Brian Crowe
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SELECT TABLE1.ID, TABLE2.Trilogie_SUBS_ID, 'SUBS_ID' AS [Attribute Name]
...