Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

tough task?

Hi experts,


Date Format should be DD/MM/YYYY. Suppose there are n rows where row 2 and row 4 have different date formats


Row1   12/10/2014
Row2   12-10-2014
Row3   12/10/2014
Row4   12-10-2014
.         .
.
.
.
Rown    DD/MM/YYYY

During load I want to eliminate the rows with erroneous date format and convert into qvd. at the same time i want all the erroneous rows to be stored into a QVD called Error.Qvd.


how to store non erroneous dates in one qvd and at same time how to create qvd for erroneous data?


is it possible to create 2 qvds  at a time ? 

1 Solution

Accepted Solutions
MarcoWedel

Hi,

one solution:

QVD correct dates

QlikCommunity_Thread_138553_Pic1.JPG.jpg

QVD incorrect dates

QlikCommunity_Thread_138553_Pic2.JPG.jpg

tabSource:

LOAD * INLINE [

    Row, Date

    Row1, 12/10/2014

    Row2, 12-10-2014

    Row3, 12/10/2014

    Row4, 12-10-2014

];

NoConcatenate

tabCorrectDates:

LOAD *

Resident tabSource

Where IsNum(Date);

NoConcatenate

tabIncorrectDates:

LOAD *

Resident tabSource

Where not IsNum(Date);

DROP Table tabSource;

STORE tabCorrectDates into tabCorrectDates.qvd (qvd);

STORE tabIncorrectDates into tabIncorrectDates.qvd (qvd);

hope this helps

regarsd

Marco

View solution in original post

7 Replies
antoniotiman
Master III
Master III

Hi,

Try

Load *

Where alt(Date#(Date,'DD/MM/YYYY'),0) > 0;

Load *

from Table;

You load only correct date.

Regards,

Antonio

Not applicable
Author

for wrong date i need to create?

MarcoWedel

Hi,

one solution:

QVD correct dates

QlikCommunity_Thread_138553_Pic1.JPG.jpg

QVD incorrect dates

QlikCommunity_Thread_138553_Pic2.JPG.jpg

tabSource:

LOAD * INLINE [

    Row, Date

    Row1, 12/10/2014

    Row2, 12-10-2014

    Row3, 12/10/2014

    Row4, 12-10-2014

];

NoConcatenate

tabCorrectDates:

LOAD *

Resident tabSource

Where IsNum(Date);

NoConcatenate

tabIncorrectDates:

LOAD *

Resident tabSource

Where not IsNum(Date);

DROP Table tabSource;

STORE tabCorrectDates into tabCorrectDates.qvd (qvd);

STORE tabIncorrectDates into tabIncorrectDates.qvd (qvd);

hope this helps

regarsd

Marco

antoniotiman
Master III
Master III

For wrong date use

Where alt(..............) = 0;

veidlburkhard
Creator III
Creator III

Hi manojqlik,

this Where clause gives you the incorrect data formats:

Load *

Where alt(Date#(Date,'DD/MM/YYYY'),0) = 0;

Load *

from Table;

(see QV Help, 'Conditional Functions', 'Alt')

Hope this helps

Burkhard

Not applicable
Author

Hi Manoj.

Does this attachment help answer your question?

Regards

Not applicable
Author

Hello manoj ,

Try like this