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: Atish Prasad Das <atish.das_at_wipro.com>
Date: Mon, 15 May 2000 10:07:43 +0530
Message-Id: <10497.105607@fatcity.com>


william,

string functions will not work with Long datatype in sqlplus stmts. u can do those operations with tables also, but in pl/sql (try the same in a pl/sql block.)

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 := 'ABCDEFGH';
sample_var2 long := 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
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

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

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

--

Author: Rajagopal Venkataramany
  INET: rajagopalvr_at_hotmail.com

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

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: William Beilstein
  INET: BeilstWH_at_obg.com
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 Received on Sun May 14 2000 - 23:37:43 CDT

Original text of this message

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