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 |
pstarr3
Starting Member
2 Posts |
Posted - 2010-08-12 : 16:59:14
|
why am i getting this errorDECLARE @InputDate nvarchar(15)SET @InputDate = LEFT(CONVERT(varchar, GETDATE(), 121), 10) |
|
mfemenel
Professor Frink
1421 Posts |
Posted - 2010-08-12 : 17:05:43
|
That's odd. I just tried it and didn't get an error:DECLARE @InputDate nvarchar(15)SET @InputDate = LEFT(CONVERT(varchar, GETDATE(), 121), 10)SELECT @InputDateResult: 2010-08-12Mike"oh, that monkey is going to pay" |
 |
|
pstarr3
Starting Member
2 Posts |
Posted - 2010-08-12 : 17:20:07
|
here is the full spDECLARE @ReportType bitDECLARE @RC intDECLARE @InputDate nvarchar(15)SET @InputDate = LEFT(CONVERT(varchar, GETDATE(), 121), 10)-- Copy the records for the Input Date into the temporary tableEXEC @RC = dbo.BuildTempLogTable @InputDateIF @RC = 0BEGIN -- Collect Vendor Totals SET @ReportType = 0 EXEC dbo.Deduction @ReportType EXEC dbo.Indexed @ReportType EXEC dbo.NoDeduction @ReportType EXEC dbo.Researched @ReportType EXEC dbo.Reviewed @ReportType EXEC dbo.TotalDeduction @ReportType EXEC dbo.Voided @ReportType EXEC dbo.Worked @ReportType -- Collect User Totals SET @ReportType = 1 EXEC dbo.Deduction @ReportType EXEC dbo.Indexed @ReportType EXEC dbo.NoDeduction @ReportType EXEC dbo.Researched @ReportType EXEC dbo.Reviewed @ReportType EXEC dbo.TotalDeduction @ReportType EXEC dbo.Voided @ReportType EXEC dbo.Worked @ReportTypeEND |
 |
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2010-08-12 : 18:24:55
|
The error is in one of stored procedures you a calling or at least not in the date conversion. |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-08-13 : 10:45:08
|
quote: Originally posted by pstarr3 why am i getting this errorDECLARE @InputDate nvarchar(15)SET @InputDate = LEFT(CONVERT(varchar, GETDATE(), 121), 10)
What is the error?MadhivananFailing to plan is Planning to fail |
 |
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2010-08-13 : 11:46:16
|
quote: Originally posted by madhivanan
quote: Originally posted by pstarr3 why am i getting this errorDECLARE @InputDate nvarchar(15)SET @InputDate = LEFT(CONVERT(varchar, GETDATE(), 121), 10)
What is the error?MadhivananFailing to plan is Planning to fail
Assuming the title is correct: Error converting data type varchar to numeric. |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-08-17 : 02:17:31
|
quote: Originally posted by Lamprey
quote: Originally posted by madhivanan
quote: Originally posted by pstarr3 why am i getting this errorDECLARE @InputDate nvarchar(15)SET @InputDate = LEFT(CONVERT(varchar, GETDATE(), 121), 10)
What is the error?MadhivananFailing to plan is Planning to fail
Assuming the title is correct: Error converting data type varchar to numeric.
Thanks. I forgot to note thatMadhivananFailing to plan is Planning to fail |
 |
|
Kristen
Test
22859 Posts |
Posted - 2010-08-17 : 04:42:00
|
What parameter type / format does BuildTempLogTable need for @InputDate? |
 |
|
|
|
|
|
|