35 | 16 Aug 2016 @ 06:01 PDT | Database | Reply | SQL query needed---Urgent | Hi Hope this helps.
create table comparedata (
mnth date format 'mmmyy',
x DECIMAL(18,2),
y DECIMAL(18,2)
) primary index (mnth);
INSERT INTO comparedata values ('A... |
34 | 15 Aug 2016 @ 06:07 PDT | Database | Reply | Capturing MAX marks for Each Student when the MArks are in Columns | Worked as a charm! Thanks Dieter! :-D
|
33 | 15 Aug 2016 @ 04:18 PDT | Database | Reply | Capturing MAX marks for Each Student when the MArks are in Columns | Thank you Dieter!
I did check using dbc.FunctionsV for the function 'GREATEST', and I got one row in result set:
Databasename: SYSLIB
FunctionName: GREATEST
SpecificName... |
32 | 12 Aug 2016 @ 07:00 PDT | Database | Reply | Capturing MAX marks for Each Student when the MArks are in Columns | I checked for any other UDF with the same name and I found just one function with this name.
I issued the folloing query to check if there are any other functions with the same name and I ... |
31 | 12 Aug 2016 @ 04:22 PDT | Database | Reply | Capturing MAX marks for Each Student when the MArks are in Columns | I am using TD14.10 release and SELECT GREATEST (50,100,70) throws an error in TERA Mode. The error I got was: "SELECT Failed. 9881: Function 'greatest' called with an invalid number or... |
30 | 22 Jul 2016 @ 07:12 PDT | Database | Reply | How to calculate minimum & maximum values based on a column only if the records are continuous | Thanks Carlos! Appreciate it.
|
29 | 21 Jul 2016 @ 05:41 PDT | Database | Reply | How to calculate minimum & maximum values based on a column only if the records are continuous | I was wondering the same thing. How do we identify "continuity" of records in Teradata. It does not make sense.
May be Hanu can explain his requirements and how he came across such a req... |
28 | 21 Jul 2016 @ 03:18 PDT | Database | Reply | How to calculate minimum & maximum values based on a column only if the records are continuous | Hi Carlos,
I think his requirement is different. PERIOD will not be able solve this problem. He needs to partition the first two rows (WHERE Col2 = 100) and take the minimum and maximum date from ... |
27 | 17 Jun 2016 @ 06:54 PDT | Database | Reply | Transposing Rows to Columns | Thank you Dieter!
This query is really helpful.
|
26 | 16 Jun 2016 @ 02:27 PDT | Database | Reply | How to parametrize WHERE IN clause in stored procedure? | Thank you Dieter!
It worked.
Copying my working code here for reference:
REPLACE PROCEDURE mydb.mw_test_proc_k222 (
IN varList VARCHAR(200),
OUT valOut SMALLINT
)
BEGIN
SE... |
25 | 15 Jun 2016 @ 09:38 PDT | Database | Reply | How to parametrize WHERE IN clause in stored procedure? | Hi Dieter,
I too am facing a similar situation where I need to pass a couple of Strings as parameter in WHERE clause in a SP.
I am not able to get the desired result with the SP I have.
REPLAC... |
24 | 13 Jun 2016 @ 09:32 PDT | Database | Reply | Table data in Alphabetical Column Name order in SQLA | Hi Nagendra,
I don't think there is any straight forward query to achieve this. However, you can try this:
CREATE MULTISET TABLE YourDBName.Tbl_ColOrderedQuery (
ColName VARCHAR(50),
Co... |
23 | 13 Jun 2016 @ 04:28 PDT | Database | Reply | Current date as column name in select query | Yes, it works fine. You will just need to enclose the Alias in double quotes:
SELECT
CASE WHEN ... THEN 1
ELSE 0
END AS "CURRENT_DATE"
FROM DB_Na... |
22 | 07 Apr 2016 @ 07:50 PDT | Database | Reply | Identifying tables requiring compression | Need help !
Any sugesstions are welcome.
|
21 | 07 Apr 2016 @ 03:28 PDT | Database | Topic | Identifying tables requiring compression | Hi All,
I have come across a requirement where we need to identify all the tables, preferably the large ones, requiring compression. We are aiming to improve performance by compressing som... |
20 | 31 Mar 2016 @ 06:42 PDT | UDA | Reply | convert varchar to timestamp | Thanks Dieter!
Faced more issues with it.
Here is what I was able to finally do with my data to get it correct. Would really appreciate if you could tell me any better ways.
The date field here ... |
19 | 30 Mar 2016 @ 08:31 PDT | UDA | Reply | convert varchar to timestamp | Hi All,
Need help with the above issue.
|
18 | 30 Mar 2016 @ 06:59 PDT | UDA | Reply | convert varchar to timestamp |
select cast('11/12/2013 00:00:00' as timestamp(0) format 'dd/mm/yyyybhh:mi:ss') as req_time;
The above query works fine. But my data has dates like the below too, which produces ... |
17 | 22 Mar 2016 @ 06:49 PDT | Database | Reply | Transposing Rows to Columns | Thanks Chinmay and Sakthi!
Query by Chinmay is working indeed, many thanks!
Cheers!
|
16 | 22 Mar 2016 @ 02:34 PDT | Database | Reply | Transposing Rows to Columns | Hi Sakthi,
Thanks for responding!
This is my actual data. I am trying out some code challenges to enhance my skills and that is where I came across this question.
The query which you have here i... |
15 | 22 Mar 2016 @ 02:11 PDT | Database | Reply | Transposing Rows to Columns | Could not do it in Teradata.
However in SQL Server 2008, I found PIVOT function which worked and I got my results. However, I need it in Teradata. Can anyone please help me?
I have been trying to... |
14 | 21 Mar 2016 @ 05:03 PDT | Database | Topic | Transposing Rows to Columns | Hi All,
I know there are topics in transposing data and they have been answered. Howver, due to my lack of experience in Teradata, I was unable to use them. Hence I am posting my query in a new to... |
13 | 12 Nov 2014 @ 02:00 PST | Database | Reply | How to reduce skew factor on stage tables with NoPI? | Todd, I have one doubt though. The number of AMPs we have is 72.
Should not the data be distributed "almost" evenly?
|
12 | 12 Nov 2014 @ 01:45 PST | Database | Reply | How to reduce skew factor on stage tables with NoPI? | Thank you Todd. Appreciate your help.
|
11 | 12 Nov 2014 @ 01:32 PST | Database | Topic | Skew Factor of small tables | Hi,
I have a table with 75 rows. The table is defined as MULTISET table with UNIQUE PRIMARY INDEX.
When I calculated the skew factor, it came close to 77.
If the table is created... |