Skip to main content
Question

How to use Table variable into SQL query instead of sheetname

  • March 15, 2023
  • 1 reply
  • 123 views

Forum|alt.badge.img
  • Ground Control | Tier 1

Example is -- select * from [Sheet1$$];

 

I want to use Table Variable instead of Sheet1

I tried to using ---   select * from [Table variable$$];

 

It is not working , can anyone suggest solution

1 reply

Raul Jaimes
Forum|alt.badge.img+9
  • Navigator | Tier 3
  • March 15, 2023

 @ap442 

Declare a new variable which will contains the sheet name and use it into the select query as below

 

HTH

Regards