Forum Discussion
kkoba
1 year agoFrequent Visitor
How to use dynamic SQL in Fabric Warehouse
I want to use dynamic SQL in Fabric Warehouse. Looking at the docs, it seems that dynamic SQL is supported in Fabric Datawarehouse. https://learn.microsoft.com/ja-jp/sql/relational-databases/sys...
AndyDDC
Most Valuable Professional
1 year agoHi kkoba set your variable to type NVARCHAR. NVARCHAR is indeed not supported in table column datatypes, but you can use variables of type NVARCHAR.
kkoba
1 year agoFrequent Visitor
Hi AndyDDC
Thank you for your reply
AndyDDC wrote:set your variable to type NVARCHAR. NVARCHAR is indeed not supported in table column datatypes, but you can use variables of type NVARCHAR.
Thank you for letting me know that although the NVARCHAR type cannot be set for a table column, it can be declared as the data type of a query variable.
I also declared an NVARCHAR type variable and was able to execute dynamic SQL without any problems, so I thought it might be possible to declare it as a variable.
I wish the official documentation would include that information...
thanks you