โ05-15-2020 06:39 AM
Hi, I have few tables on SQL server like
abc_2020
abc_2019
abc_2018
I want to query the the table that has suffix as current year. I have specified the value
in the settings > table name-- โabc_โ+ Date.now().getFullYear()
itโs throwing error.
Failure: Failed to retrieve metadata for table: โโabc_โ+Dateโ.โnow()โ.โgetFullYear()โ, Reason: Database โnow()โ does not exist. Make sure that the name is entered correctly., Resolution: Database โnow()โ does not exist. Make sure that the name is entered correctly.
When I hard-code the table name as abc_2020 it is working.
Can someone help me with this ?
โ05-15-2020 06:55 AM
Hi @Siva_Venna
Can you please provide screenshot of the Snap where you are passing the table name?
Regards,
Spiro
โ05-18-2020 03:25 AM
@Spiro_Taleski Here you go
โ05-18-2020 03:53 AM
Can you please check if table that you want to query exist in the database and remove the brackets before Date.now() and after getFullYear().
Also, you can try first to select the database schema name and then pick the appropriate table.
โ05-19-2020 05:15 AM
@Spiro_Taleski I have checked manually the table exists and when I hard code the table name I am getting the records. As you suggested removed the brackets yet same error.the output preview is as expected.