Viewing 11 posts - 1 through 11 (of 11 total)
Hi,
Use CASE expression within SELECT statement to get your desired result.
cheers
June 16, 2009 at 6:36 pm
Thanks Jeff. Really appreciate your help mate.
June 14, 2009 at 11:58 pm
Thanks Jeff.
How can I avoid a cross join for the following query?
SELECT a.Week, a.StartDate,
CASE WHEN purchasedate BETWEEN a.startdate AND a.nextdate THEN 'Yes' ELSE 'No' END...
June 11, 2009 at 10:22 pm
Thanks Hitendar n Jeff for your inputs.
I have modified my query to my needs:
SET DATEFIRST 1 --Monday to Sunday week
DECLARE @FirstDate DATETIME
/* For any year start add Jan 1 +...
June 11, 2009 at 6:57 pm
Jeff, I have a problem.
The query is working fine and listing all week numbers and dates.
However, I am interested in week day starting Mondays which is 05/01 for current year...
June 10, 2009 at 11:38 pm
I would display 0's to indicate there was no data during that particular week.
--Ta
June 9, 2009 at 9:33 pm
hi mate
thanks for ur response; appreciate it.
sorry if i wasnt clear, i need week numbers and week start dates for any given date range or a year. if it was...
June 9, 2009 at 7:26 pm
Viewing 11 posts - 1 through 11 (of 11 total)