Viewing 15 posts - 46 through 60 (of 69 total)
Try this:
SELECT
A.Account,
A.Symbol,
A.PandL,
Min(A.Timee),
CASE
WHEN Min(A.Timee) BETWEEN '00:00:01' AND '09:30:00' THEN 'BeforeMktOpen'
WHEN Min(A.timee) BETWEEN '09:30:00' AND '10:00:00' THEN 'FirstHalfHour'
WHEN Min(A.timee) BETWEEN '10:00:00' AND '15:30:00' THEN 'Day'
WHEN Min(A.timee) BETWEEN '15:30:00' AND '16:00:00' THEN 'LastHalfHour'
ELSE...
March 11, 2012 at 8:42 pm
Thank you Howard!
You are correct, I was looking for the same output you query provided.
February 24, 2012 at 8:42 pm
Hi Jeff,
I am using it to populate list of values for my report. And it is not going to change in the future (As per User), So I took Sean's...
February 5, 2012 at 2:35 pm
Thank you Sean!
I have tried something like this:
select program, pstatus, form from
(select * ,
ROW_NUMBER() over (partition by program order by len(form)) as RowNum
from #pt
group by program, pstatus, form) x...
February 2, 2012 at 2:07 pm
Thank you all for your comments, All very helpful articles and book for a newbie.
December 31, 2011 at 6:01 am
This is not an exercise Celko, I am a SQL newbie. Thank you for the comment and suggesting the book.
December 31, 2011 at 5:56 am
Viewing 15 posts - 46 through 60 (of 69 total)