on 02-23-2009 4:30 PM
en este query he intentado utilizar la variable para lo que sería mi variable fecha, por queno me la esta aceptando el generador de consultas del sap?.
SELECT distinct 'series'= case
When T0.series=1 then ' FORJADORES'
WHEN T0.series=34 then 'UNIVERSIDAD'
WHEN T0.series=35 then 'LIBRAMIENTO'
WHEN t0.series=36 then 'CANGREJOS'
WHEN T0.series=37 then 'ROSARITO'
WHEN T0. Series=144 then 'SANTA ROSA'
END,
(select count(docentry) from oinv where (series=t0.series and doctime between '700' and '800' and docdate='2009/02/18')) as [7 AM A 8 AM],
(select count(docentry) from oinv where (series=t0.series and doctime between '800' and '900' and docdate='2009/02/18')) as [8 AM A 9 AM],
(select count(docentry) from oinv where (series=t0.series and doctime between '900' and '1000' and docdate='2009/02/18')) as [9 AM A 10 AM],
(select count(docentry) from oinv where (series=t0.series and doctime between '1000' and '1100' and docdate='2009/02/18')) as [10 AM A 11 AM],
(SELECT Count(docentry) From OINV where (series = t0.series and doctime between '1100' and '1200' and docdate='2009/02/18')) As [11 AM a 12 PM],
(SELECT Count(docentry) From OINV where (series= t0.series and doctime between '1200' and '1300' and docdate='2009/02/18')) As [12 PM a 1 PM],
(select count(docentry) from oinv where (series=t0.series and doctime between '1300' and '1400' and docdate='2009/02/18')) as [1 PM A 2 PM],
(select count(docentry) from oinv where( series=t0.series and doctime between '1400' and '1500' and docdate='2009/02/18')) as [2 PM A 3 PM],
(select count(docentry) from oinv where (series=t0.series and doctime between '1500' and '1600' and docdate='2009/02/18')) as [3PM A 4 PM],
(select count(docentry) from oinv where (series=t0.series and doctime between '1600' and '1700' and docdate='2009/02/18')) as [4PM A 5 PM],
(select count(docentry) from oinv where (series=t0.series and doctime between '1700' and '1800' and docdate='2009/02/18')) as [5 PM A 6 PM],
(select count(docentry) from oinv where (series=t0.series and doctime between '1800' and '1900' and docdate='2009/02/18')) as [6 PM A 7 PM]
From OINV T0
where t0.docdate='2009/02/18'
levante otro post y en aquel si me respondieron bien.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
10 | |
6 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.