Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help selecting dates after a certain date

error.jpg

Sorry if this is simple... I'm reading my data from a pervasive sql database, everything works perfectly, but when I
add load "DDate" it always crashed with OLE DB multiple step operation error, I'm assuming it's because the DDate has too many

transactions (it's years worth of invoices).   How can I make DDate only load transactions after a certain date, E.g.  01/01/2013   ?
Thank you in advance

31 Replies
tresesco
MVP
MVP

Well, let's try it step by step to find the root cause.

See if the below statement fetches data successfully:

SQl Select

                    CustomerCode,

                    ItemCode,

                    DDate

From HistoryLines Where CustomerCode=<give once code>;

Does it work? If yes, then connection is ok; statment has no problem, we can try for step2 then.

Not applicable
Author

you should not use timestamp.

Not applicable
Author

Sorry about the late reply, Im here now.  It threw the same error, Tres qv

ErrorSource: Pervasive.SQL V9 OLE DB Provider, ErrorMsg: One or more errors occurred during processing of command.

SQL Select    

CustomerCode,

ItemCode,

DDate

From HistoryLines Where CustomerCode=<give once code>"

Not applicable
Author

Any help ?

Not applicable
Author

can u share application?

tresesco
MVP
MVP

'<give once code>', i meant a CustomerCode which is there in the database. Like CustomerCode='101' .

MayilVahanan

Hi  darrenrsa,

Try like this

Load CustomerCode, ItemCode,Qty, Date(DDate,'DD/MM/YYYY') as DDate, SalesmanCode  where DDate >= Date('01/08/2013','DD/MM/YYYY');

SQL Select CustomerCode, ItemCode, DDate, Qty, SalesmanCode From HistoryLines;

Hope that helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Thanks Mayil,  It didn't wok, it gave the error

ErrorSource: Pervasive.SQL V9 OLE DB Provider, ErrorMsg: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

SQL Select

CustomerCode,

ItemCode,

DDate,

Qty,

SalesmanCode

From HistoryLines

It's only if a put DDate in, if I remove it, everything else loads perfectly and is viewable etc

Thomas, I can share the application, but the database is too big to share and I fear you cant do anything with the application without the database ?

Not applicable
Author

Just need a sample! But try anyway

Not applicable
Author

Where shall I share it ? Sorry for the begginer question