Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7098 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

I need to inner join 2 tables using JDBC.I am using SQL Server database and my tablenames are BS_1137_2_8 and ReservedInventory and I am using following code:

String str="select top 1 t1.ticketinfo , t1.seat from BS_1137_1_28 t1";

str+="inner join ReservedInventory RI1 on t1.ticketinfo=RI1.id and " + "RI1.status=-1";

ResultSet rs=stmt.executeQuery(str);

When I run the program then it gives error saying that colum prefix t1 does not match with a table name or alias name used in the query.Though I have given alias t1 to table BS_1137_2_8 and when I execute only this part "select top 1 t1.ticketinfo , t1.seat from BS_1137_1_28" then it successfully executes.I am not sure if concatenation is done correctly or not.Can anybody help me??

Posted

It appears you just need an extra space before the keyword "inner", otherwise it is getting appended right onto the table name?

FileMaker Version: Dev 7

Platform: Mac OS X Panther

  • 1 year later...
Posted

Hi,

FileMaker Pro supports Join statement. It appears that the space before inner keyword should solve the problem. If not, then keep all the query statements after "On" in braces.

--Sanjai

This topic is 7098 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.