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)
 Display list of years, months and days

Author  Topic 

collie
Constraint Violating Yak Guru

400 Posts

Posted - 2007-10-26 : 11:20:19
Hi,

I have 3 dropdownlists. The first one needs to be populated with years from 1990 till the present year. The seconde dropdown contains of months and lists all the months. The 3rd dropdown consists of days. if user selected a year in first dropdown and month Feb in second one than that means that the 3rd dropdown containing the list must only display days up to 29 assuming the year selected was a leap year. If user selects Oct than month must show numbers 1 to 31.
How can I write queries to do the above?
Thanks

Whisky-my beloved dog who died suddenly on the 29/06/06-I miss u so much.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-10-26 : 11:39:21
make use of MVJ's F_TALBE_DATE http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=61519&SearchTerms=F_TABLE_DATE


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

Go to Top of Page
   

- Advertisement -