I have found a solution to the *ALL issue mentioned below:
Set up 2 parameters for each case & make one of them hidden.
Set the hidden parameter = the value for the other parameter.
Then, the following statement works for me:
SELECT PRDCATEGORY FROM QGPL.ITEMMASTER
WHERE (? = '*ALL' or PRDCATEGORY = ?)
Some other thing I picked up today from your link, the LTRIM(expression)
command will take care of situation where leading spaces exist in a
field that normally shouldn't have leading spaces. We have a vendor
field with leading spaces.
Thanks.
James Salter
Systems Programmer
American Cast Iron Pipe Company
phone (205) 325-3033
fax (205) 307-3833
-----Original Message-----
From: Salter, James
Sent: Friday, April 03, 2009 12:18 PM
To: 'midrange-l@xxxxxxxxxxxx'
Subject: RE: ODBC Parameter Passing for Reporting
Thanks for the link. This should get me going.
In regards to the Multi-Value, I am talking about RS's Multi-Value
option on the parameter. The *ALL does not work. I may can fiddle with
this to get what I need.
James Salter
Systems Programmer
American Cast Iron Pipe Company
phone (205) 325-3033
fax (205) 307-3833
from: "Elvis Budimlic" <ebudimlic@xxxxxxxxxxxxxxxxxxxxxxxxx>
subject: RE: ODBC Parameter Passing for Reporting Services
... Multi-Value option for parameters. ...
You mean like - select ... from ... where item IN (?,?,?,?,?)
... Microsoft really doesn't support ODBC as well as they should
You can use IBM's Client Access ODBC driver, or OLE DB drivers or .NET
driver
... tricks for converting the DateTime parameter to MMDDYY
DateTime maps quite nicely to a TimeStamp data type. If using
Microsoft's
TSQL syntax, I've seen them use the Convert built-in for conversions. If
you're using IBM i syntax, then there are a number of IBM built-ins for
extracting values out of a timestamp field (YEAR,MONTH,DAY), but I think
the
EXTRACT might work best for you. See this link:
http://publib.boulder.ibm.com/infocenter/systems/scope/i5os/topic/db2/rb
afzs
caextract.htm
Hth, Elvis
Celebrating 11-Years of SQL Performance Excellence on IBM i, i5/OS and
OS/400
www.centerfieldtechnology.com
-----Original Message-----
Subject: ODBC Parameter Passing for Reporting Services
I am running into some problems trying to create parameters for
Reporting Services.
My SQL statement looks something like this - select ... from .... where
item = ?
This does create a Parameter called Parameter1, however how do you code
it to get all possible values for all items?
I can use the "LIKE %" syntax, however this does not really give me the
chance to enter and retrieve an exact value.
Does anyone else have any knowledge on this? The help text really
doesn't provide any information?
It does not appear to support the Multi-Value option for parameters.
Is there a function snippet that you use in your reports?
Not surprisingly, Microsoft really doesn't support ODBC as well as they
should.
Also, if you have any tricks for converting the DateTime parameter to
MMDDYY or CCYYMMDD formats, feel free to include these as well.
_________Confidentiality Notice_______________________
This e-mail and any files transmitted with it is
confidential and is intended solely for the use of
the individual(s) or entity(ies) to whom this e-mail
is addressed. If you are not the intended recipient
or the person responsible for delivering the e-mail
to the intended recipient, be advised that you have
received this e-mail in error, and that any use,
disclosure, dissemination, forwarding, printing,
retention or copying of this e-mail is strictly
prohibited. If you have received this e-mail in
error, please immediately return this e-mail to
the sender and delete the e-mail from your system.
Thank you.
As an Amazon Associate we earn from qualifying purchases.