complex SQL query and Filtering

Talk about working with different database types

Moderator: alexandrleonenko

kasumovic
Expert
Expert
Posts: 87
Joined: Sep 7th, '10, 22:38

complex SQL query and Filtering

Postby kasumovic » Sep 12th, '10, 21:16

Hi ,

Can I modify self sql, and prevent that datagrid do this ?

simple example :
select x.benutzer_nr,x.datum,sec_to_time(sum(unix_timestamp(x.call_end)-unix_timestamp(x.call_start))) as zeit_gesamt,
(select distinct count(a.kunden_nr) from cc_workflow a
where (a.benutzer_nr=14)and(a.datum='2010-08-20')) as gesamt_kunden,
(select sec_to_time(sum(unix_timestamp(b.call_end)-unix_timestamp(b.call_start))) from cc_workflow b
where (b.benutzer_nr=14)and(b.datum='2010-08-20')and(b.status_id=1)) as zeit_ne
from cc_workflow x
where (x.benutzer_nr=14)and(x.datum='2010-08-20')
group by x.benutzer_nr,x.datum ;

regards
kasumovic

administrator
Site Admin
Site Admin
Posts: 6001
Joined: Jan 7th, '09, 23:18
Contact:

Re: complex SQL query and Filtering

Postby administrator » Sep 13th, '10, 10:45

You may "turn Off" filtering and create your own filtering, then add needed condition to WHERE clause of SELECT SQL

kasumovic
Expert
Expert
Posts: 87
Joined: Sep 7th, '10, 22:38

Re: complex SQL query and Filtering

Postby kasumovic » Sep 13th, '10, 21:50

hi ,

that is think one of limits too from datagrid... i can set the LAST where , but not other :-(

regards
kasumovic


Return to “Databases: different types implementation”