Original:
SELECT ID, (ID +  ' - ' + Name) AS IDName FROM Person 

Answer:
SELECT ID, (Convert(varchar,ID) +  ' - ' + Name) AS IDName FROM Person 






Quoting Eva Li <[EMAIL PROTECTED]>:

> Hello All,
>  
> I have a SQL stored procedure that reads data out. In the query,
> I have some thing like:
>  
>      SELECT ID, (ID +  ' - ' + Name) AS IDName FROM Person
>  
> Here, ID is integer and name is of type varchar. My question:
>  
>     How can I convert ID to string and make IDName as string in this query?
>  
> Can any one help me with this?
>  
> Thanks!
>  
> Eva
> 
> 
> [Non-text portions of this message have been removed]
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to