×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
I am trying to create an SQL stored procedure for a .net programmer that may
pass a list in one parameter.
It works if I only pass in 1 item part number. The .net programmer said he
had it working in sequel server and he could pass item1,item2,etc.
Here is what he gave me from the sequel server:
CREATE PROCEDURE some_name
@productNumberString VARCHAR(750)='''000000'''
AS
DECLARE @select VARCHAR(150)
DECLARE @where VARCHAR(800)
SET @select = 'SELECT
imdsc,impn,pscmrn,imlots,psqtyn,cost1,cost2,cost3,cost4,cost5,cost6,cost7
FROM PNOTEBOOK.NBKSUM WHERE impn NOT IN '
SET @where = '(' + @productNumberString + ')'
EXEC(@select+@where)
GO
This is what I created. I can't figure out how to pass this as one string
for a DB2 stored proc.
CREATE PROCEDURE GetItemNot
(in NotInclude varchar(800))
RESULT SETS 1
LANGUAGE SQL
BEGIN
DECLARE c1 CURSOR FOR SELECT
imdsc,impn,pscmrn,imlots,psqtyn,cost1,cost2,cost3,cost4,cost5,cost6,
cost7
FROM PNOTEBOOK/NBKSUM
WHERE impn NOT IN (NotInclude);
OPEN c1;
SET RESULT SETS CURSOR c1;
END
Thank you,
Craig
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.