| 1928 | 21 May 2013 @ 10:51 PDT | Database | Reply | Minute Difference Between Time Datatypes | Ops, the INTERVAL is not needed, just remove it:
(SEC.CALL_START_TM-PRI.CALL_END_TM) day(4) to second AS TIME_DIFF
Dieter
|
| 1927 | 21 May 2013 @ 02:41 PDT | Database | Reply | DDL/DML Version Control | Hi Pawan,
there's no built-in version control, Teradata doesn't store "previous" versions.
To achieve your goal you might use some external version control software like Subvers... |
| 1926 | 21 May 2013 @ 02:39 PDT | Private Forum |
| 1925 | 21 May 2013 @ 02:31 PDT | Database | Reply | View columns explicitly titled - where are the titles stored? | Hi Simon,
it's not stored in any easily accessible way, just in dbc.tvm's RequestText or CreateText.
It's parsing time :-(
Dieter
|
| 1924 | 21 May 2013 @ 02:23 PDT | Tools | Reply | Find record position for Fastload | FastLoad doesn't store any information about the record number.
If you need it you might switch to MLoad instead.
Dieter
|
| 1923 | 21 May 2013 @ 02:19 PDT | Database | Reply | Restrict User view of DBC.Tables | Revoke the access rights for dbc.Tables etc. and tell the users to use the X-versions, e.g. there's dbc.Tables and dbc.TablesX.
dbc.Tables returns rows for all objects within the system, while... |
| 1922 | 21 May 2013 @ 02:08 PDT | Database | Reply | Minute Difference Between Time Datatypes | The difference between two timestamps is an interval:
(SEC.CALL_START_TM-PRI.CALL_END_TM) interval day(4) to second AS TIME_DIFF
WHERE TIME_DIFF <= interval '5' minute
Dieter
|
| 1921 | 18 May 2013 @ 10:48 PDT | Database | Reply | Average of volume by weekday and hour over range | You group both times by the same columns, if i understodd you correctly you have to group by date/hour first and then by weekday:
SELECT
creation_dt (FORMAT 'eee') (CHAR(3))
,AV... |
| 1920 | 17 May 2013 @ 04:39 PDT | General | Reply | Reg.Teradata Features | For each release there's a Release Summary with all the new features:
http://www.info.teradata.com/edownload.cfm?itemid=113480006
Dieter
|
| 1919 | 17 May 2013 @ 12:26 PDT | Database | Reply | Returning a Results from Stored Procedure | Do you actually need to access the result several times?
Then you should materialize it in a Global Temporary Table.
When you only want to return it to the client, it's
replace proce... |
| 1918 | 16 May 2013 @ 09:19 PDT | Database | Reply | SUBSTR without explicitly coding the length parm | It's exceeding the maximum row size because the column is defined as LATIN and your session character set is UNICODE and/or you ORDER BY some of those columns. The calculation is based on the p... |
| 1917 | 08 May 2013 @ 03:51 PDT | Database | Reply | Warning message when using Dynamic cursor - | Hi Ganesan,
sorry, i was wrong, of course you can't handle that specific warning within the SP itself.
But when you set the ERRORLEVEL to zero the BTEQ job will also report a zero return code... |
| 1916 | 03 May 2013 @ 08:25 PDT | Database | Reply | How to Use Round Function In Teradata | Hi Mahesh,
there's ROUND in TD14...
In your case you don't need ROUND as a CAST AS DECIIMAL(xx,0) should return the same result.
But i assume W_ORDER_D.X_ATTRIB_27 is a... |
| 1915 | 03 May 2013 @ 08:12 PDT | Database | Reply | Using FLOOR() function over a Bigint Columns | When you got BIGINTs the result should be 1.
Looks like you actually got DECIMALs.
SEL TYPE(1734567890123), TYPE(1000000000000);
SEL CAST(1734567890123 AS BIGINT)/CAST(1000000000000 AS BIGINT)... |
| 1914 | 02 May 2013 @ 11:28 PDT | Database | Reply | Warning message when using Dynamic cursor - | Hi Ganesan,
in a SP simply add a CONTINUE HANDLER.
Dieter
|
| 1913 | 02 May 2013 @ 12:05 PDT | Database | Reply | tuning the Skewed joins | Hi Suresh,
a typical solution would duplicate the query, the first with a condition "WHERE col = skewed_value" and the other "WHERE col <> skewed_value" and UNION A... |
| 1912 | 02 May 2013 @ 12:01 PDT | Database | Reply | Locking of the DBC tables | There's no information about locks in DBQL, you need to enable Locking Logger for this.
If you want to check the current locks you might use the PMON API UDFs in syslib like MonitorSessions.
... |
| 1911 | 02 May 2013 @ 11:59 PDT | Database | Reply | Trying to round result of a computation to 2 digits of precision | What is the maximum values returned by that calculation?
I would not use FLOAT as it's precision is limited to approx. 15 digits.
Better use DECIMAL instead, which supports up to 38 digits.
... |
| 1910 | 02 May 2013 @ 11:55 PDT | Database | Reply | Unique gapless ID:s from system - how to? | The only way to get a gapless sequence is to do it on your own with ROW_NUMBER like
select
row_number() over (order by whatever)
+ coalesce((select min(seq) from tab), 0) as seq
....
... |
| 1909 | 02 May 2013 @ 11:51 PDT | Database | Reply | Hybrid columnar automatic format | I would suggest reading the manuals, there should be lots of details in the DDL and the Database Design manuals plus the Columnar Orange Book.
Dieter
|
| 1908 | 02 May 2013 @ 11:46 PDT | Tools | Reply | Problem with title line when using .export report | What do you expect? There's only one column in your output, the column name is automatically created and the optimizer tends to add a lot of brackets.
If you want the fieldnames you have to wr... |
| 1907 | 02 May 2013 @ 11:43 PDT | Database | Reply | Warning message when using Dynamic cursor - | Hi Ganesan,
just switch it off if BTEQ returns an errorlevel greater zero to the shell:
.SET ERRORLEVEL 3212 SEVERITY 0;
Dieter
|
| 1906 | 02 May 2013 @ 10:38 PDT | Database | Reply | Query using the Sys_Calendar to return quarterly results | What exactly are you looking for?
There are already quarter_of_year and quarter_of_calendar columns in sys_calendar.
And a calculation of start and edn of quarter as date would be somehing like
... |
| 1905 | 02 May 2013 @ 09:39 PDT | Database | Reply | Case Statement on an Inline View | Hi Haarish,
could you show the SQL?
Is there any RANDOM/SAMPLE/OLAP function in the Derived Table?
Dieter
|
| 1904 | 02 May 2013 @ 09:20 PDT | Database | Reply | SQL to import string with comma (,) from a file using SQL Assistant | I didn't test it, but did you try to set "enclose column data in" in options -> import/export to "single quotes"?
Dieter
|