Never try to be a hard-worker. Be a smart-worker.
My Blog
Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
Never try to be a hard-worker. Be a smart-worker.
My Blog
Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
Originally posted by Shailesh Chandra:
I think one inner join with item table will solve your problem. I guess you are selecting from RMA TABLE
But could you tell me how are you getting CustName because RMA Table is having a column as customer_id .
You must be using inner join with customer table, if you can do it for one table then you can also do it for other tables too.
Thanks,
Shailesh
Never try to be a hard-worker. Be a smart-worker.
My Blog
Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
Never try to be a hard-worker. Be a smart-worker.
My Blog
tbl_item.item_description as ProductDetails
Originally posted by Rajkumar balakrishnan:
Any one is there to help me.....
Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
Originally posted by Shailesh Chandra:
Be patient Patience Is A Virtue
You are doing it right, but two query you have given are not identical. The query you are running on console is diferent with the code. can you check the same.
Thanks,
Shailesh
Never try to be a hard-worker. Be a smart-worker.
My Blog
tbl_item.item_description as ProductDetails
Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
Originally posted by Shailesh Chandra:
Did you follow Paul's post, It seems you have edited your query
If your query is like <as ProductDetails> then use rs.getString("ProductDetails") else rs.getString("tbl_item.item_description");
Let us know if it is working.
Thanks,
Shailesh
Sh
Never try to be a hard-worker. Be a smart-worker.
My Blog
Originally posted by Paul Sturrock:
See my earlier post. This is the reason rs.getString("tbl_item.item_description") returns nothing.
Never try to be a hard-worker. Be a smart-worker.
My Blog
Originally posted by Paul Sturrock:
I'm going to assume you mean you get no results?
Does:
return any results when you run it directly in your SQL client?
Never try to be a hard-worker. Be a smart-worker.
My Blog
Originally posted by Paul Sturrock:
OK, so one of a number of things could be happening:
1.You are not running the same query in your JSP as you are in the console. 2.You are not connected to the database you think you are. 3.Some sort of exception is occuring in your JDBC code. 4.Something is messing up how you render your results. Have you checked the source of the page you return?
This is not related, but I notice you are using a PreparedStatement but not using bind variables. You probably want to fix that too.
Never try to be a hard-worker. Be a smart-worker.
My Blog
1. No
2.Surely not
yes. i got after the end of result set exception.. but it is not giving me any problem
But when i give these queries it wont render the output...
4.Thats what i am thinking about.. If somebody do find any messy code please inform me..
Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
Originally posted by Shailesh Chandra:
I would like to add one point only, can you try with query below.
I have removed join condition. It will give you cartesian product of both table,also It will let you know if your join clause actually is being satisfied or not
Thanks,
Shailesh
Never try to be a hard-worker. Be a smart-worker.
My Blog
Originally posted by Paul Sturrock:
Have you tried using rs.getString(int) instead? You might also try looking at the ResultSetMEtaData to see what columns have been returned.
NB: if your JDBC code wasn't mixed in with your JSP code you would be able to debug this easily without any concerns about soemthing else (such as invalid HTML) hiding output.
Never try to be a hard-worker. Be a smart-worker.
My Blog
Originally posted by Paul Sturrock:
Now I'm confused. I didn't think it was the serial_no field you were having trouble with?
You shouldn't need the table name on the field name. Your database should return a result set that just includes the field. The field name should be the same in your SQL Client and via JDBC.
Never try to be a hard-worker. Be a smart-worker.
My Blog
(The output shown above is not in exact format as i get)
Originally posted by Paul Sturrock:
So the above result is what you get in your MySQL client when you run the SQL:
Yes? Now I'm even more confused because in earlier posts you said that this query returned different results?
So are we trying to fix the query or its display logic?
I'm not sure there is any point us trying to help if you don't tell us exactly what is happening and how it is going wrong. Without that we are just guessing.
[ August 20, 2008: Message edited by: Paul Sturrock ]
Never try to be a hard-worker. Be a smart-worker.
My Blog
Don't get me started about those stupid light bulbs. |