How to use identifier() as reference
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
โ07-24-2024 07:15 PM
Hello,
i am trying to build some dynamic sql scripts using this identifier() clause. This works fine when it is used with [ select * from identifier (mytable) ]. However, when I try to use this identifier as a reference to a foreign key table, it doesnโt work. For example,
CONSTRAINT s_t_fk FOREIGN KEY(fk1) REFERENCES identifier(mytable).
Any idea how to use an identifier() or a variable when referencing to table? I am using sql warehouse. Not spark sql. Thank you
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
โ08-21-2024 05:32 AM
Is this something you are working to resolve?
We would also like to use IDENTIFIER() with our REFERENCE(s) CONSTRAINT(s)
If not - is it possible to get an explaination why the limitation exists?

