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 |
rolmau
Starting Member
10 Posts |
Posted - 2010-01-04 : 12:28:00
|
I have time dimensiontime_id number,monthyearI want to add today’s date to the Time dimensionThanks Guys |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-01-04 : 14:42:15
|
Is time_id an identity column?Is number the column to store the day?Do you mean this?insert table ([number],[month],[year])select datepart(dd,getdate()),datepart(month,getdate()),datepart(year,getdate()) No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
rolmau
Starting Member
10 Posts |
Posted - 2010-01-04 : 15:20:07
|
Yes Pleasetime_id PKmonth varchar2year varchar2;Now if I want ot add today's date in ?? |
|
|
rolmau
Starting Member
10 Posts |
Posted - 2010-01-04 : 15:20:38
|
using insert clause |
|
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2010-01-04 : 15:37:33
|
Fred just gave you the solution.... didn't he? quote: select datepart(dd,getdate()),datepart(month,getdate()),datepart(year,getdate())
Is this not what you want? |
|
|
rolmau
Starting Member
10 Posts |
Posted - 2010-01-04 : 16:06:27
|
thanks Fred |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-01-04 : 16:54:39
|
welcome No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
|
|
|
|
|