Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sql command parameter with multivalues 1

Status
Not open for further replies.

muffntuf

MIS
Jan 7, 2003
155
US
hi,

I am trying to get a command object to accept multiple values. Does anyone know how to do this. I suspect I am looking at an array. For example if I wanted a user to be able to enter a number of accountid's, how could I pass them to the command object?

Crystal XI is the CR and AS/400 the database.

Thanks,
muffntuf
 
In the command, you would use:

{table.field} in {?stringparam}

Then in the parameter options selection screen, you would enter a string like this, including the parens:

("FedEx","UPS","Purolator")

I think TurkBear originally suggested this as an approach.

-LB
 
Hi,
Yes I did, but that particular syntax may be Oracle specific .. Use the syntax for your database ( Most have some form of the IN statement)



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
If you move the Command Object out to the database by creating a View, you'll see the equivalent performance, with the added benfit of using standard Crystal Parameter screens (so you can have multiple discrete values), and have a reusable data source across other tools, plus simplified maintenance.

-k
 
Thank you synapsevampire for the advice, have already talked till blue in the face to try to get a view on the server, but dba just doesn't want to maintain it. You know the story...
 
And to correct my example, I think only single quotes should be used:

('FedEx','UPS','Purolator')

-LB


 
Yeah, I know the story, you need to find a real dba who is interested in the bottom line ;)

Views require so little maintenance and space that your dba is basically demanding to be replaced.

Everyone must now use a kludgy approach to parameter passing because the dba says so, in the real world requirements drive IT, not vice versa.

dba's are notorious for being arrogant, suspiciously more often when they're incompetent.

Approach management.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top