Hi-Adding a parameter As of Date [message #254877] |
Sun, 29 July 2007 22:40 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
selvalee
Messages: 1 Registered: July 2007 Location: India
|
Junior Member |
|
|
Hi,
i need to put as on date in query.I have put like this
SELECT
XTA.TRUCK_NUMBER TRUCK_NO,
XV.DESCRIPTION TRUCK_DESCRIPTION,
XSP.STOCK_POINT STOCK_POINT,
XSP.DESCRIPTION STOCK_DESCRIPTION,
XV.CONTACT_NUMBER CONTACT_NUMBER,
XV.VENDOR_SITE_ID SUPPLIER,
PV.VENDOR_NAME VENDOR_NAME,
XV.TOTAL_CAPACITY CAPACITY,
XTA.FROM_DATE FROM_DATE,
XTA.TO_DATE TO_DATE,
XV.COMPANY ORG_ID
FROM
XXIS_VEHICLES XV,
XXIS_STOCK_POINT XSP,
XXIS_TRUCK_AVAILABILITY XTA,
PO_VENDORS PV,
PO_VENDOR_SITES_ALL PVS
WHERE
XTA.COMPANY=:P_ORG_ID
AND XV.COMPANY=XTA.COMPANY
AND XTA.STATUS='A'
AND XTA.COMPANY=XV.COMPANY
AND XSP.COMPANY=XTA.COMPANY
AND XSP.STOCK_POINT=XTA.FROM_STOCK_POINT
AND PV.VENDOR_ID=PVS.VENDOR_ID
AND PVS.SHIP_TO_LOCATION_ID=XV.VENDOR_SITE_ID
AND PVS.ORG_ID=XTA.COMPANY
AND TO_DATE(:P_AS_OF_DATE,'DD-MON-YYYY') BETWEEN XTA.FROM_DATE AND NVL(XTA.TO_DATE,TO_DATE(:P_AS_OF_DATE,'DD-MON-YYYY'))
but it is not happening,its says that->REP-0613: Value does not match mask 'DD-MON-YYYY'.Anyone can help me this issue to solve it out.
Regards,
Selva
|
|
|
Re: Hi-Adding a parameter As of Date [message #254940 is a reply to message #254877] |
Mon, 30 July 2007 02:05 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
As you've coded it asTO_DATE(:P_AS_OF_DATE, 'DD-MON-YYYY') you MUST enter p_as_of_date values in this format: dd-mon-yyyy. Not dd.mm.yyyy or yyyy/mm/dd or ..., but exactly dd-mon-yyyy.
|
|
|