Click here to Skip to main content
15,391,695 members
Home / Discussions / Database
   

Database

 
QuestionAbout the SQL Execution Plan Pin
mctramp16820-Aug-09 22:09
Membermctramp16820-Aug-09 22:09 
AnswerRe: About the SQL Execution Plan Pin
Ashfield20-Aug-09 23:19
MemberAshfield20-Aug-09 23:19 
AnswerRe: About the SQL Execution Plan Pin
Mycroft Holmes21-Aug-09 0:38
professionalMycroft Holmes21-Aug-09 0:38 
GeneralRe: About the SQL Execution Plan Pin
David Mujica21-Aug-09 2:54
MemberDavid Mujica21-Aug-09 2:54 
QuestionSQL:Find one primary key of each duplicate records Pin
xodeblack20-Aug-09 19:42
Memberxodeblack20-Aug-09 19:42 
AnswerRe: SQL:Find one primary key of each duplicate records Pin
Ashfield20-Aug-09 21:01
MemberAshfield20-Aug-09 21:01 
GeneralRe: SQL:Find one primary key of each duplicate records Pin
xodeblack20-Aug-09 21:25
Memberxodeblack20-Aug-09 21:25 
GeneralRe: SQL:Find one primary key of each duplicate records Pin
Ashfield21-Aug-09 1:21
MemberAshfield21-Aug-09 1:21 
Thats odd. I used this:

create table #b1(pk int identity, refid int)

insert into #b1 (refid)
select 1
union all
select 2
union all
select 3
union  all
select 1
union all
select 2
union all
select 3

select min(PK) from #b1 where refid in (select distinct refid from #b1)group by refid


and it gave me 1, 2 and 3. I'm using sql server 2005, what are you using?

Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP

GeneralRe: SQL:Find one primary key of each duplicate records Pin
xodeblack21-Aug-09 1:28
Memberxodeblack21-Aug-09 1:28 
GeneralRe: SQL:Find one primary key of each duplicate records Pin
Ashfield21-Aug-09 4:20
MemberAshfield21-Aug-09 4:20 
GeneralRe: SQL:Find one primary key of each duplicate records Pin
Coding C#20-Aug-09 22:25
MemberCoding C#20-Aug-09 22:25 
GeneralRe: SQL:Find one primary key of each duplicate records Pin
David Skelly20-Aug-09 22:32
MemberDavid Skelly20-Aug-09 22:32 
GeneralRe: SQL:Find one primary key of each duplicate records Pin
Ashfield21-Aug-09 1:19
MemberAshfield21-Aug-09 1:19 
QuestionLIKE Predicate Pin
TheIdleProgrammer20-Aug-09 3:50
MemberTheIdleProgrammer20-Aug-09 3:50 
AnswerRe: LIKE Predicate Pin
Mycroft Holmes20-Aug-09 4:17
professionalMycroft Holmes20-Aug-09 4:17 
GeneralRe: LIKE Predicate Pin
TheIdleProgrammer20-Aug-09 4:28
MemberTheIdleProgrammer20-Aug-09 4:28 
GeneralRe: LIKE Predicate Pin
Mycroft Holmes20-Aug-09 13:15
professionalMycroft Holmes20-Aug-09 13:15 
GeneralRe: LIKE Predicate Pin
TheIdleProgrammer20-Aug-09 22:10
MemberTheIdleProgrammer20-Aug-09 22:10 
GeneralRe: LIKE Predicate Pin
Mycroft Holmes21-Aug-09 0:33
professionalMycroft Holmes21-Aug-09 0:33 
GeneralRe: LIKE Predicate Pin
David Skelly20-Aug-09 22:53
MemberDavid Skelly20-Aug-09 22:53 
GeneralRe: LIKE Predicate Pin
TheIdleProgrammer20-Aug-09 23:07
MemberTheIdleProgrammer20-Aug-09 23:07 
AnswerRe: LIKE Predicate Pin
Luc Pattyn20-Aug-09 4:58
sitebuilderLuc Pattyn20-Aug-09 4:58 
GeneralRe: LIKE Predicate Pin
TheIdleProgrammer20-Aug-09 22:11
MemberTheIdleProgrammer20-Aug-09 22:11 
QuestionSql Problem Pin
AhmedGebaly19-Aug-09 23:37
MemberAhmedGebaly19-Aug-09 23:37 
AnswerRe: Sql Problem Pin
David Skelly20-Aug-09 2:26
MemberDavid Skelly20-Aug-09 2:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.