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 2005 Forums
 Transact-SQL (2005)
 find sunday from calender

Author  Topic 

abcd
Yak Posting Veteran

92 Posts

Posted - 2009-03-03 : 05:26:00
hi all..
I have a calender function which displays calender in my module...
Now I have the requirement to display all the dates which are sunday.
i suppose i am able to amke my problem clear...
Help appreciated...

bklr
Master Smack Fu Yak Hacker

1693 Posts

Posted - 2009-03-03 : 05:30:03
select DATENAME(DW, getdate())
use
where datename(dw,datecolumnname) = 'sunday'
Go to Top of Page

abcd
Yak Posting Veteran

92 Posts

Posted - 2009-03-03 : 05:36:16
thnks a lot bklr for the help...
but i suppose i didnt explained my query well...
Its that i have to make entries in calender grid where dates in calender are sunday.
i have to make a separate table of dates which are sunday...
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-03-03 : 05:39:53
What is "Calendar Grid"?
Is this question related to SQL Server?



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

bklr
Master Smack Fu Yak Hacker

1693 Posts

Posted - 2009-03-03 : 05:41:09
try this too & check
where not exists ( select * from tablename(seperate table of dates for sunday) where datecolumn = t.datecolumn)

where datecolumn not in (select datecolumn from tablename(seperate table of dates for sunday))
Go to Top of Page

abcd
Yak Posting Veteran

92 Posts

Posted - 2009-03-03 : 05:45:13
thnks bklr will return after trying your suggestion..
Go to Top of Page

bklr
Master Smack Fu Yak Hacker

1693 Posts

Posted - 2009-03-03 : 05:48:16
quote:
Originally posted by abcd

thnks bklr will return after trying your suggestion..



welcome
Go to Top of Page
   

- Advertisement -