2028 | 05 Jul 2013 @ 01:30 PDT | Database | Reply | Stored Procedures - Use dynamic cursor for any table | Sorry, i don't get it.
Could you rephrase your question?
Is there any relation to the original question?
Dieter
|
2027 | 05 Jul 2013 @ 01:14 PDT | Database | Reply | CASESPECIFIC What is its purpose? | To get a case insensitive result both operands must be NOT CASESPECIFIC.
Any literal in an ANSI mode session is CASESPECIFIC by default, but NOT CS in a Teradata session.
To get the desired resul... |
2026 | 01 Jul 2013 @ 12:54 PDT | General | Reply | Casting in case statement | You need to cast only the date not the case:
CASE WHEN OFR_STRT_DT='1900-01-01' THEN ‘NA’ ELSE CAST (OFR_STRT_DT as varchar (10) ) END as OFR... |
2025 | 01 Jul 2013 @ 06:21 PDT | Database | Reply | SQL Assistant inserts double quotes | Hi Nolan,
i don't think that SQLA will add quotes, this is probably done by Excel itself.
Similar when i cut&paste from SQLA to Excel, in some cases it's double quoting the query.
&n... |
2024 | 01 Jul 2013 @ 06:13 PDT | Database | Reply | Sequnce generated column in Volatile table | Hi Bala,
are those inserts single row or insert/selects?
Dieter
|
2023 | 01 Jul 2013 @ 06:12 PDT | Tools | Reply | TPT - HELP COMMAND EXECUTION. | AFAIK you can't do HELP in TPT.
But why do you think you need it, it's just informational output?
Dieter
|
2022 | 01 Jul 2013 @ 06:10 PDT | Database | Reply | How to get columns in collect stats | Depends on your release:
For TD14 you get it from dbc.StatsV, before it's in various dbc views (column/index/multicolumn-StatsV) or better try my stats query to get more details:
http://devel... |
2021 | 01 Jul 2013 @ 05:52 PDT | Database | Reply | MR and MS access rights | They are used to control who can use the PM/API commands MONITOR SESSION/RESOURCE.
Check the "Application Programming Reference" manual for details.
Dieter
|
2020 | 01 Jul 2013 @ 05:44 PDT | Database | Reply | Teradata SQL? | Of course:
SELECT MONTH_BGN_DATE
FROM MONTHDAY_DIM
WHERE MONTHDAY_KEY = ADD_MONTHS(DATE , -4)
OR MONTHDAY_KEY = ADD_MONTHS(DATE , -3)
If these are your actual queries, the 2nd closing pa... |
2019 | 01 Jul 2013 @ 05:41 PDT | Database | Reply | Collecting statistics | Hi Mahesh,
no statistics will change the plan for this query, so you don't need any statistic at all.
When performance is bad it might be due large spool usage.
You might try MINUS ALL inste... |
2018 | 01 Jul 2013 @ 05:37 PDT | Database | Reply | Find position of a character in a string | What's your TD release?
In TD14 there's INSTR to find the nth occurence of a string or better STRTOK to extract the nth token from a delimited string.
Previously you might check if INSTR ... |
2017 | 01 Jul 2013 @ 05:32 PDT | Database | Reply | Update statement with left outer join in from clause. | Hi Harpreet,
is this an actually update statement? (SQL Server?)
There's no condition to join to CDD_Today.
You might rewrite it:
use a Correlated Subquery
UPDATE St... |
2016 | 01 Jul 2013 @ 02:56 PDT | Tools | Reply | ODBC datetime format 'III' causing timestamp to time conversion to fail? | It's the default formats for DATE/TIME/TIMESTAMP (in that order) and indicates INTEGER or ANSI.
For DATEs both is ok (similar to SET SESSION DATEFORMAT), but for TIME and TIMESTAMP ANSI is pre... |
2015 | 01 Jul 2013 @ 02:41 PDT | Database | Reply | qualify rank() over (partition) - question | Did you try the query i posted, this should work as expected.
But performnace on a 5 billion rows table will be probably poor when you actually need all those 100 columns (all data will be put in ... |
2014 | 01 Jul 2013 @ 02:37 PDT | Teradata Studio | Reply | Unable To Create Stored Procedure Using JDBC !! | Hi Rajeev,
in BTEQ you have to put the source code of the SP in a file and then use .COMPILE
But in Studio this should run as-is, 5526 indicates there were errors or warnings during compilation, ... |
2013 | 01 Jul 2013 @ 02:02 PDT | Database | Reply | Implicit conversion of Integer to VARCHAR | Hi Nishant,
"group_amps" during an all-AMPs step usually means the optimizer assumes that less than 50% of the AMPs in the system will actually do some work, but the actual AMPs are not ... |
2012 | 01 Jul 2013 @ 01:49 PDT | Database | Reply | How to create records from a defined range | Simply use two Derived Tables producing the required numbers and then cross join them.
Dieter
|
2011 | 27 Jun 2013 @ 11:41 PDT | Connectivity | Reply | How to Get the Session info (example: session number/id) when using Teradata .NET Provider. | Hi Shiv,
i don't know about the .Net Provider, but you can always submit a simple "SELECT SESSION;"
Dieter
|
2010 | 27 Jun 2013 @ 11:39 PDT | Database | Reply | qualify rank() over (partition) - question | It's hard to guess without any details about the rules you want to implement.
select * from tab
qualify rank() over (partition by inr, rd order by dt desc, ct1 desc, ct2 desc) = 1
... |
2009 | 26 Jun 2013 @ 09:53 PDT | Database | Reply | Updating a table through view | Hi Mahesh,
i don't know what caused this, are you 100% shure the create view/grant/select all refernce the correct objects in the correct database?
When the base table of a view is dropped th... |
2008 | 26 Jun 2013 @ 09:38 PDT | Database | Reply | Timestamp format on teradata retrieval | Your syntax is wrong, within a Create Table it's
trns_dt timestamp(0) format 'MM/DD/YYYYBHH:MI'
Dieter
|
2007 | 25 Jun 2013 @ 11:57 PDT | General | Reply | calculate recency & absolute deviation for a dataset | Nest the aggregate in an OLAP function:
SELECT
customerid,
MAX(purchasedate) - MIN(purchasedate),
MAX(MAX(purchasedate)) OVER () - MAX(purchasedate)
FROM tab
GROUP BY 1
Dieter
... |
2006 | 25 Jun 2013 @ 11:52 PDT | Database | Reply | Is there any way to handle single digit's in date? | Simply add a comma ;-)
SEL TO_TIMESTAMP('11/04/2011 11:26:35.345', 'MM/DD/YYYY hh:mi:ss.FF3')
Dieter
|
2005 | 25 Jun 2013 @ 02:47 PDT | Database | Reply | Improve performance of like queries. |
WHERE POSITION(V_FIRST_NM IN FIRST_NM) > 0
or
WHERE SUBSTRING(FIRST_NM FROM 1 FOR CHAR_LENGTH(V_FIRST_NM) = V_FIRST_NM
Dieter
|
2004 | 25 Jun 2013 @ 02:45 PDT | Database | Reply | DBQL Metrics | I/O is the number of logical disk I/Os not the number of records. The esitmated vs. actual number of records is found in QryLogSteps.
In your case the high count might indicate a Full Table Scan r... |