Newbies chanchal Posted March 29, 2004 Newbies Posted March 29, 2004 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??
The Shadow Posted April 2, 2004 Posted April 2, 2004 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
omiossec Posted April 9, 2004 Posted April 9, 2004 Join syntaxe doesn't work with Fmp and JDBC You need to create a portal on your layout and use an array to retreive related records.
Sanjai Posted June 16, 2005 Posted June 16, 2005 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now