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.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 How to loop the range of date to display day

Author  Topic 

micnie_2020
Posting Yak Master

232 Posts

Posted - 2012-06-25 : 03:55:25
Hi All,

I have

From Date: 2012-06-12 16:00:00.000 (Tue, PM)
To Date: 2012-06-14 23:00:00.000 (Thu, PM)

Event: Testing only

How can i loop the event using sql to display

Tue Wed Thu
AM PM AM PM AM PM

-----Testing-----------------

Please advise.

Thank you.

Regards,
Micheale

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-06-25 : 04:55:36
the number of column is it fixed ?


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

micnie_2020
Posting Yak Master

232 Posts

Posted - 2012-06-25 : 05:33:18
Hi,

Yes. Mon to Friday. Each Day having Am & Pm.

Thank you.

Regards,
Micheale
Go to Top of Page

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2012-06-25 : 12:38:15
Given your sample data, what do you want for output?

http://www.sqlservercentral.com/articles/Best+Practices/61537/
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Go to Top of Page
   

- Advertisement -