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 |
|
aks
Starting Member
28 Posts |
Posted - 2005-03-15 : 13:47:11
|
| Hi,I have a table with following fields:UID INT NAME============================================34 1111 Jan34 1124 200434 67 hr34 1117 JULY34 1124 200434 56 hr56 1111 JAN56 1125 200556 3 hr56 1119 SEPT56 1124 200456 78 hrI'm trying to get the output as JAN in 2005(1125) only not 2004(1124)BUT JULY I want in 2004(1124) LIKE:UID NAME============================34 111734 112434 5656 111156 112556 356 111956 112456 78I used the foolwing query but its giving me NO JAN value neither 2004 nor 2005.select a.uid,b.val_int from hr a, hr b,hr c where a.recordset_id=b.recordset_id anda.recordset_id=c.recordset_idAND((a.val_int=1111and b.val_int=1125) or(a.val_int=1112 and b.val_int=1125)or(a.val_int=1113 and b.val_int=1125) ora.val_int=1114 ora.val_int=1115 ora.val_int=1116 ora.val_int=1117 ora.val_int=1118 ora.val_int=1119 ora.val_int=1120 ora.val_int=1121 ora.val_int=1122 )ANDc.question_id=1123order by a.uid |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-03-16 : 01:30:45
|
| Duplicate of http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=47117 |
 |
|
|
|
|
|