Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Package Validation Error - Type of variable @[User::variable] is not a string Expand / Collapse
Author
Message
Posted Wednesday, November 24, 2010 10:21 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, October 04, 2011 3:03 AM
Points: 19, Visits: 82
Hi All,

Am getting the following error:
Package Validation Error - Type of variable @[User::variable] is not a string

I've 3 variables, var1 => select count(*) from table1,
var2 => select count(*) from table2, and in var3 am comparing these two
variables like => @[User::varCount] == @[User::varRowCount]

Now the problem is in var3, when i use this var3 in Execute SQL Task => made
the SQLSourceType as Variable and mapped the SourceVariable to var3, but in
var3 if i turn on EvaluateAsExpression to True means Variable's ValueType
coming to Boolean and Value to True, when use this var3 in Execute SQL Task
it throws Type of variable @[User::var3] is not string.
Post #1026322
Posted Thursday, November 25, 2010 3:52 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Today @ 6:30 AM
Points: 9,410, Visits: 6,495
SQLSourceType of the Execute SQL Task means that the SQL command can be found in a variable, so it is expecting a string.
To use your variable in an Execute SQL Task, you need to use the parameter mapping and the question mark placeholder in your T-SQL statement.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1026401
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse