Quantcast
Channel: Spring Community Forums - Data
Viewing all articles
Browse latest Browse all 297

JdbcTemplate using nested queries

$
0
0
It has been a while since I developed a JDBC application. Is there a way for me to create a subquery for I am receiving a column unknown on my subquery? For example:

select A.CUST_ID, A.NAME, A.AGE from (
select cust_acct, firstname || ',' || lastname as NAME, agenum from table1) AS A
where A.CUST_ID = '0001' and A.NAME = 'John Smith';

I need the subquery for situations like NAME where I must concat more than one column into a single variable in order to satisfy the where clause.

Is there any methods in Spring Data JDBC to assist in the construction of this?

Viewing all articles
Browse latest Browse all 297

Trending Articles