Re: Truncation (fwd)
Posted in 1994
From George Teachman:
* >
* >
* >
* > A quickie for y'all....
* >
* > What would be the most efficient and quickest way to truncate a
* > char(6) to a char(2) in an existing table?
* >
* >
* > --
* > Naomi Walker (aka N7FSA) | naomi@anasazi.com
* > | Phoenix, Arizona
* > Everything should be made as simple |
* > as possible, but not simpler --Einstein | Visualize Whirled Peas
* >
*
* I'm going to assume (dangerous, very dangerous :-)) that you want
* all data in the char(6) column to be char(2). My first impulse
* would be to;
*
* alter table table_name
* modify column_name char(2);
Or how about:
update table set column_name = column_name[1,2];
Robert Minter |Data Systems Support| \\\\\\_///
Programmer, Software Development | Orange, CA | ( _ _ )
internet: rob@dssmktg.com | Tel: 714.771.0454 | (| ^ |)
bangpath: uunet.uu.net!dssmktg!rob| Fax: 714.771.3028 | \\`-'/
#include <disclaimer.h> SURF'S UP \\_/