Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Adding N/A Column

Author  Topic 

sql_monkey
Starting Member

19 Posts

Posted - 2013-05-24 : 06:18:36
Hello,

I am writng a claims report to run from an insurance database. The report layaout is provided by our insurers and there are two columns that are not relelevent to our busines and so there is no corresponding field on the datatbase. These two columns still need to be included but the value for every row would be N/A.

Is there a way I can still include these columns in my query and get Management Studio to enter N/A into every row?

Thanks
Steven

bandi
Master Smack Fu Yak Hacker

2242 Posts

Posted - 2013-05-24 : 06:54:34
SELECT columnList, 'N/A' AS IrrelevantCol1, , 'N/A' AS IrrelevantCol2
FROM TableName

--
Chandu
Go to Top of Page

sql_monkey
Starting Member

19 Posts

Posted - 2013-05-24 : 07:39:49
Thanks Chandu, that's what I needed.
Go to Top of Page

bandi
Master Smack Fu Yak Hacker

2242 Posts

Posted - 2013-05-24 : 07:41:17
quote:
Originally posted by sql_monkey

Thanks Chandu, that's what I needed.


Welcome

--
Chandu
Go to Top of Page
   

- Advertisement -