Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: John Hayna
  Where is John Hayna?
 
 Philippines
 John Hayna
 To: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 Tags
Subject: RE: Expiry List Report
Thread ID: 331303 Message ID: 331309 # Views: 29 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Wednesday, December 28, 2011 7:51:33 PM         
   


Hi Stefan,

Thanks for the reply. I like your solution. I will use this and will get back to you if I have further question.
Thanks.

> > Hi,
> >
> > My client wants a feature of Expiry List Report for the Pharmacy POS she asked me to create, where she can view the all the medicines whose expiration date is coming within 6 months. I have a column in my products table for the expiration (column name: expiry, type:datetime).
> >
> > Can you help me write SQL statement to capture products whose expiration is coming in 6 months?
> >
> > I am using MySQL as backend.
> >
> > Thank you in advance.
>
>
> You can probably use GoMonth() inside VFP and a parameterized query string, something like the following pseudo-code example, where the details would depend on whether you are using CursorAdaters, remote Views or SPT on the client side:
>
>
> Local ...
> ltSixMonthsLater = GOMONTH(DATETIME(),6)
> lnSuccess = SQLEXEC(..., "Select ... From yourTable Where expiry <= ?m.ltSixMonthsLater", ...)
> 

>
>
>
>
> hth
> -Stefan

ENTIRE THREAD

Expiry List Report Posted by John Hayna @ 12/28/2011 6:53:36 PM
RE: Expiry List Report Posted by mk sharma @ 12/28/2011 7:14:36 PM
RE: Expiry List Report Posted by Stefan Wuebbe @ 12/28/2011 7:40:19 PM
RE: Expiry List Report Posted by mk sharma @ 12/28/2011 7:59:07 PM
RE: Expiry List Report Posted by John Hayna @ 12/28/2011 7:50:05 PM
RE: Expiry List Report Posted by mk sharma @ 12/28/2011 8:07:52 PM
RE: Expiry List Report Posted by John Hayna @ 12/28/2011 8:52:08 PM
RE: Expiry List Report Posted by mk sharma @ 12/28/2011 8:55:39 PM
RE: Expiry List Report Posted by Stefan Wuebbe @ 12/28/2011 7:17:50 PM
RE: Expiry List Report Posted by John Hayna @ 12/28/2011 7:51:33 PM
RE: Expiry List Report Posted by John Hayna @ 12/28/2011 8:44:15 PM
RE: Expiry List Report Posted by Stefan Wuebbe @ 12/28/2011 9:17:21 PM
RE: Expiry List Report Posted by tushar @ 12/29/2011 5:35:37 AM