Split the dates bi-weekly - response (3) by dnoeth
I don't get what your exactly trying to achieve."run my job bi-weekly": scheduling a job on Unix or retriving rows in a SELECT?"nearest monday": based on what, first of month?"no missing date": return...
View ArticleConversion of Time to INTERVAL - response (2) by M.Saeed Khurram
Dieter, Yes the TIME -TIME is an interval, But is there any possiblity to convert the result of above query to HH:MI format?
View ArticleConversion of Time to INTERVAL - response (3) by dnoeth
Hi Khurram, simply change the resulting type: Converted_Time - time '00:00:00' hour to minute
View ArticleConversion of Time to INTERVAL - response (4) by M.Saeed Khurram
Wow, thats great. I was unable to think that way. Thank you!
View ArticleLoops without using procedures - forum topic by rajimol
Hi I have a scenario like we need to calculate premium amount for a perticular year. if the year in integer for eg 4 Year amt 1 amt/(1+rt_fct) 2...
View ArticleSelecting a column based on DATE along with GROUP BY - forum topic by...
Hi All,I have a below requirement:-I have data as belowGID - MID - UID - DATE 1000000 - 1000001 - 9000001 - 2013-11-01 1000000 - 1000002 - 9000002 - 2013-11-21 1000000 - 1000003 - 9000003 - 2013-11-11...
View ArticleLoops without using procedures - response (1) by Raja_KT
Hi, Can you please post in a proper format? There is a code button next to Paragraph. I think if you put in a format with 1) what you have and 2)what is your expectation , then response is faster. For...
View ArticleSelecting a column based on DATE along with GROUP BY - response (1) by Raja_KT
Hi Sagar, You mean to say you dont want this way below? select abc.u_id as gid,dt.mid from (SELECT MAX(date1) over (partition by gid order by gid) dt1,gid,mid,u_id FROM ABC) dt, abc where...
View ArticleSelecting a column based on DATE along with GROUP BY - response (2) by...
Hi, You can try this SELECT (SEL UID FROM TD3471.TEMP WHERE dt=(SEL MAX(dt) FROM TD3471.TEMP )) AS GID, MID FROM TD3471.TEMP ORDER BY 2;
View ArticleNeed guidance - forum topic by HateOra
Hi, I have a bteq job which is running MERGE on fact table. there is a JI bult on my fatc table. while executing the MERGE suddenly the query started failing with spool space error, even thogh there...
View ArticleNeed help getting rid of parcel length error in BTEQ script - response (4) by...
Hello again, Thank you for the feedback. Out of an abundance of curiosity, I tried both of Dieter ‘s suggestions. First, I tried changing the .IMPORT to VARTEXT as recommended; I must confess I was not...
View ArticleNeed guidance - response (1) by Raja_KT
It is strange. Could you run Explain merge into and you can investigate. Also,since you run bteq, maybe you can run an os command with say 'select before' before the merge stmt and after the merge...
View ArticleNeed help getting rid of parcel length error in BTEQ script - response (5) by...
Hi Mike, yes, REPEAT repeats the following SQL-command. In your case it run the ";" 230 times :-) .REPEAT * EXECUTE DBADMIN.ShowDatabase (:DatabaseName); There's "=n" which repeats the previous SQL...
View ArticleNeed guidance - response (2) by dnoeth
Can you share the definition of both fact tabe and JI, the MERGE and explain? What's the spool size assigned to your load user?
View Articlesum of amout for the date falling in the respective month i.e months wise sum...
Peiter, Are you looking for something similar to following? Select cast((order_date(FORMAT 'MM-YYYY')) as char(7)) as Cal_Month, Sum(OPP.Expected_Amount) From Opportunity OPP Inner Join Sales SL On...
View ArticleDay Of Week or Week-Ending Function? - response (8) by jjx5nc
This works for computing a Friday week ending date: CASE WHEN ((any_date - (000101 (DATE))) + 1) MOD 7 = 6 THEN any_date + 6 ELSE any_date + (6 - (((any_date - (000101 (DATE))) + 1) MOD 7 + 1))...
View ArticleNeed help getting rid of parcel length error in BTEQ script - response (6) by...
Hi Dieter, Thank you for clarifying the usage of REPEAT. Moving the statement up to precede the EXECUTE did the trick. Here is a copy of the final BTEQ script, which ran flawlessly and created...
View ArticleChange DBS Language support mode - forum topic by sk73
Hello Friends, Recently, I did a restore on my VM, but, during sysinit, I enabled Japanese support. How do we change the DBS Language support mode? Currently, it is Japanese. I want to make it...
View ArticleChange DBS Language support mode - response (1) by tomnolan
Changing the Language Support Mode requires a sysinit. That's the only way.
View Article