Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Null Parameter
Hi,
I have been looking everywhere for an answer to my problem but non that I can find seem to be working. I am pulling a database from a hiring software using MS query. It has a list of different items we hire out, which I have narrowed down using a parameter on the category field. I now want to narrow it further using the name, which is fine however I need it to still give all the results of the category if the parameter is left blank. All the answers I have seen for the same problem and I dont totally understand SQL so would ideally like to get the desired results using the criterea. Although any answer would be usefull! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Null Parameter
On 19/07/2012 2:11 AM, gtait1 wrote:
Hi, I have been looking everywhere for an answer to my problem but non that I can find seem to be working. I am pulling a database from a hiring software using MS query. It has a list of different items we hire out, which I have narrowed down using a parameter on the category field. I now want to narrow it further using the name, which is fine however I need it to still give all the results of the category if the parameter is left blank. All the answers I have seen for the same problem and I dont totally understand SQL so would ideally like to get the desired results using the criterea. Although any answer would be usefull! Hi Just to clarify, this is an Excel NG... That said, if you are importing data from a database into a workbook then maybe you can share with us what code(s) you are currently using so we can get a better picture... Cheers Mick. |
#3
|
|||
|
|||
Quote:
What is an Excel NG? Also I am not sure what codes would be helpful to see this is the sql statemet if this helps; SELECT resource_0.resourceID, resource_0.generic, resource_0.productcode, resource_0.department, resource_0.category, resource_0.subcategory1, resource_0.name, resource_0.description, resource_0.nominalcode, resource_0.serialnumber, resource_0.barcode, resource_0.purchaseprice, resource_0.purchasedate, resource_0.purchaseauthorisationnumber, resource_0.notes, resource_0.jobID What I was really wanting was just a statement to put in the criterea of a query so that when a parameter field is left empty it shows all the results instead of limiting it to what you have but in the field. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Failed to save table attributes of (null) into (null). | Excel Discussion (Misc queries) | |||
How to choose if I use a parameter or not in a parameter query | Excel Discussion (Misc queries) | |||
COUNTIF says Null = Blank but Blank < Null | Excel Worksheet Functions | |||
Null, "null", vbNull, vbNullString, vbEmpty | Excel Programming | |||
How to write parameter query with "or is null" criteria | New Users to Excel |