Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread SQL - upper 1st char / column length
Fri, Feb 29 2008 3:00 AMPermanent Link

"Harry de Boer"
LS

(dbisam 3.3)

In SQL:

-What's the proper way  to update a char (string) column so that the first
character becomes an upper char?
-What's the proper way  to make the length of a string column longer?

Regards, Harry

Fri, Feb 29 2008 3:50 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Harry


Totally untested since I'm on V4 not V3 but

SET xxx = UPPER(SUBSTRING(xxx,1,1)) + SUBSTRING(xxx,2,LENGTH(xxx))

and

ALTER TABLE zzz
REDEFINE COLUMN xxx VARCHAR(73)

Roy Lambert
Fri, Feb 29 2008 4:41 AMPermanent Link

"Harry de Boer"
Roy

Thanks for helping me on the way. Indded it is somewhat different in version
3:

update table SET columnname = UPPER(SUBSTRING(columnname FROM 1 FOR 1)) +
SUBSTRING(columnname FROM 2 FOR LENGTH(columnname))

The REDEFINE did the trick!

Regards, Harry

"Roy Lambert" <roy.lambert@skynet.co.uk> schreef in bericht
news:4173F6E4-0E94-40BD-BE04-9826079B6F76@news.elevatesoft.com...
> Harry
>
>
> Totally untested since I'm on V4 not V3 but
>
> SET xxx = UPPER(SUBSTRING(xxx,1,1)) + SUBSTRING(xxx,2,LENGTH(xxx))
>
> and
>
> ALTER TABLE zzz
> REDEFINE COLUMN xxx VARCHAR(73)
>
> Roy Lambert
>

Image