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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WHERE clause use '=' instead of 'IN' ?

Status
Not open for further replies.

JRO061601

MIS
May 30, 2002
92
0
0
US
If I define a prompt on an attribute ID:DESC, and set the min/max number of elements to 1, can I make the engine generate SQL using WHERE X = Y instead of using WHERE X IN (Y)?

For that matter, if I create a static filter that only qualifies on one attribute element, can I force the use of '=' without having to qualify on just the ID?

Thanks.
 
I don't think so. Why do you need it? Most commercial RDBMSs will treat compile both the same way.
 
The DBA asked for it (Oracle 9i). I thought as much, but I really don't have the credentials to effectively argue it. But if it can't be done, then it can't be done. Thanks.

It is a little peculiar the engine uses "IN" for a single element, but "=" for a single ID though.
 
There's only one piece of proof needed: the execution plan. Have the DBA compare the plans for SQL with '=' vs. 'IN'.

In my experience, DBAs, esp. Oracle ones, have a propensity to blow any limitations that a reporting platform has out of proportion. Next thing you know, the DBA will be saying, "Microstrategy can't generate the SQL I need. The Oracle DW product is SO much better."

Then you just want to scream back, "The Oracle product BLOWS!"

Sorry, didn't take my meds this morning.
 
Ha. No worries. I've down roads like that before. I recently had to twist a DBA's arm to allow me to use a datetime column has a primary key and join on it, instead of a surrogate integer column.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top