Information générale
Titre:
Selecting records based on cursor values
Hi folks,
I need a better way of selecting records from SQL Server based upon data I have in a cursor.
I am currently building an SPT which is created by looping thru my cursor and building an WHERE IN(....). However there are situations where this string could (and does) get too long.
The only thing I can think of is to have a table in SQL server which say has a user pk and code fields. I populate these from info based in my cursor and can then execute an SPT using this table.
I'd be grateful if someone could let me know if this is ok or if there is a better way ...
Regards
Kal
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement