Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Substring of a LONG
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,
![]() |
![]() |