17 | 27 Nov 2012 @ 01:18 PST | Database | Reply | Spool Space error...please help to optimize | Try the below query:
SELECT DISTINCT
A.USER_ID,
C.SUPER_NM_LVL2 AS SUP,
C.SUPER_NM_LVL1 AS AD,
DIR.SUPER_NM_LVL2 AS DIR,
A.ACTIVITY_DT,
B.MTN,
A.ACCT_NUM,
A.PPLAN_CD_CURR
FROM (SE... |
16 | 11 Nov 2011 @ 01:43 PST | Database | Topic | How to delete the record from the base table with foreign key mapping |
Hi,
Consider a table A with 3 columns. 1st column is the primary key, 2nd column is a foreign key mapped from table B. Now if some deletions happen in table A, certainly some... |
15 | 03 Oct 2011 @ 02:53 PDT | Database | Reply | Date logic for SQL |
If I am not wrong the Last Date for all the previous employees will be holding some value since they are no longer part of the company. For the current and future employees last date will be nul... |
14 | 03 Oct 2011 @ 02:43 PDT | Database | Topic | Deleting data from both Parent and underlying foreign key related tables at same time |
Hi,
Is there any way to delete data from parent as well as the underlying tables which are assosiated with foreign key relation??
|
13 | 22 Sep 2011 @ 11:52 PDT | General | Reply | BTEQ Error Handling in Unix |
You can define a variable to capture the return code of any command/job executed just after calling it.
You can add below code after calling bteq:
export rc=$?
here rc captures the r... |
12 | 22 Sep 2011 @ 09:54 PDT | Database | Reply | Any advice to increase efficiency of my query? |
Yes, I agree with Manik. If you are doing a join on Huge table, it is better to write a subquery fetching only the required columns on unique combination. Or creating a derived table from it. Th... |
11 | 19 Sep 2011 @ 05:24 PDT | Jobs | Reply | Teradata DBA with good knowledge of ETL and shell scripts |
Please mention which location and which company?
I have good experience in ETL and Shell scripting.
|
10 | 19 Sep 2011 @ 04:22 PDT | Database | Reply | Generating Test Data in Teradata |
You can do these but you need to have all the test data for the required fields in a file.
You can do these through BTEQ IMPORT or through Teradata SQL Assistant by using the import option.
... |
9 | 19 Sep 2011 @ 04:18 PDT | Database | Reply | Takes up cpu! |
One way is to put subqueries to pull the required fields data from the table in hte FROM clause instead of joining the entire table. You have 23 tables being joined and there might be some tabls... |
8 | 19 Sep 2011 @ 04:08 PDT | Database | Reply | Which of the following query will be good in performance?? |
Both the given queries perform different operations.
In your first query you are extracting chng_flag value based on the data obtained after joining the 2 tables. But where is this operation... |
7 | 19 Sep 2011 @ 04:08 PDT | Database | Reply | Qry very sloww! |
Here you are doing a select * on whole query output. Since only first table it being left outer joined with all other tables, after the first left outer join it will actually try to do a cartesi... |
6 | 19 Sep 2011 @ 03:39 PDT | Database | Topic | How to get all the dbc.% tables in Teradata |
Is there any way to know what are all the dbc.% tables present in Teradata.
I know only few dbc tables in teradata. Is there anyway to know this?
|
5 | 19 Sep 2011 @ 03:29 PDT | Database | Reply | Help with Bteq IMPORT |
Better option would be to run the test file in loop (in the platform on which you are triggering bteq) and call bteq import inside the loop.
|
4 | 18 Sep 2011 @ 11:29 PDT | Database | Reply | Testing environment changes |
What is the platform you are using to trgger teradata? Is it Unix or someting else?
If unix you have a parameter 'hostname' which gives you the environment server on which it is trig... |
3 | 18 Sep 2011 @ 11:25 PDT | Database | Reply | named subqueries in Teradata? |
You can give names in Teradata for subqueries or columns in select clause, called as Alias Names.
Query syntax is something like this:
sel a.fld1,b.fld2 from
(sel * from tbl1) a,
... |
2 | 17 Sep 2011 @ 02:26 PDT | Database | Reply | Adding a date filter |
Query would look something like this:
sel New_Date,
Sum(CASE WHEN Offer_1 = 'Y' THEN 1 ELSE 0 END) as Offer1,
Sum(CASE WHEN Offer_2 = 'Y' THEN 1 ... |
1 | 17 Sep 2011 @ 02:23 PDT | Database | Reply | Dynamic Table creation |
Whatever may be the number of columns user selects but is it not predefined like user will be able to see only these number columns on the screen from where he has to select some n number of col... |