Oracle PL/SQL a '&'
radim.kubacki na rtscs.cz
radim.kubacki na rtscs.cz
Pondělí Listopad 22 14:17:26 CET 1999
> -----Původní zpráva-----
> Od: Vladimir Naprstek
> Odesláno: 22. listopadu 1999 13:45
> Komu: databases
> Předmět: Oracle PL/SQL a '&'
>
> Zdravím a pozdravuji.
> Mohl byste mi, prosím, někdo poradit s následujícím: v PL/SQL skriptu
> potřebuji do porměnné dát podobný text:
> prom := 'text&textpokracuje&textdalepokracuje....';
>
> ale když to předhodím databázi, tak při vyváření funkce/procedury vezme
> '&textpokracuje' jako nějakou proměnnou a chce její hodnotu (a stejně
> tak pro všechny další výskyty znaku '&'). Když zadám '&textpokracuje',
> tak pak je vse OK a procedura funguje jak má. Ale když napíšu něco
> jiného, tak provede náhradu a to není to co chci.
> V manuálu jsem zatím nic nenašel...
> Zkusil jsem i 'text\&textpokracuje....', ale to nepomohlo.
>
Pritom by to melo fungovat. Dokumentace rika totiz tohle:
System Variables
The following system variables, specified with the SQL*Plus SET command,
affect substitution variables:
SET DEFINE Defines the substitution character (by default the
ampersand "&") and turns substitution on and off.
SET ESCAPE Defines an escape character you can use before the
substitution character. The escape character instructs SQL*Plus to treat the
substitution character as an ordinary character rather than as a request for
variable substitution. The default escape character is a backslash (\).
Mozna se ten \ interpretuje uz shellem.
Radim
Další informace o konferenci Test