|
|
|
This code accepts a comma delimited list if values, such as accountnumvers and created a temporary table of them. That table, then is useful in IN clauses of WHERE clauses in sql statenments. The list of passed in values MUST be comma delimited, AND MUST end with a trailing comma: CREATE PROCEDURE up_passlist( @strTarget varchar(50)) Though I’ve made this a stored procedure for demonstration sake, it is more properly Then you can use this table in a join or in an IN clause to select the desired records from another object table later in the sproc. The input parameter is a concatenated list of integers, separated by commas, and ending in a trailing comma. SELECT @CurrentTarget = 0, WHILE (@NextTarget> 0) select * from @tempTable Resources • The Guru's Guide to SQL Server Stored Procedures, XML, and HTML This resource discusses aboutSql Server and Stored Procedures. • Information: Stored Procedure Programming This resource is useful in understanding programming stored Procedures in SQL ServerMetro NY / NJ SQL Server ConsultantsWe specialize is custom database software. Call us for a free consultation (973) 635 0080
Computer Consultants: Database Development
|