• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Storing & sign in oracle

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am facing a problem in storing & sign in the Oracle database. My data contains & sign. While I am trying to store the & sign in the Oracle database it is giving me a prompt.
Please let me know how to store this sign in the Oracle.

Thanks and regards,
Sayan Maity
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There should be no problem storing ampersands in Oracle. Can you explain a little more about what you are doing? Are you using SQLPlus or another client? Or are you doing this with JDBC?
 
sayan maity
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Paul,
I tried this with SQLPlus but while implementing I will be doing storing the ampersand sign in the database using JDBC connection.
Please let me know whether it will be a problem while using JDBC to store the data.

Thnaks,
Sayan Maity
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its still a little unclear what you are doing (you might like to post the SQLPlus you are running?). An ampersand in SQLPlus is used to denote a substitution variable. If you write this for example:

SQLPlus will prompt you for the value to substitute in place of &table.
 
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by sayan maity:
Hi Paul,
I tried this with SQLPlus but while implementing I will be doing storing the ampersand sign in the database using JDBC connection.
Please let me know whether it will be a problem while using JDBC to store the data.

Thnaks,
Sayan Maity



It is SQL*Plus itself that is treating &[string] as a substitution variable; JDBC will not do that and you can use an ampersand with JDBC just like any other normal character.

You can also turn off this feature of SQL*Plus with "SET DEFINE OFF" or change the chracter with "SET DEFINE x", where x is your new prefix charachter for variable substitution. And of course, "SET DEFINE ON" undoes, "SET DEFINE OFF".
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic