Friday, February 24, 2012

arrays

Thanks! I am aware that you can't pass an array to an sp. i was aware of tha
t
even when i asked that question. I simply did so, because I needed to prove
this to somebody.
"louise raisbeck" wrote:
> this post was a few days ago so no idea if you will all read this but just
> read this post as need to do a similar thing. this is an open forum to hel
p
> sql developers around the world and Joe your attitude was quite frankly ru
de
> and unnecessary and felt you needn't have bothered with the energy involve
d
> in replying.
> I am also writing a stored procedure and have to put an array of values in
to
> a stored procedure (from an asp.net drop down list). I may be wrong but I
> think that Preeta may have been asking how BEST to handle an array of valu
es,
> not how to declare an array in a stored procedure, which of course you can
t
> do. Preeta I have found that the best way to do this really is to pass a C
SV
> (comma delimited) list of values into a variable of nvarchar then split ou
t
> the values in the stored procedure.
> Or you could do what Joe suggested and go learn how to think and write
> proper sql code and dont ask a question until you do just that!!!!
> regards,
> "Joe Celko" wrote:
>you can't directly pass arrays, at least not in SQL Server.
However, there are some techniques that you can use, see:
http://www.sommarskog.se/arrays-in-sql.html

No comments:

Post a Comment