chris_kzn
7th May 2015, 17:12
Hi gurus,
I am trying to find a solution to my current Sales Statistics debacle. It has been going on for quite some time now and so I want to put this one to sleep.
I have used the below script to try and list the outstanding Sales Orders in the system:
//script for outstanding sales orders in the system
use myDatabase
go
select t_citg, sum(t_amta) AS 'Outstanding Sales Orders'
from dbo.ttdsls041101
where t_dqua = 0 and t_oqua <> 0
group by t_citg
order by t_citg
go
I try using the below script and am wanting to try get one where it will list the "Order Intake (1)", "Orders Cancelled (2)" and "Orders Invoiced (3)" in one line, however my current tsql skills are not there yet, so if any of you are guru's at this, please feel free to post it as it is required?
//script for sales order history lines in the system
use myDatabase
go
select t_citg, sum(t_amta) AS 'Order Intake'
from dbo.ttdsls051101
where t_ckor = 1
group by t_citg, t_ckor
order by t_citg, r_ckor
go
I will appreciate any help I can get please?
I am trying to find a solution to my current Sales Statistics debacle. It has been going on for quite some time now and so I want to put this one to sleep.
I have used the below script to try and list the outstanding Sales Orders in the system:
//script for outstanding sales orders in the system
use myDatabase
go
select t_citg, sum(t_amta) AS 'Outstanding Sales Orders'
from dbo.ttdsls041101
where t_dqua = 0 and t_oqua <> 0
group by t_citg
order by t_citg
go
I try using the below script and am wanting to try get one where it will list the "Order Intake (1)", "Orders Cancelled (2)" and "Orders Invoiced (3)" in one line, however my current tsql skills are not there yet, so if any of you are guru's at this, please feel free to post it as it is required?
//script for sales order history lines in the system
use myDatabase
go
select t_citg, sum(t_amta) AS 'Order Intake'
from dbo.ttdsls051101
where t_ckor = 1
group by t_citg, t_ckor
order by t_citg, r_ckor
go
I will appreciate any help I can get please?