I am getting a value from a drop down menu and storing it in the sessions bean. However when I try to get that value to use it on a query i am getting an error. That value is the DB that i am going to use for my query...
The erros is saying that the DB does not exist...and its true the database "db" is not the name of my databes, my problem is that i dont know how to set the value of the stored value of my bean in the sql query.
"JUN_F1"."Telefono" = '9717029902';
JUN_F1 is the name of my table but that name, however this name is formed by JUN (variable) and _F1 (text)...I cant write my query to store in a string variable to do what i need to do, the problem is the quotes..basically my query will look like this...
remember... month is the value stored in another variable and _F1 is plain text
This is what i want to do..
String query = "SELECT "month+_F1"."Renta" FROM public."month+_F1" WHERE "month+_F1"."Telefono" = '9717029902';";