Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: LONG

Re: LONG

From: William Beilstein <BeilstWH_at_obg.com>
Date: Fri, 12 May 2000 15:10:55 -0400
Message-Id: <10495.105556@fatcity.com>


What works with a variable, will not always work with a table. see the = following

SQL> create table testtable (ltest long)

Table created.

SQL> insert into testtable values('ABCDEFGH');

1 row created.

SQL> commit;

Commit complete.

SQL> select substr(ltest,2,3) from testtable; select substr(ltest,2,3) from testtable

              *
ERROR at line 1:
ORA-00932: inconsistent datatypes

SQL> drop table testtable;

Table dropped.

>>> "Atish Prasad Das" <atish.das_at_wipro.com> 05/12/00 02:15PM >>>
try this.....

set serverout on
declare
sample_var1 long :=3D 'ABCDEFGH';
sample_var2 long :=3D 1234567890;
begin
  dbms_output.put_line('Substr from sample1 : '||substr(sample_var1,5));   dbms_output.put_line('Substr from sample2 : '||substr(sample_var2,5)); end;

The output will be:

Substr from sample1 : ABCDE
Substr from sample2 : 12345

trey it out........ u can try some instr func urself.........

Atish,

  Sorry to say that I do not agree with your view.

  Could you please provide us with examples to proove that this   works...

Regards
Rajagopal Venkataramany

----Original Message Follows----
Reply-To: ORACLE-L_at_fatcity.com=20
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> Date: Thu, 11 May 2000 02:24:28 -0800

Yes, u can use any character function with long in pl/sql....... but in sqlplus this gives datatype mismatch.

Hi guru s
i want to know if is possible to do a substr or a instr in plsql with a = LONG
field?
thanks for all,

--
Author: Solis Llera, Eduardo
   INET: esolis_at_mapfre.com=20

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


--
Author: Atish Prasad Das
   INET: atish.das_at_wipro.com=20

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com=20=


--
Author: Rajagopal Venkataramany
  INET: rajagopalvr_at_hotmail.com=20

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


--=20
Author: Atish Prasad Das
  INET: atish.das_at_wipro.com=20

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
Received on Fri May 12 2000 - 14:10:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US