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.
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: