• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

MS Excel query variable

vivek101

New Member
Hi, I'm having trouble finding information on how to put up a variable in a query in Microsoft Excel. Declare @var, Set @var doesn't seem to be working. Please tell me how to construct a variable for the following query.

SELECT inv.idclient, inv.invnumber, inv.invdate

FROM source.invoices inv

WHERE inv.idclient = 111222 AND inv.invdate > d{'2014-01-01'} --> I want this value to be replaced by a variable

Although this question is relatively straightforward, I have others where I need to enter the same date more than ten times, which is why I would like to establish a variable.


I appreciate your support.
 
Last edited by a moderator:
Back
Top