|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Return 1 of 2 Select StatementsIf @myValue = 1 Select Field1 From myTable Else If @myValue = 2 Select Field1, Field2 From myTable In query analyzer I get the right select statement, but in dotnet or access I get only the first select statement, unless I change it to this: If @myValue = 1 Select Field1 From myTable Return Else If @myValue = 2 Select Field1, Field2 From myTable Return Now adding the returns made this work, but I am not sure why. Any solid way to do this? Derek |
|||||||||||||||||||||||