Free TE0-122 Exam Braindumps (page: 18)

Page 17 of 38

Assume that all formatting symbols are set to default and that the column salary_amount is defined as DECIMAL (10, 2).

Given the following statement:
SELECT salary_amount * (-1) (FORMAT '-Z(I)BN') FROM ........

What is a valid result of this statement?

  1. -100000USD
  2. -100000US Dollars
  3. -100000 USD
  4. -100000 US Dollars

Answer(s): C



The transtime column in the trans table is defined as the following:

transtimeTIMESTAMP(6) WITH TIME ZONE NOT NULL
In the trans table, the column values are the following:
transtime _____________________
2009-03-16 11:48:32.120000+08:00
2008-09-23 18:14:46.780000+02:00
2009-06-09 09:23:01.340000-06:00
2009-01-30 02:37:11.670000+11:00
2009-04-19 21:25:55.220000-09:00

The values in the transtime column need to be presented in a report so that the column values look like this:

transdate_
2008-09-24
2009-01-29
2009-03-16
2009-04-20
2009-06-09

Which SQL statement would provide the desired result when the current session time zone is
INTERVAL '08:00' HOUR TO MINUTE?

  1. SELECTtranstime AS DATE FROM trans ORDER BY 1;
  2. SELECTtranstime AS transdate FROM trans ORDER BY 1;
  3. SELECT CAST(transtime AS transdate) FROM trans ORDER BY 1;
  4. SELECT CAST(transtime AS DATE) transdate FROM trans ORDER BY 1;

Answer(s): A



Given the following:

Job Description Name Salary Amount
Programmer Smithson, John 55, 000
Salesman Germain, Frank 75, 000
Carpenter Johnson, Mark 40, 000
The manager of the Marketing Department noticed that the Name results on the monthly reports are being truncated as Smith, Germa, Johns. The manager asked the IT Department to investigate this issue.

Which function caused this problem?

  1. TRIM(Name)
  2. POSITION(Name, 5)
  3. CHAR_LENGTH(Name, 5)
  4. CAST(Name AS CHAR(5))
  5. TRIM(TRAILING FROM Name)

Answer(s): C



Given the following statement:

SELECT *
FROM sales s LEFT JOIN prod p
ON s.prdid = p.prdid FULL JOIN customer c
ON s.custid = c.custid;

Which two statements provide the same result as the statement above? (Choose two.)

  1. SELECT *
    FROM (sales s LEFT JOIN prod p ON s.prdid = p.prdid)
    FULL OUTER JOIN customer c ON s.custid = c.custid;
  2. SELECT *
    FROM sales s LEFT JOIN prod p ON s.prdid = p.prdid
    JOIN customer c ON s.custid = c.custid;
  3. SELECT s.*
    , p.*
    , c.*
    FROM customer c FULL JOIN prod p
    RIGHT OUTER JOIN sales s ON p.prdid = s.prdid
    ON c.custid = s.custid;
  4. SELECT s.*
    , p.*
    , c.*
    FROM prod p LEFT JOIN sales s ON p.prdid = s.prdid
    FULL JOIN customer c ON s.custid = c.custid;

Answer(s): B,D






Post your Comments and Discuss TeraData TE0-122 exam with other Community members:

TE0-122 Discussions & Posts