Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

How to make calculated column with values based from result of substring search

$
0
0

Hi!

I've kind of painted myself into a corner. I have a table containing

SELECT [DepositID]
      ,[OrderTicket]
      ,[DepositTime]
      ,[OrderTypeNumber]
      ,[OrderProfit]
      ,[OrderComment]
      ,[DateKey]
  FROM [dbo].[Deposits]

I need a new calculated column named IsFee, and to automatically set that column to true if the word "Fee" is found anywhere in the OrderComment field, else false. OrderComment is of type varchar(27,null).

TIA!

Re

Dennis


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>