↧
Answer by Grant Fritchey
You can't pass a table name as a variable in that fashion. You'll still have to build the string and replace the variable with the table name such that when the query executes, it has a table to...
View ArticleAnswer by ozamora
@Grant is right. And you are close. Replace @myTable with: ' + @myTable + ' and do not pass the @myTable variable anymore
View ArticleAnswer by Doiremik
thanks Ozamora for the very quick response.. I have amended the code for now like so WITH cte AS ( SELECT CONVERT(VARCHAR(@dateCastLength), QuoteDateTimeUTC, 120 as convertedDate, QuoteDateTimeUTC as...
View ArticleAnswer by Doiremik
Geeez Ozamora... you rock... top class lol. I know the code is really simple but this isnt the real implementation honest... I'm using CTE's to work out candle stick charts and aggregate data on...
View Article