Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: TRUNCATE on INSERT (ORACLE)
how about an insert/update trigger that performs does the substr?
hth,
Tim Hentzel
In article <3995E077.A992F412_at_worldnet.att.net>,
"uncle.scrooge" <uncle.scrooge_at_worldnet.att.net> wrote:
>
> I think I know the answer, but I'll take a shot in the dark anyway...
>
> There's no jdbc (or database) option for
> statement/connection/database/resultset whereas one can
> tell the database "if this string doesn't fit, truncate it", is
there???
>
> ie in ORACLE, how can I get this to work without altering the table or
> making the string shorter?
>
> CREATE TABLE YYY ( FOO VARCHAR2(10));
>
> INSERT INTO YYY VALUES('abcdefghijlkmnopqrstuvwxyz');
>
> any help appreciated...
>
> thx
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Sun Aug 13 2000 - 00:00:00 CDT