This website is not affiliated with, sponsored by, or approved by SAP AG.

How to use converted date in where clause??

All postings related to Business One only

Moderators: Snowy, thx4allthefish

How to use converted date in where clause??

Postby User001 » Wed Apr 24, 2013 4:48 am

Hi Experts,

I'm a newbie here and i'm seeking for your suggestions on how can i make use of a converted date in my where clause?? Is it possible?
Below is my sample query.

Thanks .

select t1.itemcode,t1.basecard, t1.Dscription, t1.Sales_Qty, t1.SDate
from
(
select a.itemcode,a.basecard, a.Dscription, SUM(a.quantity) 'Sales_Qty', CONVERT(CHAR(4), docdate, 100) + CONVERT(CHAR(4), docdate, 120) 'SDate' from INV1 A
group by CONVERT(CHAR(4), docdate, 100) + CONVERT(CHAR(4), docdate, 120), a.itemcode,a.basecard, a.Dscription
) t1
where t1.SDATE = '[%0]'
User001
 
Posts: 4
Joined: Wed Apr 24, 2013 4:40 am

Re: How to use converted date in where clause??

Postby Gothmog » Wed Apr 24, 2013 5:04 am

That's not an OpenSQL statement, and seems to come from this mysql forum.
Is it SAP-related ?
68 74 74 70 3a 2f 2f 74 69 6e 79 75 72 6c 2e 63 6f 6d 2f 62 64 6f 37 6d 77 67
Gothmog
 
Posts: 1942
Joined: Wed Sep 12, 2007 4:46 am
Location: Probably not home

Re: How to use converted date in where clause??

Postby User001 » Wed Apr 24, 2013 5:07 am

Yes, it is SAP related. I executed it through query generator. Without where clause the code gives output but when i added the where clause with the above condition it gives error.
User001
 
Posts: 4
Joined: Wed Apr 24, 2013 4:40 am

Re: How to use converted date in where clause??

Postby Gothmog » Wed Apr 24, 2013 5:13 am

Query generator? Looks like a SAP Business One tool.
I have no acces to a B1 system, sorry - ABAP uses a different syntax for the available SQL instructions (OpenSQL).
68 74 74 70 3a 2f 2f 74 69 6e 79 75 72 6c 2e 63 6f 6d 2f 62 64 6f 37 6d 77 67
Gothmog
 
Posts: 1942
Joined: Wed Sep 12, 2007 4:46 am
Location: Probably not home

Re: How to use converted date in where clause??

Postby User001 » Wed Apr 24, 2013 5:25 am

yes it is tool for SAP B1. Ow, did i posted a question to a wrong forum? where should i go?
thanks
User001
 
Posts: 4
Joined: Wed Apr 24, 2013 4:40 am

Re: How to use converted date in where clause??

Postby Gothmog » Wed Apr 24, 2013 6:33 am

Well, it's more an SQL question than an ABAP one.
I can shadow this topic in the Business One subforum, if you want.
68 74 74 70 3a 2f 2f 74 69 6e 79 75 72 6c 2e 63 6f 6d 2f 62 64 6f 37 6d 77 67
Gothmog
 
Posts: 1942
Joined: Wed Sep 12, 2007 4:46 am
Location: Probably not home

Re: How to use converted date in where clause??

Postby User001 » Wed Apr 24, 2013 8:37 pm

Thanks for helping.. very much appreciated. I'll be the one to post it to the B1 subforum..
thank you
User001
 
Posts: 4
Joined: Wed Apr 24, 2013 4:40 am


Return to Business One

Who is online

Users browsing this forum: No registered users and 1 guest





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.