Viewing 15 posts - 331 through 345 (of 443 total)
Good point Elliot,
Just remove the parameters completely if you always set them in the proc anyway.
CREATE PROCEDURE yourProcNameHere
AS
BEGIN
DECLARE @EndDate DATETIME,
...
August 25, 2009 at 9:45 am
You can't pass a value to a stored proc like that.
You must do it like this:
DECLARE @start DATETIME, @end DATETIME
SELECT @start = dateadd(m,-1, dateadd(s,-1,dateadd(dd, datediff(d,0,getdate()),0)) ),
...
August 25, 2009 at 8:58 am
Haven't you already asked this here http://www.sqlservercentral.com/Forums/Topic775061-147-1.aspx?
August 25, 2009 at 8:22 am
Here you go, try this. You'll need a Tally table first (see here[/url]):
DECLARE @startDate datetime, @endDate DATETIME
SELECT @startDate = '20090101', -- First day in range
...
August 25, 2009 at 8:06 am
Ashka Modi (8/25/2009)
August 25, 2009 at 7:43 am
andymackk (8/23/2009)
The ID is actually an Autonumber
Do you mean it's an IDENTITY column? I.e each row in the table has a unique ID value.
If so you'll need a different...
August 24, 2009 at 8:39 am
pitso.maceke (8/24/2009)
Second problem: How do I shade the cell instead of the text?
With the Background property
August 24, 2009 at 2:18 am
Jeff Moden (8/14/2009)
Command lines are limited by the system to only 255 characters
Jeff,
Are you sure? Take a look at this.
Also the argument to xp_cmdshell is varchar(8000)!?
Nigel
August 14, 2009 at 9:57 am
Try this to get a set of the month end dates you are interested in, it might help you on your way.
August 14, 2009 at 4:16 am
Your function can be rewritten using this single statement, which is an adpatation of Gail's from the link in the previous post:
select dateadd(dd,-1,dateadd(mm, datediff(mm,0, getdate())+1,0))
The result has a time...
August 14, 2009 at 4:00 am
Question:
Why is your @cmd variable of type sysname? This has a max length of 256, which has the potential to get truncated if @ReqContent is too long. Try changing to...
August 14, 2009 at 2:59 am
gerald.drouin (8/13/2009)
August 13, 2009 at 7:42 am
Viewing 15 posts - 331 through 345 (of 443 total)