All Forums

Share best practices, knowledge, successes and issues in Analytics, and discuss Analytical Applications.

You must login to post to the forums.
script query Topic by ozi_wozzy 23 Mar 2006

Hi guysI have a slightly generic query. I have a table with actual sales and budget per week for the whole year, and another table which holds calender information, which I link my first table to work out which figures belong to which company weeks. What I want to do is an equation along the lines of:[Actual.Lastweek]-[Budget.Thisweek]My problem is that both actuals and budgets are in the same table so how can I work out the actual sales last week and take it away from this week's budget in one sql string? I've got the following code just to work out sales from last week.SELECT sum(ACTUAL_SALES_VALUE)FROM MEASURES_DATA ON B.Retail_Outlet_Number = A.RETAIL_OUTLET_NUMBER Inner Join VWI0CAL_SMALL_CALENDAR C ON A.ssw_TIME = C.year_week_numberGROUP_BY Calendar_Date,A.SSW_TIME, A.MEASURE_ID, B.Trading_Status_IndHAVING ((AND ((A.MEASURE_ID)='ATSV'))AND (Calendar_Date = (date-7))the "MEASURES_DATA" table holds sales by day, hence I use the calender table to work out week sales, if that makes sense. Now I just need to do something similar to work out this week's budget, and take one away from the other, but not sure how to go about it.Any help would be appreciatedMany thanksOz

13013 views
0 replies
Teradata function equivalent to 'LIKE %..%' in Teradata Topic by ddpp 31 Jan 2006

Hi all,Can anyone please let me know A teradata function which is equivalent to LIKE in Oracle.Eg. Select * from EMP where empnm=like'dd%' in oracle databasePlease write in TeradataPlease respond ASAP.

78654 views
3 replies, 13 years ago
Formating TIME to load using multi load Topic by Hashly 09 Feb 2006

HiI wanto load a time field by using multiload. Data look like 16000000. what kind of format I use for this. FORMAT 'HHMISSSS' is not working.Thanks,

18677 views
1 reply, 13 years ago
how to convert a period of D+30, D+60 etc to exact day and month Topic by jef 27 Feb 2006

To avoid hard codding the months in the ADS we have been Creating 4 ADSs with historical customers data for Churn with period of 30 days instead of calendar month: Day-30, D-60, D-90, and creating the detection period with D+30, D+60, D+90. We are also creating a table called Customer DNA where we load the customers data from the ADSs with the scores. Now, the customer wants to do some reporting but with calendar month so rather than recreating the ADSs with calendar month I have been told that 'SysCalendar' could map the periods to the exact day of the month and allow the customer to manage the performance of the his company based on months not period of 30 days. Any hint that make the transition easy between periods and calendar month without changing the ADS?thanks.J.

24469 views
2 replies, 13 years ago
Read data from txt file using Procedure/function in Teradata ?? Topic by M@_Lorinha 15 Dec 2005

How read data from txt file using Procedure/function in Teradata like UTL_FILE in Oracle????

20545 views
1 reply, 13 years ago
interoperability with email and sms Topic by marcmc 20 Dec 2005

Hi,My company is seriously considering translating from SqlServer 2k to TeraData after christmas. I have written an vb.net/sql application that incorporates emailing and subsequent sms notifications. Our email system is Lotus.Are there/Are there likely to be any functions like SQLMail or the ability to work with email and sms from TeraData?Excuse me if this is the incorrect forum.Marc

19598 views
1 reply, 13 years ago
TCRM Demo Topic by ewa 06 Jan 2006

Hi there,Does anyone know haw to get the TCRM demo v5 or v6?I know there are prepared laptops/discks with TCRM demo and some seed data, but don't know who is distributing them.

14516 views
0 replies

Pages