Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link 2 different data types tables

Status
Not open for further replies.

sto837

Technical User
Aug 11, 2009
20
US
Hi,

Does anyone know how to link tables with 2 different data types? One is a string and the other is an integer. I got some information online that I can link in formula editor and change the data type through SQL. I never done it before so I have no idea where to go about this. Can anyone show me an example?

Thanks
 
Please identify your CR version and your database.

-LB
 
Hi,

I'm using CR 10 and Version 9 for Oracle.

Thanks
 
Sorry. It's 10G Enterprise Edition Release 10.2.0.4.0
 
The fastest way to handle it is to use a command as your entire datasource. You would set it up something like this:

select "tableA"."string","tableB"."number",
from "tableA" inner join "tableB" on
to_number("tableA"."string") = "tableB"."number"

Another approach would be to use the second table in a subreport, and then in one of the reports create a formula to convert the datatype either totext or tonumber. Then in the subreport linking expert, use the formula to link to the table in the other report.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top