Skip to main content
Question

How to use Table variable into SQL query instead of sheetname

  • Mar 15, 2023 11:58 AM UTC
  • 1 reply
  • 165 views

  • 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
  • Navigator | Tier 3
  • Mar 15, 2023 4:55 PM UTC

 @ap442 

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

 

HTH

Regards