1

I'm working with a SQL query in an excel workbook and trying to make it a little more user friendly by pulling the date value from a cell.

Right now I have the query setup in the Connection Properties that looks like this:

DECLARE @BEGIN AS DATETIME = DATEADD(second, DATEDIFF(second, GETDATE(), GETUTCDATE()), '2020-11-08 00:00:00:000');

Ideally I'm looking for something like DECLARE @BEGIN = Sheet1!a1

Is it possible to replace it this way, or should I be looking to something else?

Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786
Craig
  • 11
  • 1
  • I finally found an answer that solved this for me here: https://stackoverflow.com/questions/5434768/how-to-pass-parameters-to-query-in-sql-excel – Craig Nov 21 '20 at 00:37

0 Answers0