4603 | 18 Aug 2016 @ 07:44 PDT | UDA | Reply | CONVERT and DATEDIFF in Teradata | For difference in days it should be SELECT CURRENT_DATE - DATE '2016-08-20'
|
4602 | 18 Aug 2016 @ 03:23 PDT | Database | Reply | Teradata Query-URGENT | Whenever I read URGENT I tend to fall into tranquilo, mañana mode :-)
QUALIFY ROW_NUMBER() OVER (PATTITION whatever ORDER BY whatever) = 1
|
4601 | 18 Aug 2016 @ 03:15 PDT | Database | Reply | SQL Error on 'Create Table' in Terdata SQL Assistant | Simply read the error message:
CREATE TABLE Failed. [3707] Syntax error, expected something like a 'LOG' keyword or a 'QUEUE' keyword between ',' and the 'CHEC... |
4600 | 18 Aug 2016 @ 03:10 PDT | Teradata Debugger | Reply | Fetching the last date of the current Quarter !!! | Your first calculation doesn't return the current quarter correctly, e.g. in July it will return 2016-04-01 instead of 2016-07-01.
-- begin of current quarter
trunc(current_date, 'q'... |
4599 | 18 Aug 2016 @ 03:03 PDT | Teradata Database on VMWare | Reply | How to change i.p of a TD VM Image | It's Network Settings, not Network Proxy :-)
You must modify eth0 (lo = localhost, you can't change that), this is the only entry, listed as Ethernet Network Card.
|
4598 | 17 Aug 2016 @ 07:38 PDT | Database | Reply | terdata query. | @GTeradata:
You probably run an older version of Teradate where you need to add the column list like WITH cte (col1,col2,.., rn, pairs) AS
@Kuldeepg92:
There's no way to avoid p... |
4597 | 17 Aug 2016 @ 05:52 PDT | Teradata Studio | Reply | How to solve the error "Creating connections to local Teradata Database has encountered a problem" ? | There's a link on the download site "how to install and configure Teradata Express for VMware." :-)
http://downloads.teradata.com/node/415
|
4596 | 17 Aug 2016 @ 03:12 PDT | Teradata Database on VMWare | Reply | How to change i.p of a TD VM Image | You do the standard (Suse) Linux way:
Computer -> Control Center -> Network Settings -> Edit
|
4595 | 17 Aug 2016 @ 03:09 PDT | Database | Reply | Substitute for "LIKE" in teradata | Standard SQL LIKE only supports _ & %, using ranges is characters is an extension (e.g. SQL Server).
What did you try?
There's no regexp_like in Teradata, but regexp_similar works... |
4594 | 17 Aug 2016 @ 03:04 PDT | Teradata Studio | Reply | How to solve the error "Creating connections to local Teradata Database has encountered a problem" ? | Well, the error message is self-explaining:
The UserId, Password or Account is invalid.
You used a wrong username or password.
|
4593 | 16 Aug 2016 @ 10:02 PDT | Database | Reply | Datatype of a Column of a View | All literals default to Unicode character set, thus the CASE results in a Unicode string.
dbc.ColumnsV returns the ColumnLength as physical size in bytes, for Unicode (CharType=2) you must di... |
4592 | 16 Aug 2016 @ 09:38 PDT | Connectivity | Reply | CLI CONNECTION USING HOSTS NAME INSTEAD OF IP ADDR. - EXTENDED TIME FOR LOGON | You simply add a new line SET TERACLI=1 to the batch file before calling BTEQ.
To modify environment variables on a user/system level, see
http://superuser.com/questions/949560/how-d... |
4591 | 16 Aug 2016 @ 09:13 PDT | Database | Reply | terdata query. | You can assign a row_number sorted by gender and split in two groups.
Assuming you want to pair randomly:
WITH cte AS
(
SELECT
dt.*,
ROW_NUMBER() OVER (ORDER BY gender, id)... |
4590 | 15 Aug 2016 @ 05:20 PDT | Connectivity | Reply | CLI CONNECTION USING HOSTS NAME INSTEAD OF IP ADDR. - EXTENDED TIME FOR LOGON | The delay is caused by the lookup to find an ip-address for teracli., the COP discovery:
BTEQ/CLI adds COP1 to the hostname and resolves it to an p-address, if successful the number is increased t... |
4589 | 15 Aug 2016 @ 04:41 PDT | Database | Reply | Capturing MAX marks for Each Student when the MArks are in Columns | You should find 9 UDFs in syslib and 10 in td_sysfnlib with the name GREATEST (but different specific names).
The functions in syslib are not the built-in functions (those UDFs have been installed... |
4588 | 14 Aug 2016 @ 01:03 PDT | Database | Reply | Bteq import the output characters got cut off by 2 | #: When you define IMPORT VARTEXT all fields must be defined a VARCHAR
#2: You need to quote the filename when you want to add command options:
#3: You better add PACK to speed up the import
&nb... |
4587 | 14 Aug 2016 @ 03:12 PDT | Tools | Reply | Understanding teradata sample scripts | You mean the scripts found in Teradata\Client...? Those are examples for TPT (Teradata Parallel Transporter).
Files in quickstart are based on the TPT Quick Start Guide and userguide... |
4586 | 13 Aug 2016 @ 02:58 PDT | Tools | Reply | BTEQ and OReplace | Check the datatype returned by oReplace, it's probably a VarChar(8000), but your .WIDTH is set to 2000, which leads to truncation. You need to cast to a properly sized VarChar.
|
4585 | 12 Aug 2016 @ 09:28 PDT | Database | Reply | Need help with interdependent calculation using result from previous row | This seems to be similar to forums.teradata.com/forum/database/calculation-of-prescription-drug-adherence
If this matches you need to materialize a row_number in a Volatile table and ... |
4584 | 12 Aug 2016 @ 08:17 PDT | Database | Reply | Capturing MAX marks for Each Student when the MArks are in Columns | Those functions found in syslib are some old pre-TD14.10 UDFs, if you don't qualify the function name they will be found/used instead of td_sysfnlib.greatest. The names are due to overloading (... |
4583 | 12 Aug 2016 @ 06:09 PDT | General | Reply | Improve performance on an analytical query , mulitple columns using same set of partitions | This is the best plan you can get, the optimizer combines all OLAP steps with the same partition/order.
Standard SQL syntax supports a WINDOW clause (not supported in Teradata) which avoid... |
4582 | 12 Aug 2016 @ 06:05 PDT | General | Reply | Looking for help with regards to nested aggregates | Sorry, but I don't get what you're trying to do with your sample data and expected result.
If your "reporting solution" doesn't support subqueries/Derived Table you b... |
4581 | 12 Aug 2016 @ 05:52 PDT | Tools | Reply | Any way to find the original query that created a table? | Or you check the CreatorName & CreateTimestamp and try to find the query in the QueryLog history
|
4580 | 12 Aug 2016 @ 05:50 PDT | Database | Reply | Capturing MAX marks for Each Student when the MArks are in Columns | td_sysfnlib.GREATEST accepts up to 10 parameters.
Check if there's another UDF with the same name in the search path:
default database -> syslib -> td_sysfnlib
|
4579 | 04 Aug 2016 @ 02:59 PDT | Database | Reply | Need help with interdependent calculation using result from previous row | Based on the example data you don't need to use the previous row's data, it's just the minimum start date plus a cumulative sum of supplied days:
min(SELL_DATE)
over (partitio... |