Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem quering terradata from microsoft query

Status
Not open for further replies.

alibongo

IS-IT--Management
Joined
Sep 6, 2001
Messages
29
Location
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top