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 |
cyberbond007
Starting Member
4 Posts |
Posted - 2006-10-03 : 06:26:51
|
Good Day,urn f_bbk_result --------------- ------------ 1179940 NEGATIVE1179940 PENDINGAbove is a table that returns two values for the same unique key as I used a couple of tables in my joins and this particular record contains two records. Is there a way that I can retain only one record, ie. in this case the pending record? In some instances there could be 3 results for the same identifier.Basically what I want to do is to retain any record that has a POSITIVE or PENDING result.Thanks in advance |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-10-03 : 06:30:38
|
select distinct urn from mytablewhere f_bbk_result in ('positive', 'pending')Peter LarssonHelsingborg, Sweden |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-10-03 : 06:31:19
|
If you want to modify your existing query, you will have to put the query here.Peter LarssonHelsingborg, Sweden |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2006-10-03 : 09:30:20
|
so, this COULD return more than one value?[Signature]For fast help, follow this link:http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspxLearn SQLhttp://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
|
|
|
|
|