4028 | 14 Oct 2015 @ 05:30 PDT | Database | Reply | Object names length for tablename col. in dbc.tables is still 30 char in TD 15 | You do what is recommended since TD12, utilize the V-Views instead of the old legacy version:
select * from dbc.TablesV
|
4027 | 14 Oct 2015 @ 12:10 PDT | Database | Reply | All amp duplication issue | It seems like you unpivot a denormalized table with one column per weekday into seven rows, is this correct? This would result in 133,184,000 * 7 rows.
The small table is duplicated, ... |
4026 | 13 Oct 2015 @ 11:00 PDT | Connectivity | Reply | Problems using SET QUERY_BAND from ODBC | You can also set the session mode in your ODBC connection string.
Which tool are you using for submitting the queries?
|
4025 | 13 Oct 2015 @ 10:58 PDT | Database | Reply | Teradata password expiry extention-what went wrong here ? | Hi Samir,
MODIFY PROFILE doesn't require a restart, otherwise profiles would be useless.
Strange...
|
4024 | 13 Oct 2015 @ 10:55 PDT | Database | Reply | Left join with no columns selected from right table | Hi Samir,
both the same result set only when the inner table's join column is unique. This factt is unknown to the optimizer unless it's defined with a USI/PK.
But when you add DISTINCT i... |
4023 | 13 Oct 2015 @ 10:44 PDT | Database | Reply | Teradata password expiry extention-what went wrong here ? | Are you sure you modified the correct, i.e. the user's profile?
|
4022 | 13 Oct 2015 @ 09:52 PDT | Database | Reply | Count Consecutive Days that we did not receive a file for a SKU | Using OLAP functions this might be something like this:
select
t.*,
max(case when file_rcv_flag = 1 then cal_dt end)
over (partition by sku_id
order by cal_dt
row... |
4021 | 13 Oct 2015 @ 07:46 PDT | Connectivity | Reply | Problems using SET QUERY_BAND from ODBC | Can you check if your ODBC session is connected using ANSI transaction mode?
|
4020 | 13 Oct 2015 @ 07:45 PDT | Tools | Reply | Issue with muting column names in bteq export file | Add (TITLE '') to each column, e.g.
select metric (TITLE ''),count(*) (TITLE '') from tab2;
|
4019 | 13 Oct 2015 @ 07:44 PDT | Database | Reply | REcursive process | If the number of levels is known, small & fixed you can utilize one left join per level.
Otherwise eecursion can be replaced by a WHILE loop in a Stored Procedure, but why would you want that?
|
4018 | 13 Oct 2015 @ 07:40 PDT | Database | Reply | bteq output taking lot of time | Hi Amit,
is this exported over a slow network?
|
4017 | 13 Oct 2015 @ 07:32 PDT | Database | Reply | Count Consecutive Days that we did not receive a file for a SKU | Simply change the logic to:
having Days_missed > 0 or Days_missed is null
Do you actually need the LEFT JOIN, this will return all rows?
In that case you might better rewrite it using OLAP... |
4016 | 12 Oct 2015 @ 03:54 PDT | Database | Reply | Within transaction, how to find keys from one table and use those to delete from other tables in a single request? | Either repeat the subquery multiple times and run all the DELETEs as a Multistatement Request using BEGIN/END REQUEST (the optimizer should create the result only once) or use a Global Temporary Ta... |
4015 | 12 Oct 2015 @ 03:52 PDT | Database | Reply | Creating derived query from 2 different tables / 3707 Syntax error | There's no qualified names in the column list:
with drvd_qry (operating_unit, grp_brn_id, stn_id, glt_seq) as
|
4014 | 11 Oct 2015 @ 08:08 PDT | Database | Reply | Issu With Decimal Datatype | The cast fails due to too many digits in your input string.
TO_NUMBER('0.299999999999999988897769753748434595763683319091796875')
doesn't fail in cases like that.
|
4013 | 11 Oct 2015 @ 02:13 PDT | Database | Reply | No spool space | Are you sure that YR_KEY and WK_KEY are unique within your calendar, i.e. one row per year/week?
Can you show both Explains?
|
4012 | 11 Oct 2015 @ 02:09 PDT | Database | Reply | drop/create table stored procedure | Hi Joe,
it's impossible, each DDL must be submitted individually (and there's no REPLACE TABLE).
Assuming the definition changes (otherwise simply DELETE it) you might use followi... |
4011 | 06 Oct 2015 @ 02:13 PDT | Database | Reply | extracting values | If it's not working with Teradata Studio it might be related to the session mode, JDBC defaults to ANSI while OLDC/.NET/CLI uses the system's default.
Try changing the JDBC Connection Prop... |
4010 | 06 Oct 2015 @ 01:06 PDT | Database | Reply | How to calculate last seven days Total | You need to add a WHERE-condition:
WHERE datecol BETWEEN CURRENT_DATE - 6 AND CURRENT_DATE
|
4009 | 06 Oct 2015 @ 01:04 PDT | Database | Reply | Count Consecutive Days that we did not receive a file for a SKU | You need conditional aggregates:
select sku_id,
max(case when file_rcv_flag = 0 then cal_dt end) as Last_Date,
Last_Date - max(case when file_rcv_flag = 1 then cal_dt end) as Days_Missed... |
4008 | 06 Oct 2015 @ 10:59 PDT | Database | Reply | extracting values | Hi Siva,
please post new questions as a new topic.
Q1 is a simple aggregate:
select emp, min(phone), max(phone)
from tab
group by emp
Q2 needs LAG, which is not implemented in Ter... |
4007 | 06 Oct 2015 @ 10:49 PDT | Database | Reply | extracting values | It doesn't matter if INSTR is highlighted in Studio, if you're on TD14.10 it's supported.
You simply got a syntax error, there's a missing comma:
substring (col_name from INSTR(... |
4006 | 06 Oct 2015 @ 03:41 PDT | Database | Reply | extracting values | What's your TD release?
INSTR is supported since TD14.
|
4005 | 05 Oct 2015 @ 03:28 PDT | Database | Reply | extracting values | If it's always delimited by spaces you can utilize INSTR to find the last space and SUBSTRING to return the following characters:
SUBSTRING(col FROM INSTR(col, ' ', -1, 1) +1 F... |
4004 | 01 Oct 2015 @ 11:13 PDT | Tools | Reply | TTU for Mac OS | Hi Sean,
TDWallet for OSX is only available as part of the TTU-install.
Afaik it can't be downloaded from DevEx, if you're a customer ask your DBA to get it from T@YS.
|