Re: Could anyone help how to convert the variables to appropriate data
From: Louis Davidson (dr_dontspamme_sql_at_hotmail.com)
Date: 11/15/04
- Next message: Louis Davidson: "Re: Looking for a professional SQL programmer for a small job"
- Previous message: Armando Prato: "Re: isNumeric validation"
- In reply to: SMV: "Could anyone help how to convert the variables to appropriate data"
- Next in thread: SMV: "Re: Could anyone help how to convert the variables to appropriate"
- Reply: SMV: "Re: Could anyone help how to convert the variables to appropriate"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 15 Nov 2004 13:09:01 -0600
Can you post the entire code before the SET statement? This is not really
enough to go on.
-- ---------------------------------------------------------------------------- Louis Davidson - drsql@hotmail.com SQL Server MVP Compass Technology Management - www.compass.net Pro SQL Server 2000 Database Design - http://www.apress.com/book/bookDisplay.html?bID=266 Note: Please reply to the newsgroups only unless you are interested in consulting services. All other replies may be ignored :) "SMV" <SMV@discussions.microsoft.com> wrote in message news:499091AD-C8BD-4F5E-82B8-7EE40CA91D99@microsoft.com... > Hi all, > In this following code, I am getting an error as > Syntax error converting the nvarchar value > @nvchrEventType > > Syntax error near @sintEventYear ,it is a bit datatype. > > Could anyone help how to convert the variables to appropriate datatypes in > the table. > > Begin > > declare @cysql2 nvarchar(4000) > set @cysql2 = N'INSERT INTO #cykeys (subteamid, eventid) > SELECT > fste.subteamid > ,fste.eventid > FROM dbo.dimsubteam AS dst > INNER JOIN #officefilters AS f ON > dst.officeid = f.officeid > INNER JOIN dbo.factsubteam_event AS > fste > ON dst.subteamid = fste.subteamid > INNER JOIN dbo.dimevent AS de ON > fste.eventid = de.eventid > INNER JOIN dbo.GetFilteredEventTypeList > ('+ @nvchrEventType +') AS et ON de.cwmswalkamericaevent = > et.cwmswalkamericaevent > WHERE dst.closed = 0 > AND dst.refused = 0 > AND de.eventyear = ' + @sintEventYear > + ' > AND de.walkamericaevent = 1' > > IF @nvchrStatus = N'B' or @nvchrStatus = N'' -- status is > 'Confirmed +pending' or Null > set @cysql2 = @cysql2 > IF @nvchrStatus = N'C' AND @nvchrDollarAmountType <>N'' -- > status is 'confirmed' > set @cysql2 = @cysql2+N' AND fste.' + @nvchrSql + ' = 1'
- Next message: Louis Davidson: "Re: Looking for a professional SQL programmer for a small job"
- Previous message: Armando Prato: "Re: isNumeric validation"
- In reply to: SMV: "Could anyone help how to convert the variables to appropriate data"
- Next in thread: SMV: "Re: Could anyone help how to convert the variables to appropriate"
- Reply: SMV: "Re: Could anyone help how to convert the variables to appropriate"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
Loading