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 |
erikf
Starting Member
1 Post |
Posted - 2002-02-10 : 05:52:14
|
hello everybody !i have sql statement with union (like this)select Question.id as id , Question.NameUNION select Answer.id as id , Answer.Name=ACCESS 2000 DATABASE=after the recordset is open i redirect to another page to show Question or Answer details (show.asp?id=id)so i MUST know from which part of sql statement the id (first or second)HOW CAN I KNOW IT ??? help pleaseThank you |
|
LarsG
Constraint Violating Yak Guru
284 Posts |
Posted - 2002-02-10 : 08:39:58
|
You can add an extra column to the result and check on that value in your applicationselect Question.id as id , Question.Name,'Question' as typeOfIdUNION select Answer.id as id , Answer.Name,'Answer' |
 |
|
|
|
|