MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » September 2013

have View need Stored Proc



fixed

I did finally get that view to work. What I would like to do, and I am not
sure how,
is to make a stored procedure so that this view will accept dates from and
to params on the column IDDOCD. Then, if I am correct, the reporting tool
can accept this stored procedure via dates entered by the user. I have not
done SP in IBM i, so so far am bombing out. is there any one can set me on
the right path here?



CREATE VIEW astccdta.acsusage
AS (
SELECT
IARCC9, IDDOCD, IDCOM#, ADSFX#, IDPRT#, IDGRC#, IDENT#,
IDSFX#, IDPRLC, IDNTU$, IDSHP#, ASTDTA.ADRESSAD.ADFNM,
ASTDTA.ADRESSAD.ADLNM,
ASTTRN.OEINHDIH.IHVIAC, ASTDTA.ADRESSAD.ADSTTC, IDINV#
FROM ASTDTA.OEINDLID INNER JOIN ASTDTA.ICPRTMIA
ON ASTDTA.OEINDLID.IDPRT# = ASTDTA.ICPRTMIA.IAPRT#
INNER JOIN ASTTRN.OEINHDIH ON ASTDTA.OEINDLID.IDIDC#=ASTTRN.OEINHDIH.IHIDC#
INNER JOIN ASTDTA.ADRESSAD ON ASTDTA.ADRESSAD.ADENT#=ASTTRN.OEINHDIH.IHENT#
WHERE ASTDTA.ICPRTMIA.IARCC9='ACS'
AND ASTDTA.OEINDLID.IDCOM#='001' AND ASTDTA.OEINDLID.IDPRT# LIKE 'ACS%')
)





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact