• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Data base insert problem

 
chinna sankar
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI
I am new to hibernate implementation; I did normal insertions (just simple insert queries) with hibernate successfully. I struck up with a problem where I need to insert data with sub query (dynamic).
Query is:
INSERT INTO "CREDIT_CARD" (CNUMBER,CTYPE, EXPDATE,CUID,LAST_UPDATE) VALUES ((select tcrypt.tencrypt('234509873333') from dual),'AMEX','060627',43903873,sysdate);

Here my question is how can I execute �select tcrypt.tencrypt('234509873333') from dual� which is inside a Query.
I did one way is that, writing this as Native SQL and insert into data base.
Please suggest is there any alternative to execute the above query.
Thanks in advance
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic