September 17, 2008 at 5:08 am
Hello,
I have got 2computed columns.
select * from table followed by condition as memotype1
I want to pick up my memovalue1 based on memotype1
When i did select * from where memotype=memotype1 ,it is not picking the value.
how can i compare a computed column to populate another computed column
September 17, 2008 at 6:23 am
It's a bit hard to understand your question. Can you post the complete query?
You can try to use the computed phrase to fill your column:
For instance if your computed column is like:
SELECT (Column1 + Column2) * 3 AS Computed
FROM table
instead of using this to fill another table
UPDATE table2
SET ColumnA = Computed
FROM table2 INNER JOIN table ON table1.ID = table2.ID
WHERE ...
you can use this to fill another table:
UPDATE table2
SET ColumnA = (table2.Column1 + table2.Column2) * 3
FROM table2 INNER JOIN table ON table1.ID = table2.ID
WHERE ...
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply