Joining tables on fields with varying lengths - response (3) by pjh30
Thank you gentlemen. I was able to get the following to work: INNER JOIN TABLE B ON CAST((SUBSTR('00000000000000000000',1,20-CHARS(TRIM(A.ACCT_NB)))||A.ACCT_NB) AS CHAR(50)) = B.ACCT_NUM Perhaps the...
View ArticleSpool space issue - response (3) by M.Saeed Khurram
HI, If you are talking about the sequence of joins execution, Teradata optmizer decides how to and in which sequence process the joins. In order to avoid spool space problem you can check and move any...
View ArticleJoining tables on fields with varying lengths - response (4) by dnoeth
I would strongly recommend to change the join-condition to a less resource-consuming and easier-to-understand INNER JOIN TABLE B ON A.ACCT_NB = TRIM(LEADIMNG '0' FROM B.ACCT_NUM)In fact, both are bad...
View ArticleEXPLAIN IN XML Plan Truncated in JDBC in Teradata 13.10 - forum topic by...
Hi, The EXPLAIN IN XML Plan generated for large queries is truncated using JDBC in Teradata 13.10. Note, using Teradata SQL Assistant and an ODBC connection the full plan is successfully returned. Has...
View ArticleJoining tables on fields with varying lengths - response (5) by pjh30
Yeah, I agree that the the method you just posted is the best/most efficient approach and I changed my code to that. I am an end user, so unfortunately I have no control over the data or the tables....
View ArticleQuestion on Stored procedure - forum topic by pmehrotr
This is my first attempt to write a stored procedure in Teradata. I am getting an authorization error: The user does not have CREATE PROCEDURE access to database pmehrotr I presume a user who wants...
View ArticleJoining tables on fields with varying lengths - response (6) by Raja_KT
I was about to commend on the modeling side. At least , this should have been caught in pdm or even in design phase. Cheers, Raja
View ArticleIndex Cocepts in Teradata - response (10) by Raja_KT
Hi, Which one : Inner join, outer join(left, right,full), cross join or product join or are you talking about these JIs? Join indexes(Single table join index,multitables join index,aggregate join...
View ArticleQuestion on Stored procedure - response (1) by Raja_KT
Hi, Did you check dbc.allrights table? SELECT UserName FROM dbc.AllRights WHERE DatabaseName ='yourdb...' AND TableName ='....' AND AccessRight = '..' GRANT create ,....EXECUTE,.... PROCEDURE ON...
View ArticleSpool space issue - response (4) by princykoshy
which part is executed first? conditions in "where" clause or joins in "from" clause, when the queries are written in ANSI92 stnds.
View ArticleWITH RECURSIVE Syntax - response (2) by sriemvee
Hi, i have used a similar with recursive function at my work and got the desired results. The with recursive funtion returns values for me when i used it in an ETL tool. But am not able to view the...
View ArticleSpool space issue - response (5) by dnoeth
According to Standard SQL FROM is processed before WHERE in theory, but all optimizers try to push the WHERE-conditions into the join, thus they're are practically done before or during the join (this...
View ArticleQuestion on Stored procedure - response (2) by dnoeth
Q1: of course. CREATE PROCEDURE is not part of the default rights granted to a user, it must be granted explicitly by the DBA. Q2: of course not. There are seperate rights for all CREATEs Q3: yes,...
View ArticleLock row for access : In insert-Select - response (6) by...
Hi , I was trying -- Locking View for Access, inplace of Locking Table for Access(when i was inserting data from a view, which was taking data from a table). Interestingly, it went through. Now my...
View ArticleLock row for access : In insert-Select - response (7) by dnoeth
Hi Binayak, as there's no actual lock on a view it's always passed to the table. Simply Explain your query.
View ArticleRegarding TVS Vproc - response (3) by Raja_KT
You are welcome :). Just to add to the above point, it adds flexibility to configuration. Cheers, Raja
View Articlejoining two tables using SUBSTR - response (2) by Lalithachintha
Thank you Saeed Khurram..The code is working...
View ArticleSpool space issue - response (6) by princykoshy
these queries are triggered from business objects reports, which uses a generic id, that has a high spool allocated. there aren't many users running these reports simultaneously. The query has around...
View ArticleSpool space issue - response (7) by dnoeth
You should check the spool usage of an individual query based on QueryLog. Those functional users like BO normally get an insane amount of spool to be able to run multiple reports in parallel. What...
View Article