Home » SQL & PL/SQL » SQL & PL/SQL » Insert value 'G&D PREPAGO' doesn`t work
Insert value 'G&D PREPAGO' doesn`t work [message #187045] Thu, 10 August 2006 11:32 Go to next message
aleplus
Messages: 4
Registered: July 2006
Location: CBA,
Junior Member

Hi:
My name is Alejandro and Iam an Argentine citizen.
In this moment I have this problem:
I want do this single isnert:

INSERT INTO SIM_DUP_MANUFACTURER ( SDM_ID, SDM_CODIGO, SDM_NAME ) VALUES (29, 7, 'G&D PREPAGO')

but, when I run this in the SQL PLus console I saw this message:
"Introduzca un valor para D:"
(Translated this is, more or less,"Introduce a value for D:")

This occurs because in the string I have this char "&".
How I must do it?
I find this way:

INSERT INTO SIM_DUP_MANUFACTURER ( SDM_ID, SDM_CODIGO, SDM_NAME ) VALUES (29, 7, 'G'||'&'||'D PREPAGO')

But I want a better way to do the insert.
Can you help me guys?


Re: Insert value 'G&D PREPAGO' doesn`t work [message #187046 is a reply to message #187045] Thu, 10 August 2006 11:41 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Check this out escape special characters.
Re: Insert value 'G&D PREPAGO' doesn`t work [message #187061 is a reply to message #187045] Thu, 10 August 2006 13:18 Go to previous messageGo to next message
aleplus
Messages: 4
Registered: July 2006
Location: CBA,
Junior Member

Trying, I use this query for do the insert:

INSERT INTO SIM_DUP_MANUFACTURER ( SDM_ID, SDM_CODIGO, SDM_NAME ) VALUES (30, 7, 'G&&D PREPAGO')

This run OK in PL/SQL Developer, but not in SQL PLUS.
Using this way ('G&&D PREPAGO') How can I do that this works in both tools? (PL/SQL Developer/SQL PLUS).
Re: Insert value 'G&D PREPAGO' doesn`t work [message #187062 is a reply to message #187061] Thu, 10 August 2006 13:41 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
In SQL*Plus, either:

set scan off

or

set define off
Previous Topic: Local index vs global index in partitioned tables
Next Topic: URGENT-counting the number of OS files of particuler type(extension) in a directory(windows)
Goto Forum:
  


Current Time: Tue Dec 06 02:19:59 CST 2016

Total time taken to generate the page: 0.06646 seconds