>I'm trying to pull two columns with some space between:
>
>
>
> SELECT PartId,
> PartInfo = PartNo + RIGHT(REPLICATE(' '), 20) + Description
> FROM Parts
> ORDER BY PartInfo
>
>
>I'm getting 'Incorrect syntax near the keyword 'FROM'.'
>
>I got this example from
http://www.sqlusa.com/bestpractices2005/padleadingzeros/You're missing ) after replicate. See correction inline.
If it's not broken, fix it until it is.
My Blog