troubleshooting Question

SQL Select - Inserting a new column into the result set

Avatar of tmajor99
tmajor99 asked on
Microsoft SQL Server
2 Comments1 Solution89 ViewsLast Modified:
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
Brian Crowe
Database Engineer
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros