Reply to Re: comma separated values to stored procedures

Your name:

Reply:


Posted by Madhivanan on 07/05/06 13:27

Where ','+@iClientid+',' like '%,+cast(iClientid as varchar(20))+',%'

Madhivanan


Dan Guzman wrote:
> See Erland's article on the subject:
> http://www.sommarskog.se/arrays-in-sql.html
>
> --
> Hope this helps.
>
> Dan Guzman
> SQL Server MVP
>
> "shark" <xavier.sharon@gmail.com> wrote in message
> news:1152022816.209445.326230@p79g2000cwp.googlegroups.com...
> > Hi All,
> >
> > i hv created a sp as
> >
> >
> > Create proc P @iClientid varchar (100)
> > as
> > Begin
> > select * from clients where CONVERT(VACHAR(100),iClientid) in(
> > @iclientid)
> > end
> >
> > where iclientid = int data type in the clients table.
> > now if i pass @iclientid as @iclientid = '49,12,112'
> >
> > but this statement throws an conversion error ( int to char error).
> >
> > is there any way to fetch records from a select statement using a
> > string???
> >
> > Thanks in Advance.
> >

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация