3228 | 21 Oct 2014 @ 02:51 PDT | Tools | Reply | Teradata Administrator References and Procedures | Hi Peter,
TD Admin runs a LIKE on the internal CreateText of Views and Macros (and it will not return nested objects).
But the source code of an SP is not stored in any system table, only a SHOW ... |
3227 | 21 Oct 2014 @ 02:43 PDT | Database | Reply | Calculate Last Business Day of Previous Month | Hi Sarang,
what's your definition of business day?
|
3226 | 21 Oct 2014 @ 02:42 PDT | General | Reply | Additional padding characters that are not removable with TRIM function | hex '00' is not a space, only hex '20', you need to trim both.
And the CHR function needs decimal, not hexadecimal values.
You seem to run TD14, try RTRIM(COL1, '2000'XC)
|
3225 | 21 Oct 2014 @ 02:35 PDT | Database | Reply | TD_UNPIVOT throwing error: SELECT Failed. [9134] TD_UNPIVOT_CONTRACT; Help is confusing | Hi Jerry,
I think this function is installed by one of the DIP scripts during upgrade, maybe it didn't run.
If select DatabaseName from dbc.FunctionsV where FunctionName = 'TD_UNPIVO... |
3224 | 21 Oct 2014 @ 02:31 PDT | General | Reply | Select data from one row, while on another row in the same table. | The MIN OVER returns the minumum date after the current row, you probably need to change it to:
min(case when SCC.Day_Of_Week in (1,7) or HC.Holiday is not null
then null
els... |
3223 | 21 Oct 2014 @ 02:28 PDT | Database | Reply | Start dates overlap | You didn't specify the rules how to determnine the output.
Maybe
case
when
min(end_dt)
over (partition by username
order by start_dt, end_dt
ro... |
3222 | 20 Oct 2014 @ 01:54 PDT | Data Modeling | Reply | special characters such as '¬', crtl B, crtl A etc from sybase to TD | What's your TD release?
In TD14 there's a CHR(2) function, or you can use a hex-literal '02'xc
|
3221 | 20 Oct 2014 @ 01:46 PDT | Database | Reply | TD_UNPIVOT throwing error: SELECT Failed. [9134] TD_UNPIVOT_CONTRACT; Help is confusing | Hi Jerry,
your query is syntactically correct.
Are you sure you run it on 14.10?
|
3220 | 20 Oct 2014 @ 01:39 PDT | General | Reply | Select data from one row, while on another row in the same table. | Hi Genesius,
you need to find the minimum date where the date is not a weekend or holiday:
min(case when SCC.Day_Of_Week in (1,7) or HC.Holiday is not null
then null
... |
3219 | 19 Oct 2014 @ 04:19 PDT | Tools | Reply | Updating an aggregate table from detail table using MLOAD (multiload) or job. | Hi Saumil,
what you need is a simple SQL MERGE.
Based on the tool you actually use, after the END MLOAD or in an APPLY to a DDL Operator.
And of course you need a key to update a row, in your ca... |
3218 | 18 Oct 2014 @ 10:14 PDT | Tools | Reply | BTEQ IMPORT EXPORT DATA | Hi Jugal,
then this might be related to some setting, don't know, maybe try SET SESSION DATEFORM = ANSIDATE
|
3217 | 18 Oct 2014 @ 10:11 PDT | Database | Reply | Teradata data type conversion and ANSI data type conversion | This is independent of the session mode ANSI/Teradata.
0 (decimal(3,0))(varchar(3)) is a Teradata style typecast, while cast(cast( 0 as decimal(3,0)) as varchar(3)) is ANSI style.
When you d... |
3216 | 18 Oct 2014 @ 10:02 PDT | Database | Reply | How to convert JAN 1, 2007 12:00:00 AM into timestamp format 'YYYY-MM-DDBHH:MI:SS' ??? | Hi Shardul,
try TO_TIMESTAMP(x, 'mon dd yyyy hh:miam')
|
3215 | 18 Oct 2014 @ 10:00 PDT | Data Modeling | Reply | Partitioning on a flag (column) | I don't think this will be efficient, when you update the flag all rows will be moved (=deleted and re-inserted) to the new partition.
Instead of a current flag you might simply define daily p... |
3214 | 18 Oct 2014 @ 09:44 PDT | Database | Reply | Business Day calculation | The solution I prefer is a business_day number column in my calendar table, then you simply do two joins on start_date/end_date and calculate the difference.
As you have rules what's a busines... |
3213 | 18 Oct 2014 @ 09:35 PDT | Database | Reply | DML through multi table view | Hi Sravanthi,
Teradata (like most DBMSes) doesn't allow updates on multi-table views.
Only single-table SELECTs without JOIN, ORDER BY, aggregations or calculations can be updated.
|
3212 | 18 Oct 2014 @ 09:33 PDT | Database | Reply | Volatile Tables in Macros | Hi Raghu,
any DDL request in Teradata must commited (no other SQL after it allowed) and a macro is always a MultiStatement Request, so there's no way to create and then use a Volatile Table in... |
3211 | 18 Oct 2014 @ 09:28 PDT | Tools | Reply | Updating an aggregate table from detail table using MLOAD (multiload) or job. | Hi Saumil,
simply run a SQL UPDATE, you can do this after the END MLOAD or in a BTEQ script.
|
3210 | 16 Oct 2014 @ 01:50 PDT | Database | Reply | Update the table with min and max timestamp |
select Name,
min(case when Status = 'A' then Starttime end) end,
max(case when Status = 'C' then endtime end) end
from tab
group by 1
This seems to match your data...
|
3209 | 16 Oct 2014 @ 01:33 PDT | Database | Reply | how/where to find inherited rights acquired by user when created? | Check the rights granted to PUBLIC or granted with the ALL option, dbc.AllRightsV.AllnessFlag = 'Y'
|
3208 | 16 Oct 2014 @ 01:27 PDT | Database | Reply | Looking for SQL to recreate existing statistics in teradata 14 | Hi Akleema,
check my New StatsInfo query for TD14
|
3207 | 16 Oct 2014 @ 11:50 PDT | Database | Reply | Need help in Optimizing Row_Number/RANK() operations | Are you sure that this is returning the expected result?
Seems like you want to combine multiple consecutive rows with the same values into one, a slowly changing dimension? This is why there are ... |
3206 | 16 Oct 2014 @ 10:56 PDT | Tools | Reply | BTEQ IMPORT EXPORT DATA | Both DOJ (CHAR(26)) or DOJ (TIMESTAMP(6)) should work if the timestamp is exported in the correct format: YYYY-MM-DD HH:MI:SS.SSSSSS
So check the timestamp in your data file.
|
3205 | 15 Oct 2014 @ 11:56 PDT | Database | Reply | Target row is being updated by multiple source rows in an Update statement | The WHERE-condition is missing:
...
SET
BPP_User_Id = ppage.ID
,Email_Address = ppage.Email
,Last_name = ppage.Last
,First_name = ppage.First
WHERE tgt.Email = ppage.Email;
&n... |
3204 | 15 Oct 2014 @ 11:11 PDT | Aster | Reply | Aster Express Tutorial | Hi Sascha,
I don't know exactly what was covered by the tutorial, but there's a Getting Started Guide on the new Aster 6 download page: Aster Express 6.00.0... |