Solved

Excel Parameter Query from Cells with Null Values

Posted on 2013-06-03
3
372 Views
Last Modified: 2013-07-29
I have a stored procedure which accepts multiple parameters (three dates)

I use a parameter query in excel to call this via ODBC

Eg:
{CALL SP_Mystoredproc(?, ?, ?)}

This works great, I can input data in three cells and it returns the correct data.

My problem is, sometimes I wish to pass a NULL value, which I can do statically by:
{CALL SP_Mystoredproc(?, ?, NULL)}

How do i do this from an excel cell without using VB / Macros?

I've tried entering NULL into the cell, however, it just returns "invalid date" or something
0
Comment
Question by:DFPITC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 24

Expert Comment

by:Steve
ID: 39218218
Have you tried either:

1) Double quotes in the cell. [ "" ]
2) A single apostrophe [ ' ]
3) a tripple apostrophe [ ''' ]

One of these may do it.
0
 
LVL 24

Accepted Solution

by:
Steve earned 500 total points
ID: 39218249
you can add an OR statement to the query to handle NULL.

See this.
0
 

Author Closing Comment

by:DFPITC
ID: 39365941
I didn't have access to modify the query, so I had to create a new query that ran that query and accepted empty strings "" from excel, converting them to NULL
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question