Here's my situation, I have a database of stock trades that I need to separate into two lists. one containing trades in stocks that have 4 letters in thier symbols, and the other which has any trades in symbols that have 1,2,or 3 symbols.
I cant seem to figure this one out, can anyone offer any help?Can you give an example of what is stored in your database and what you want the output to be ?|||select * from trade_table where datalength(cast(stock_symbol as varchar(4))) = 4
select * from trade_table where datalength(cast(stock_symbol as varchar(4))) < 4|||thanks, that looks to be exactly what I needed.
-Chamber
No comments:
Post a Comment