Print Page | Close Window

Trouble Joining Different Data Types

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2022
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=14798
Printed Date: 22 Apr 2025 at 10:02am


Topic: Trouble Joining Different Data Types
Posted By: SDCAHouse
Subject: Trouble Joining Different Data Types
Date Posted: 27 Oct 2011 at 10:14am
Everyone-
Good afternoon.  I have a lot of experience with Crystal Reports and a decent understanding of sql, but I am having trouble with something I've never had to do before.
 
Under the 'Database Expert', I am attempting to create a command in order to be able to join two different data types.  They are:
 
PORECLINE.REC_NUMBER_A (string)
 
and
 
MMDIST.DOC_NUMBER (number).
 
I have inputted this code:
 
Select "REC_NUMBER_A"
From "XPINST_PORECLINE" inner join MMDIST"
On "XPINST_PORECLINE"."REC_NUMBER_A" = to_number("XPINST_MMDIST"."DOC_NUMBER")
 
As I've played around with the quotation marks and apostrophes, I've gotten different errors.
 
Can anyone help me out and let me know where I'm going wrong?
 
Thanks,
 
Kyle



Replies:
Posted By: CircleD
Date Posted: 27 Oct 2011 at 4:20pm
Try using IsNumber instead of ToNumber.



Print Page | Close Window