HP3000-L Archives

December 1999, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Francois Desrochers <[log in to unmask]>
Reply To:
Francois Desrochers <[log in to unmask]>
Date:
Fri, 10 Dec 1999 08:53:28 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (21 lines)
<[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]

ATOM RSS1 RSS2