SQL Statements containing OR

litrelord

Well-known Member
Joined
Dec 1, 2002
Messages
519
Hi,

I was hoping for a second opinion on an IT issue we’re having.

I’m not sure if any of you use crystal reports but we use it quite a bit here but have been restricted to using templates set up by our IT department. To narrow down the data we use either the parameters that are set up on the report (which then get incorporated into the SQL statement that crystal reports sends to the SQL database) or by using filters in crystal reports (so the SQL command retrieves all of the data and then crystal reports weeds out the bits you want).

I’ve been asking for the report writers to include the ability to add multiple parameter values into the report so the SQL statement gets changed to field= “xxxx” OR “xxxx” instead of just field = “xxxx” but was told they wouldn’t do this as it was “bad practice”.

To me this sounds more like “we can’t be bothered”. Am I missing something or is using OR in a SQL statement not very efficient.

Hope someone can shed some light.

Nick
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Forum statistics

Threads
1,224,867
Messages
6,181,481
Members
453,046
Latest member
Excelvbaexpert

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top