Thank you for the responses. I'm trying to select (via OPNQRYF for now),
on status, and then a range on the new timestamp field. It's reading in
arrival order and it's taking a long time.

I create another logical file with the key fields (status, date, time) but
that isn't being used. Running the opnqryf doesn't have any other
suggestions.

Art

On Sat, Sep 30, 2017 at 9:24 AM, Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx>
wrote:

Hi Art

I suggest using the TIMESTAMP_FORMAT function - I find that it simplifies
the look of the thing - you make a character string - you don't need to
insert those colons for the time - then specify a format string.

So it might be like this - timestamp_format(date(yourdate) ||
digits(yourtime4), 'YYYY-MM-DDHH24MM')

I'm not at a machine, so check the format characters for the time. Also
verify the character format for the date.

Regards
Vern


On 9/29/2017 10:14 PM, Jack Tucky wrote:

Thank you again Jim.

Art

On Fri, Sep 29, 2017 at 11:02 PM, Jim It <jim_it@xxxxxxxxxxx> wrote:

Jack,

Views cannot contain the order by clause.

SQL statements referencing the View will utilize the existing indexes on
the table, so you'll just need to add the order by to the SQL statement
referencing the SQL View.

Jim
________________________________
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxx> on behalf of Jack
Tucky <jacktucky@xxxxxxxxx>
Sent: Friday, September 29, 2017 10:24 PM
To: Midrange Systems Technical Discussion
Subject: Re: SQL Create View Timestamp

Thank you. I came up with this. I'll try yours. How can I add an order
by?

CREATE VIEW WHSDww.WHSSN06 (sndid#, snentrydt, snentrytm, sntimestamp,
snentryusr, snstatus2)
as select sndid#, snentrydt, snentrytm,
timestamp(
char(snEntryDt) ,
substr(digits(snentrytm),1,2)
|| ':' ||
substr(digits(snentrytm),3,2)
|| ':00'
),
snentryusr,
snstatus2

from whsdww.whssn00





On Fri, Sep 29, 2017 at 9:42 PM, Jim It <jim_it@xxxxxxxxxxx> wrote:

Jack,

Just add this as a column expression in the View.

Timestamp(ENTRYDT, Insert(Digits(ENTRYTM),3,0,'.') Concat '.00') As
ENTRYTS

Jim
________________________________
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxx> on behalf of Jack
Tucky <jacktucky@xxxxxxxxx>
Sent: Friday, September 29, 2017 8:53 PM
To: Midrange Systems Technical Discussion
Subject: SQL Create View Timestamp

I'd like to try to create a view so that I can make a timestamp field.
I
have an existing PF with an ISO date and a 4 digit numeric time. How

can I

create a view that will give me a timestamp?

The table is WHSSN00 and the field names are ENTRYDT and ENTRYTM.

Thanks, Art (Still googling and experimenting)
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing

list

To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing

list

To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.