Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Select Statement and ODBC connectivity Post Reply Post New Topic
Author Message
pozaronics
Newbie
Newbie


Joined: 28 Jun 2010
Location: United States
Online Status: Offline
Posts: 3
Quote pozaronics Replybullet Topic: Select Statement and ODBC connectivity
     Posted: 02 Jul 2010 at 8:14pm

The original issue is no records are showing when I link 2 tables together on a field. I know that the field in both are the same and the join should bring back a result, but it does not bring anything back.

I am connecting to the database via the application using ODBC.

When I use the command option to create my own select statement I get a connection error:-.

“failed to open rowset details: 3700 :[AR System ODBC Driver] unexpected extra token inner join”

The select statement I created included a trim as this made the connect work when I tested it in MS access. The join field is on the instanceID, which is the primary key in one table and foreign key in the other

SELECT "BMC_CORE_BMC_ApplicationSystem"."Name",
 FROM   "BMC_CORE_BMC_ApplicationSystem" "INNER JOIN "BMC_CORE_BMC_Application"  ON trim("BMC_CORE_BMC_ApplicationSystem"."InstanceId")=trim("BMC_CORE_BMC_ApplicationSystem_1"."InstanceId")

The application I am trying to connect to is BMC Remedy

Can anyone suggest how I can change the syntax of the statement I created so that the statement will be accepted?

Can anyone suggest what could be the original issue with the connectivity?

Thanks

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: 05 Jul 2010 at 5:13am
Hi
 
*Not sure what the issue is try removing the TRIM and see if it works
*Also Try running the report separate from application, i.e. standalone in Crystal and see what the issue is
* Try creating report without command option and check for the SQL and then use that SQL in command  and see if it works, if yes the try adding TRIM and test
 
Cheers
Rahul
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 06 Jul 2010 at 5:16am
Also I don't think that the double quotes before the INNER belong there.
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