- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Embedded Ampersand - Oracle vs Sybase
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2002 07:27 AM
тАО04-01-2002 07:27 AM
A Perl script is used to pull field values from the Sybase records and then insert them into Oracle records on a different server. The problem value is 'HP IPS Group & Marketing'. The Perl script hangs. It is waiting for a value for "Marketing".
If I cut the insert statement from trace.log and paste it into a SQL*Plus window, Oracle responds with "Enter value for marketing: ".
So much for a Perl script written for Sybase and Oracle but only tested with Sybase. Is there a solution other than parsing each field value and replacing "&" with "ampersand"?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2002 07:40 AM
тАО04-01-2002 07:40 AM
Re: Embedded Ampersand - Oracle vs Sybase
mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2002 07:52 AM
тАО04-01-2002 07:52 AM
SolutionI can think of three easy solutions on the Oracle side: 1) set escape some_character - this defines a character you can place immediately in front of the ampersand so that SQL will treat the & as a literal. 2) set scan off - turns off variable substitution for the SQL statement. 3) set define some_char - some_char will define another character to denote a vaiable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2002 08:14 AM
тАО04-01-2002 08:14 AM
Re: Embedded Ampersand - Oracle vs Sybase
also, you can parse the line coming from the sybase output and replace each special characters with whatever you need on the oracle inpu OR replace the special characters with their octal or hex representation in ASCII code !!!
David what ? I think I know this guy :-)))
Henrique Silva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-02-2002 05:46 AM
тАО04-02-2002 05:46 AM
Re: Embedded Ampersand - Oracle vs Sybase
I have been unable to set environment variables in Oracle from Perl using a stored procedure. Of course, I tried to develop the stored procedure in Oracle before implementing it in Perl. Couldn't get it to work in Oracle.
Next, I have entered "SET DEF OFF" and "SET SCAN OFF" into the login.sql file for the user called by the Perl script. I put a copy of the login.sql script in "G:\Oracle\Ora81\DBS\" and set the WIN2K environment variable SQLPATH to "G:\Oracle\Ora81\DBS\". Now, I need to see if login.sql is read when Perl opens the DBI connection.
If this doesn't work, I'll try glogin.sql. That might work but would remove the flexibility of scanning for input variables for another script by logging in as a different user.
If none of this works, I will post a short test script and log files which document the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-02-2002 06:20 AM
тАО04-02-2002 06:20 AM
Re: Embedded Ampersand - Oracle vs Sybase
Thanks to everyone.
Special thanks to A. Clay Stephenson for his hints.