Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
kali1979
Starting Member
1 Post |
Posted - 2014-05-14 : 04:32:16
|
Hi I am trying to get the max value from a column at the begining of the statement before resuming with the statement.exampleIf the max value is 10 then use the value in the statementfor exampleselect max(colum1SELECT a.coloumn1, b.column2, FROM table1 a LEFT JOIN table2 b ON a.column1=b.column2 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2014-05-14 : 04:58:47
|
not really sure what you are after, but perhaps you can use IF statementIF ( some condition ) SELECT statment1ELSE SELECT statment2 KH[spoiler]Time is always against us[/spoiler] |
|
|
|
|
|