Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
3Activity
0 of .
Results for:
No results containing your search query
P. 1
Teradata

Teradata

Ratings: (0)|Views: 443|Likes:
Published by manishgtk

More info:

Categories:Types, Business/Law
Published by: manishgtk on Jul 09, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as RTF, PDF, TXT or read online from Scribd
See more
See less

10/25/2012

pdf

text

original

 
http://sql-quiz.sampleaptitudequestions.com/sql7.asp
What is explain in teradata?The EXPLAIN facility is a teradata extension that provides you with an "ENGLISH" translation of the steps choosen by the optimizer to execute an SQL statement.It may be used oin any validteradata database with a preface called "EXPLAIN".<br><br>The following is an example:-<br><br> EXPLAIN select last_name,first_name FROM employees;<br><br>The EXPLAINparses the SQL statement but does not execute it.<br><br>This provides the designer with an"execution stratergy".<br><br>The execution stratergy provides what an optimizer does but notwhy it choses them.<br><br>The EXPLAIN facility is used to analyze all joins and complexqueries.
Delete Duplicate Rows From an Oracle TableDELETE FROM our_table WHERE rowid not in (SELECT MIN(rowid) FROM our_table GROUPBY column1, column2, column3... ;
When do you use WHERE clause and when do you use HAVING clause?The WHERE clause specifies the criteria which individual records must meet to be selcted by aquery. It can be used without the GROUP BY clause. The HAVING clause cannot be usedwithout the GROUP BY clause. The WHERE clause cannot contain aggregate functions. TheHAVING clause can contain aggregate functions. The WHERE clause selects rows beforegrouping. The HAVING clause selects rows after grouping.
How to find out nth highest salary from Employee table?SELECT DISTINCT (a.Salary) FROM [Employee] a WHERE nth = (SELECT COUNT (DISTINCT(b.Salary)) FROM [Employee] b WHERE a.Salary <=b.Salary );
What is difference between TRUNCATE & DELETEThe Main Difference Between DELETE & TRUNCATE Are :-[1] DELETE - is a DML Command & TRUNCATE - is a DDL Command[2] After DELETE - can rollback the Records & After TRUNATE - cannot rollback the records[3] In DELETE Command you can give the conditions in WHERE Clause & In TRUNCATE youcannot give conditions[4] After using DELETE Command The memory will be occupied till the user does not giveROLLBACK or COMMIT & After using TRUNCATE Command The memory realeasedimmediately
select top three max salaried Employee from Employee table ?SELECT DISTINCT (a.Salary) FROM [Employee] a WHERE 4 > (SELECT COUNT (DISTINCT
 
(b.Salary)) FROM [Employee] b WHERE a.Salary <=b.Salary )
how to delete duplicate records from Teradata table?delete from Employee where ROWID = ( select ROWID from ( SELECT ROWID,ROW_NUMBER() OVER ( PARTITION BY Employeeid,Salary ORDER BY Employeeid) ASRownum,Employeeid,Salary FROM Employee ) A where A.rownum > 1 )
When do you use WHERE clause and when do you use HAVING clause?The WHERE clause specifies the criteria which individual records must meet to be selcted by aquery. It can be used without the GROUP BY clause. The HAVING clause cannot be usedwithout the GROUP BY clause. The WHERE clause cannot contain aggregate functions. TheHAVING clause can contain aggregate functions. The WHERE clause selects rows beforegrouping. The HAVING clause selects rows after grouping.
Which is more faster - IN or EXISTS?EXISTS is more faster than IN because EXISTS returns a Boolean value whereas IN returns avalue.
Fload, Mload and error tablesHow many error tables are there in fload and what are their significance/use?Can we see the data of error tables?How many error tables are their in mload and what is there use?When mload job fails, can we access mload tables? If yes then how?Fload uses 2 error tablesError table 1: where format of data is not correct.Error table 2: violations of UPIError table1: Contains one row for each row which failed to be loaded due toconstraint violations or translation errorsError table2: For non-duplicate rows captures those rows that cause a UPIduplicate violation.Mload also uses 2 error tables (ET and UV), 1 work table and 1 log table1. ET TABLE - Data error MultiLoad uses the ET table, also called the Acquisition Phase error table, to store data errorsfound during the acquisition phase of a MultiLoad import task.2. UV TABLE - UPI violationsMultiLoad uses the UV table, also called the Application Phase error table, to store data errorsfound during the application phase of a MultiLoad import or delete task3. WORK TABLE - WTMload loads the selected records in the work table4. LOG TABLEA log table maintains record of all checkpoints related to the load job, it is essential/madatory tospecify a log table in mload job. This table will be useful in case you have a job abort or restartdue to any reason.
CAN ANY ONE SEND ME THE CODE FOR THE BELOW1).REMOVE '_' FROM TELE PHONE "323-237-2323" AND SHOULDDISPLAY OUT PUT AS "323237232"2). NEED TO ONLY "COMPANY.COM" FROM EMAILFILED "TEST@COMPANY.COM"
 
Use trim(columnname,'_','a') to remove the '-' values fromthe columnssubstr('TEST@COMPANY.COM',instr('TEST@COMPANY.COM','@')+1)
What's the difference between dimension tables and fact tables?These two table types are used in what we call star schemas; these are used for analysis rather than capturing transactions. What is the difference between dimension tables and fact tables?One very literal (and initially unhelpful) answer is that fact tables store facts. Happily, thisdefinition is only unhelpful until we add an example.Suppose our company sells products to customers. Every sale is a fact that happens within our company and the fact table is used to record these facts.Fact tableTimeID ProductID CustomerID Unit Sold4 17 2 18 21 3 28 4 1 1Now we can add a dimension table about customers:Dimension table: CustomersCustomerID Name Gender Income Education Region1 Brian Edge M 2 3 42 Fred Smith M 3 5 13 Sally Jones F 1 7 3By following the links we can see that, for example, row 2 in the fact table records the fact thatcustomer 3 (Sally Jones) bought two items on day 8. And, in a complete example, we would alsohave a product table and a time table so that we know what she bought and exactly when.The fact table lists events that happen in our company (or at least the events that we want toanalyze). The dimension tables list the factors (Customer, Time, Product) by which we want toanalyze the data.Given this fact table and these three dimension tables, we can ask questions like: How manydiamond rings have we sold to female customers in region 4 during the first quarter of 2008?In other words, the difference between dimension tables and fact tables is that fact tables hold thedata we want to analyze and the dimension tables hold the information necessary to allow us toquery it.

Activity (3)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
dharmendard liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->