I was stumbling along and getting index errors while trying to write a string variable that contained the SQL query I wanted and then using the Index method to try to pull the data out.
I found in my string I needed those spaces after the words and that it was nice to place a comma before a word(column name) just as I would write the query as I do on the mainframe.
Using INDEXING to pull the data from the results to variables in the Java code was not completely clear to me. I was unsure if the index was to the order in the table and if the index started with 0 or 1.
From playing around it seems the index is to the order that the select SQL statement is written and not the table itself. Between the index thing and being careful to put spaces and commas in the string for the SQL statement I got a lot of trial and error. I still may have something wrong but it works now. I welcome any comments of syntax style or any other suggestion.
I found in my string I needed those spaces after the words and that it was nice to place a comma before a word(column name) just as I would write the query as I do on the mainframe.
Using INDEXING to pull the data from the results to variables in the Java code was not completely clear to me. I was unsure if the index was to the order in the table and if the index started with 0 or 1.
From playing around it seems the index is to the order that the select SQL statement is written and not the table itself. Between the index thing and being careful to put spaces and commas in the string for the SQL statement I got a lot of trial and error. I still may have something wrong but it works now. I welcome any comments of syntax style or any other suggestion.