How ton put give alias name inside a Query string.?
        Posted  
        
            by Vibin Jith
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Vibin Jith
        
        
        
        Published on 2010-04-16T07:41:09Z
        Indexed on 
            2010/04/16
            7:43 UTC
        
        
        Read the original article
        Hit count: 372
        
sql
Please look that alias name. I hope to set the value into a string var. How to put single coats inside a string which is in single coats.
   SET @SQLString = N'SELECT purDetQty as 'detQty',stkBatchCode as 'batchCode',purDetProductId as 'productId'
               INTO #ProductTable FROM PurchaseDetail 
               INNER JOIN Stock on stkId=purDetStockId 
               WHERE purDetID=@detId'
© Stack Overflow or respective owner