sql - Casting Errors Invalid Syntax -
sql - Casting Errors Invalid Syntax -
okay, think adding cast statement easy. however, after researching not sure why code below doesn't work.
error message: info loss might occur when casting nvarchar(100) varchar(100). the code working with:
exec dbo.update @customerid, @vehicleid, @rownumber output;
what have tried:
exec dbo.update @customerid, cast(@vehicleid varchar(100)), @rownumber output;
also tried:
exec dbo.update @customerid, cast((@vehicleid) varchar(100)), @rownumber output;
i did little more research , found solution:
declare @tempvehicleid varchar(100); select @tempvehicleid = cast(@vehicleid varchar(100)) exec dbo.update @customerid, @tempvehicleid, @rownumber output;
sql sql-server
Comments
Post a Comment