Copyright © 2008-2019 Paula DiTallo

Tag Cloud

August 2009 Entries

How do I convert an integer to a string in SQL Server?

If you want to reformat data, use the function convert as shown:

select convert(varchar, cast(18 as integer)) as 'a number'

SQL Server: Why do I get "multi-part identifier could not be bound" ?

Let's say you've developed a stored procedure that assigns a count value to a variable which looks like this: SELECT @HasDefaultShipTo = count(*) FROM StakeHolderLoc_Assoc WHERE assoc.StakeHldrID = @StkhldrID When you execute to compile you will see the error: Msg 4104, Level 16, State 1, Procedure MetroDevETL_1, Line 80 The multi-part identifier "assoc.StakeHldrID" could not be bound. The reason this error appears is because you have forgotten to associate/bind the table to "assoc". The corrected ......