Subject: | |
From: | |
Reply To: | |
Date: | Fri, 10 Dec 1999 08:53:28 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
<[log in to unmask]> asks:
>Can someone tell me the syntax for selecting part of a column using
>either IMAGESQL or ISQL? I need to create a view table that has a column
>that is the first 12 bytes of a column in an existing table. I have
>tried things like SELECT NEW_COL=SUB(OLDCOL,1,12) but that doesn't work.
You were on the right track. The function is SUBSTRING as in:
Select substring(oldcol,1,12) from table_name;
To create the view, you might do something like:
Create View MyView(NEW_COL) as select substring(oldcol,1,12) from
table_name;
Good luck.
François Desrochers - Robelle Consulting Ltd.
email: [log in to unmask]
|
|
|