February 10, 2012 at 1:09 am
Hi All,
Can we create a computed columns that relates from another tables?
Regards,
Guru
February 10, 2012 at 1:22 am
There was a recent QOTD about computed columns. The question can be found at http://www.sqlservercentral.com/questions/features/87846/ and the discussion here http://www.sqlservercentral.com/Forums/Topic1244022-1222-1.aspx
Dave
February 10, 2012 at 1:34 am
February 10, 2012 at 1:40 am
Thank u Dave and Jayanth
Regard
Guru
February 10, 2012 at 2:17 am
Although you can work around it using a UDF that references another table, you can't persist them as they're non-deterministic. If you need to index/persist the result, it might be worth looking into indexed views instead.
February 10, 2012 at 3:50 am
A scalar UDF in this context would be a performance nightmare. I would avoid it like the plague.
Why not use a view instead?
-- Gianluca Sartori
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply