Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Joining tables on two condition Post Reply Post New Topic
Author Message
MikeEsk
Newbie
Newbie


Joined: 05 Aug 2008
Location: New Zealand
Online Status: Offline
Posts: 3
Quote MikeEsk Replybullet Topic: Joining tables on two condition
     Posted: 05 Aug 2008 at 6:56pm
Hey
The two SQLs below will give different results, can any one tell me how can implement the first SQL in crystal

//Joining two tables on two conditions
select si.Code, pqsi.Active
from StockItem si
left outer join ProductionQuoteStockItem pqsi on si.StockItemId = pqsi.StockItemId
and pqsi.Active = 1
 
//joining two table on one condition
select si.Code, pqsi.Active
from StockItem si
left outer join ProductionQuoteStockItem pqsi on si.StockItemId = pqsi.StockItemId 
where pqsi.Active = 1
 
Thanks.
IP IP Logged
MikeEsk
Newbie
Newbie


Joined: 05 Aug 2008
Location: New Zealand
Online Status: Offline
Posts: 3
Quote MikeEsk Replybullet Posted: 18 Aug 2008 at 10:03pm
Any clue!!
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 19 Aug 2008 at 1:37am
Hi
 
Create Command Object and Paste The First Sql
 
Cheers
Rahul
IP IP Logged
MikeEsk
Newbie
Newbie


Joined: 05 Aug 2008
Location: New Zealand
Online Status: Offline
Posts: 3
Quote MikeEsk Replybullet Posted: 19 Aug 2008 at 1:54pm
Hi,
Thanks but Sorry for not being clear, what I meant is can this be implemented in the Crystal Database Expert ?
Is there a performance difference between using Database Expert and using command?
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 20 Aug 2008 at 12:48am
Hi
 
You can find that out by using the different option i.e. command object or Database.Once you run the report go to Report Menu and check Performance Information
 
Cheers
Rahul
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