Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
haneeshmarella
Creator II
Creator II

How to convert time in numeric to TIME field in SQL Script?

Hi, I am using AS400 DB2 SQL script. I am trying to figure out how can I convert numeric time field to a TIME format. I have numeric timefield of different lengths.

Example,

5 which is 00:00:05

10 which is 00:00:10

2529 which is 00:25:29

123223 which is 12:32:23

How do I convert it into TIME within script and not the LOAD since I would like to create QVD based on script, rather than making transformations later based on QVD which takes even longer time due to the large amount of data?

Thank you.

29 Replies
haneeshmarella
Creator II
Creator II
Author

It's at least 25,000 rows every few minutes `15-20 minutes.

Probably it's because I used a lot of WHERE conditions and joins, that it is slow?

I see a time difference of about 30 seconds - 1 minute.

sunny_talwar

So, when pulling 25,000 rows, you are seeing a time difference of 30 seconds to 1 minute between the two reloads?

haneeshmarella
Creator II
Creator II
Author

I mean time difference before and after implementing preceding load. Between the two consecutive reloads, I see about 5-6 minutes.

sunny_talwar

5-6 minutes difference for 25,000 rows?

haneeshmarella
Creator II
Creator II
Author

No, only to add the new rows into the QVD, which are about 500.

sunny_talwar

So, when the SQL returns just the 500 rows... the second query is approx 5 minutes slower than the first query? That doesn't seem right to me... something else is not right.... Would you be able to share the log files for both reloads?

haneeshmarella
Creator II
Creator II
Author

I have made certain changes. I have attached the query. Can you please check the query to see if I am doing it right?

I am doing preceding load, and then doing the incremental load and replacing the original QVD with the incremental load concatenating the original one.

I will send you the log files once I run it again.

haneeshmarella
Creator II
Creator II
Author

Now takes about 1 minute to do the reload. Attached is the log file.

sunny_talwar

Made couple of changes... try this

sunny_talwar

And without Preceding load?