Hi,
I have a problem quering terradata using Microsoft query, to enter into a spreadsheet.
The problem may be:-
(a) My SQL is wrong?
(b) Micorsoft query cannot handle such a complex query which uses parameters (I get the error "parameters are not allowed in queries that can't be displayed graphically"?
(c) The ODBC driver for the terradata DB may not allow parameters to be passed to it?
My SQL is as follows:
select switch_cd ,
count(*) , cdr.start_dt
from v_mediated_cdr cdr, v_second_of_day sod
where cdr.start_tm = sod.thesecond and cdr.start_dt between ? and ?
and sod.thesecond between 000000 and 235959
and mediation_sys_id = 1
group by switch_cd, cdr.start_dt
union all
select switch_cd ,
count(*) , cdr.start_dt
from v_mediated_cdr cdr, v_second_of_day sod
where cdr.start_tm = sod.thesecond and cdr.start_dt between ? and ?
and sod.thesecond between 000000 and 235959
and mediation_sys_id = 1
and c_nbr <> ' '
order by 1
group by switch_cd, cdr.start_dt;
If you could give me any advice as to how to solve this problem i would greatly appreciate it.
I am not using Access as the main purpose of this tool is to keep data to a minimum and to run trend analysis on the results, which I know more about in excel.
Cheers Alistair
I have a problem quering terradata using Microsoft query, to enter into a spreadsheet.
The problem may be:-
(a) My SQL is wrong?
(b) Micorsoft query cannot handle such a complex query which uses parameters (I get the error "parameters are not allowed in queries that can't be displayed graphically"?
(c) The ODBC driver for the terradata DB may not allow parameters to be passed to it?
My SQL is as follows:
select switch_cd ,
count(*) , cdr.start_dt
from v_mediated_cdr cdr, v_second_of_day sod
where cdr.start_tm = sod.thesecond and cdr.start_dt between ? and ?
and sod.thesecond between 000000 and 235959
and mediation_sys_id = 1
group by switch_cd, cdr.start_dt
union all
select switch_cd ,
count(*) , cdr.start_dt
from v_mediated_cdr cdr, v_second_of_day sod
where cdr.start_tm = sod.thesecond and cdr.start_dt between ? and ?
and sod.thesecond between 000000 and 235959
and mediation_sys_id = 1
and c_nbr <> ' '
order by 1
group by switch_cd, cdr.start_dt;
If you could give me any advice as to how to solve this problem i would greatly appreciate it.
I am not using Access as the main purpose of this tool is to keep data to a minimum and to run trend analysis on the results, which I know more about in excel.
Cheers Alistair