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

Home -> Community -> Usenet -> c.d.o.misc -> Substring of a LONG

Substring of a LONG

From: kev <kevin.porter_at_fast.no>
Date: Wed, 08 Dec 1999 16:30:38 +0000
Message-ID: <384E87AE.5BA55726@fast.no>


Hi,

I am storing stories in our database in LONG format. When I pull a few out to show on a web page (using PHP), I only want to pull, say, the first 100 characters, then make a link out of it to the story in full. I tried doing a substr(body,0,100) but got an "Incompatable datatypes" error.
Does this mean the column 'body' must be a varchar2 to be able to do a substr() function in the SQL?
How do I get round this? I don't want to retrieve the whole of each story body, that would be very inefficient.

thanks,

Received on Wed Dec 08 1999 - 10:30:38 CST

Original text of this message

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