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.
Author |
Topic |
Kalaiselvan
Posting Yak Master
112 Posts |
Posted - 2013-01-23 : 10:01:59
|
Hi, Need a Table with single column From the following Input.Start Date = 01 Jan 2011End Date = 01 Dec 2012TABLE FOR PERIOD=MONTHLY[PERIOD]JAN 2011FEB 2011MAR 2011APR 2011MAY 2011JUN 2011JUL 2011AUG 2011SEP 2011OCT 2011NOV 2011DEC 2011JAN 2012FEB 2012MAR 2012APR 2012MAY 2012JUN 2012JUL 2012AUG 2012SEP 2012OCT 2012NOV 2012DEC 2012TABLE FROM PERIOD=QUARTER[PERIOD]JAN 2011APR 2011JUL 2011OCT 2011JAN 2012APR 2012JUL 2012OCT 2012TABLE FROM PERIOD=HALF[PERIOD]JAN 2011JUL 2011JAN 2012JUL 2012TABLE FROM PERIOD=YEARLY[PERIOD]JAN 2011JAN 2012Depends on Period Chosen Need to Built the Single Column table. Help me to fix this Functionality.Regards,Kalai |
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2013-01-23 : 10:17:03
|
You should have a calendar table of dates (F_TABLE_DATE by Michael Valentine Jones, which can be found in the scripts forum here, is very useful), everything else you asked for can be derived from that table. Let the front-end do the formatting.JimEveryday I learn something that somebody else already knew |
|
|
|
|
|