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 |
|
jamie
Aged Yak Warrior
542 Posts |
Posted - 2004-03-17 : 06:04:10
|
| hello,I am tryin to write a sql script and have stumbled on some problems.:how can I do something like this :declare@date datetime@date = '2003-01-01 00:00:00'select * from table where datein > @date?thanks for any info,Jamie |
|
|
Frank Kalis
Constraint Violating Yak Guru
413 Posts |
Posted - 2004-03-17 : 06:08:37
|
| Is this a typo?set @date = '2003-01-01 00:00:00'--Frankhttp://www.insidesql.de |
 |
|
|
smousumi
Starting Member
19 Posts |
Posted - 2004-03-17 : 07:07:56
|
| Try like this....declare @date datetimeset @date = '2003-01-01 00:00:00'select * from table where datein > @datemousumi |
 |
|
|
jamie
Aged Yak Warrior
542 Posts |
Posted - 2004-03-17 : 08:28:34
|
| nice one, forgot the word SET !!thank you. |
 |
|
|
|
|
|