• Post Reply Bookmark Topic Watch Topic
  • New Topic

Data base insert problem  RSS feed

chinna sankar
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Boost this thread!