Print Page | Close Window

Expression in table joining

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=19288
Printed Date: 03 May 2024 at 6:30am


Topic: Expression in table joining
Posted By: RafRaf
Subject: Expression in table joining
Date Posted: 18 Mar 2013 at 12:13am
Hi,

Is it possible to join tables in Crystal Records by using not simple and usual field A = field B but something more complex like:

select * from table1 inner join table2
on table1.A=2*table2.B

or

select * from table1 inner join table2
on ASCII(table1.A)=ASCII(table2.B)





Replies:
Posted By: Sastry
Date Posted: 18 Mar 2013 at 1:05am
Hi
 
If you are able to execute the SQL statements at database end then those statements are valid and can be used in crystal reports 'Add Command '
 
If it is giving any error means, your driver is unable to understand the SQL.  So always use a latest driver to avoide run time errors.


-------------
Thanks,
Sastry


Posted By: hilfy
Date Posted: 18 Mar 2013 at 11:11am
By way of explanation, in Crystal a Command is just a SQL Select statement that will pull all of the data that you need for your report.  Joining a Command to tables or using multiple Commands is not recommended as it will significantly affect the speed of your report.  If you need to use parameters with a command, DO NOT create them in the report itself - instead create them in the Command Editor and use them in the SQL.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window