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.
Author |
Topic |
masond
Constraint Violating Yak Guru
447 Posts |
Posted - 2013-10-24 : 10:48:36
|
Hi guys I hope your well Aim- for every row ID i need a cost of £4.85 associated .This is such a basic question i am asking, but my mind has gone blank :( My table is SELECT [ID] ,[CreatedDate] ,[External_MID] ,[MID_Internal_Merchant_ID] ,[Origin] ,[Reason] ,[Case_Detail] ,[Case_Sub_detail] FROM [FDMS].[Dan].[Stg_Clientline_Case] |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2013-10-24 : 11:05:24
|
quote: Originally posted by masond Hi guys I hope your well Aim- for every row ID i need a cost of £4.85 associated .This is such a basic question i am asking, but my mind has gone blank :( My table is SELECT [ID] ,[CreatedDate] ,[External_MID] ,[MID_Internal_Merchant_ID] ,[Origin] ,[Reason] ,[Case_Detail] ,[Case_Sub_detail] FROM [FDMS].[Dan].[Stg_Clientline_Case]
I am afraid I didn't follow the question. Do you want to get another column that shows the cost = £4.85 in your select result set? Or do you want to update a table with that amount? Or something else? |
 |
|
masond
Constraint Violating Yak Guru
447 Posts |
Posted - 2013-10-24 : 11:07:46
|
HI JamesI want to produce another column which states 4.85 for every ID |
 |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2013-10-24 : 11:18:33
|
Is it a fixed amount of 4.85 always? If it is, would the following be sufficient?SELECT [ID],[CreatedDate],[External_MID],[MID_Internal_Merchant_ID],[Origin],[Reason],[Case_Detail],[Case_Sub_detail],4.85 AS [Cost]FROM [FDMS].[Dan].[Stg_Clientline_Case] |
 |
|
masond
Constraint Violating Yak Guru
447 Posts |
Posted - 2013-10-24 : 11:21:27
|
HOw simple lol Thank you james :P |
 |
|
|
|
|
|
|