All Forums Database
vinaynaran 10 posts Joined 10/14
08 Jan 2015
Parameter Query in Excel ODBC

Hi all,

select calendar_date,
sum(Sales_Value) as Daily_Sales_Value
from DAILY_SALES
where calendar_date >= date-3
group by 1

Above Query I am using in Excel via ODBC connection and its working perfect and give me a result in second.

Now I want to try to do Parameter query using ? (Quesation Mark) like below

select calendar_date,
sum(Sales_Value) as Daily_Sales_Value
from DAILY_SALES
where calendar_date >= date-Cast(? as integer)
group by 1

It's working but take to much time (more than 10 minutes).

Is am I doing anything wrong? please help.

Thanks
Vinay

ravimans 54 posts Joined 02/14
09 Jan 2015

Hi Vinay,
I am not understanding correctly. What you are trying to acheive by giving parameter query string? Above syntax is not working correctly for me.

vinaynaran 10 posts Joined 10/14
12 Jan 2015

Hi,
This Teradata query to be run in Excel using ODBC Connection. (I Hope you have create connection)
you have to copy this query into Excel
Data>>Connection>>Properties>>Defination>>Command Text
Once you click ok i will generate the result.
 
But As i said when I use Parameter then it takes too long to produce result. Why?
Vinay
 
 

You must sign in to leave a comment.