Prakash Mondal

Prakash Mondal

  • 1.8k
  • 287
  • 168.7k

How to find out list of upcoming expiry items

Dec 21 2021 12:47 AM

My database table: (Purchase-Details)

 

Table with value:

 

I want to find out the list of upcoming exipry medicines.

my Query:

SELECT * FROM PURCHASE_DETAILS

WHERE CONVERT(date,EXPIRY) BETWEEN CONVERT(DATE,'21-Dec-2021') AND CONVERT(DATE,'31-Oct-2022')

 

but error occur.

Please suggest me.


Answers (5)