on 03-07-2016 10:59 AM
Hi guys
I have an interface running successfully in SAP PO Production server.
The interface is from MS SQL to SAP ECC, asynchronous scenario
It was working fine so far. but the client says they missed data on the dates 28th and 29th. The interface is triggered every five minutes. The last time it was triggered was on 28th morning 7:16 AM and then it started polling again on 1st morning 4:31 AM.
This was the querry that we used there:
select ID, Date, Time, TransType, PIN, Address from
TO_SAP_PunchDetails where InsertionDateTime >= DATEADD
(HH,-24,getdate())
I replaced it with this query
select ID, Date, Time, TransType, PIN, Address from TO_SAP_PunchDetails where InsertionDateTime >= 2016-02-28 07:15:00.000 and InsertionDateTime <= 2016-02-28 19:15:00.000
and this is the error that I got: I have attached screen shot
What is the solution?
Harish
Hi Babu,
Please try to execute the same query in SQL Server.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Harish,
Try the below query
select ID, Date, Time, TransType, PIN, Address from TO_SAP_PunchDetails where InsertionDateTime >= "2016-02-28 07:15:00.000" and InsertionDateTime <= "2016-02-28 19:15:00.000"
Refer the belwo link for constructing queries.
HI Raghu
It is working!
It didn't work with double quotes, but when I used single quote it worked!
This query worked:
select ID, Date, Time, TransType, PIN, Address from
TO_SAP_PunchDetails where InsertionDateTime >= '2016-02
-28 07:15:00.000' and InsertionDateTime <= '2016-02-28
19:15:00.000'
Regards
Harish
Hi Harish,
AFAIK you can't set directly the date and you should use the convert function SQL Server CONVERT() Function
Check also:
SQL Server 2008 - Date Formats
http://stackoverflow.com/questions/5184196/convert-date-against-where-clause
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.