|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, August 15, 2012 9:16 AM
Points: 6,
Visits: 153
|
|
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
|
|
|
|
|
SSCoach
         
Group: General Forum Members
Last Login: Monday, May 06, 2013 1:09 PM
Points: 15,439,
Visits: 9,569
|
|
I'm not sure I follow your question. Are you asking how to select a computed column, or how to create one? You can't use one computed column in the definition of another computed column, if that's what you're asking about. But you can include the definition of the first one in the definition of the second one.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Tuesday, March 08, 2011 2:31 AM
Points: 513,
Visits: 38
|
|
If I get the point right, you want to use a computed column in the select query. In that case, you should use something like (sorry for possible syntax errors, I have no SQL available where I currently reside :) ):
select * from ( select SomeColumWithComputation as ComputedColumn from SomeTable ) tmp where ComputedColumn=bla
Cheers! Bert
------------------------ MCPD Web Developer, MCPD Windows Developer
Computers are made to solve problems you did not have in the days they didn't exist.
|
|
|
|