Jump to content

Create Date Range Parameters in Excel SQL


Recommended Posts

I have written a SQL Query for my Database at work in Excel so that I can automatically update it. Took me a while to figure out the date sections and getting it to return just the current date with the below code.

 

 

WHERE
f.FolioStatusId in (1, 7, 8, 9, 13)
AND cast(f.made_on as date) >= cast(getdate() as date)
What I'd like to do is to have a section in Excel where I can type the Dates that I need the data from and too.
I know that I can insert a "?" in the query section to make a cell reference but cant figure out what code would need to go in the WHERE section to do that.
Any help would be greatly appreciated!
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...