Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SQL Command to display date in between

Former Member
0 Likes
368

Hello Friends

Is there any open sql command which will display sum(qty) between dates in one command , I know it is there like decode etc but cannot remember.

Eg

select sum(fkimg,010107 , 310107) from table into

wa where plant = xxxxxx

regards

Piroz

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
348

Can't you just do this?


select sum(fkimg) 
from table into
wa where plant = xxxxxx
and date between '20070101' and '20070131'.

Greetings,

Blag.

2 REPLIES 2
Read only

Former Member
0 Likes
349

Can't you just do this?


select sum(fkimg) 
from table into
wa where plant = xxxxxx
and date between '20070101' and '20070131'.

Greetings,

Blag.

Read only

Former Member
0 Likes
348

Hi

Yes I know doing by giving date range you can do it but if i need between this date to date

select * from s903

into wa where

fkdat between 010107 and 310107

how can i put the condition to display month wise individually

into jan,feb,mar,apr accordingly when the date range is selected it must go into each column separately

Is there any clue to start please, I am really stuck and it is very urgent

regards

Piroz