Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Command to select first record Post Reply Post New Topic
Author Message
elie234
Groupie
Groupie


Joined: 21 Aug 2009
Online Status: Offline
Posts: 68
Quote elie234 Replybullet Topic: Command to select first record
     Posted: 06 Oct 2009 at 9:02am
I would like to create an SQL command to link two tables on a field so that only the first matching record is selected. What would be the syntax for that? Thank you.
IP IP Logged
Jyothi Yepuri
Senior Member
Senior Member


Joined: 11 May 2009
Location: Australia
Online Status: Offline
Posts: 127
Quote Jyothi Yepuri Replybullet Posted: 06 Oct 2009 at 4:00pm
try TOP 1

select top 1 field1,field2..
from table1
inner join table2 on table1.field1 = table2.field2

HTH,
Jyothi
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum