Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using list parameter in Transact SQL
Message
De
20/04/2000 14:58:52
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Using list parameter in Transact SQL
Divers
Thread ID:
00362003
Message ID:
00362003
Vues:
48
This stored procedure is intended to return a list of publishers matching two criterion. First, is the publisher "active or inactive"? Second, to which subgroup does the publisher belong? Multiple subgroups may be selected. As a result we might want to find all active publishers belonging to group(s) "A" and "B". The procedure runs without error, but returns only publishers from the first group selected.

Any suggestions for modification would be greatly appreciated.

CREATE Procedure usp_VORPublishers
/* Param List */

@cActive char(1) = "A",
@cCategory char(10)= "A,B"

AS

SELECT
vor_publisher_abc_list.Ctrl_Pubn,
partname.pubname,
vor_publisher_abc_list.stat_cd,
vor_publisher_abc_list.list_cd
FROM
vor_publisher_abc_list
LEFT OUTER JOIN
partname
ON vor_publisher_abc_list.Ctrl_Pubn = partname.ctrl_pubn
WHERE
vor_publisher_abc_list.Stat_cd = @cActive
AND
vor_publisher_abc_list.List_cd IN (@cCategory)
ORDER BY partname.pubname


Regards,

Jason
Jason Tryon
Senior Systems Analyst / Technical Lead
eBusiness / iPage
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform