Variable
From: Justin Drennan (justin_at_nospam.com)
Date: 10/01/04
- Next message: Peter The Spate: "access and excel pivot tables"
- Previous message: Pedrito Portugal: "Re: Big question - Average of my account per month."
- Next in thread: Jacco Schalkwijk: "Re: Variable"
- Reply: Jacco Schalkwijk: "Re: Variable"
- Reply: Jonathan Chong: "Re: Variable"
- Reply: Peter The Spate: "Variable"
- Reply: Roji. P. Thomas: "Re: Variable"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 1 Oct 2004 12:00:59 +0200
How would I use a variable to select a time period as shown below. The
example below returns error: Incorrect syntax near '@Timeperiod'
Am i missing something here?
Declare @Timeperiod as int
set @Timeperiod = 7
Select * from X
where (datediff(d, usdateopened, getdate() @Timeperiod) = 0)
thanks
- Next message: Peter The Spate: "access and excel pivot tables"
- Previous message: Pedrito Portugal: "Re: Big question - Average of my account per month."
- Next in thread: Jacco Schalkwijk: "Re: Variable"
- Reply: Jacco Schalkwijk: "Re: Variable"
- Reply: Jonathan Chong: "Re: Variable"
- Reply: Peter The Spate: "Variable"
- Reply: Roji. P. Thomas: "Re: Variable"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|