Quantcast
Channel: Teradata Forums - Database
Browsing all 14773 articles
Browse latest View live

convert string to timestamp - topic by Hemant Tiwari

  My string looks like    05-MAR-12 01.33.34.000000000 PM   I need to convert this to timestamp (in teradata), I have tried:    cast(create_date as TIMESTAMP(0) FORMAT 'dd-mm-yybhh.mi.ss')   plus some...

View Article


convert string to timestamp - response (1) by CarlosAL

Teradata supports timestamp up to 6 decimals, your timestamp is 9 decimals (!!). If you want to get a TS(0) you should try to get rid of the fractional digits:    BTEQ -- Enter your SQL request or BTEQ...

View Article


convert string to timestamp - response (2) by CarlosAL

Sorry, pressed the key too soon: If you have your timestamp strings in a fixed-length format, you can do something like: SELECT CAST(SUBSTR(THE_TS_STRING,1,18) ||             SUBSTR(THE_TS_STRING,...

View Article

DBQlogTbl statementtype is null? - topic by simonem

I am doing some sql logging, but I don't understand why it's working this way. There is this macro called by javascript code ONLY ONE TIME that is appearing multiple times in the log (4 or more).  I'm...

View Article

TUNING THE join - topic by harshita45

  Hi , I have a query like below. It is costing more . pls suggest how can i tune this. read more

View Article


DBQlogTbl statementtype is null? - response (1) by ulrich

Can you share your Java connection settings - without username and password? Do you connect with multiple sessions?

View Article

Slow left join query - response (4) by nyemul

CREATE TABLE MISC.table1 (  sub_sk              NUMERIC(8) NOT NULL   TITLE 'sub_sk' ,  sub_id              VARCHAR(32) NOT NULL   TITLE 'sub_id' ,  PROCESSED_DTTM       TIMESTAMP(0) NOT NULL   TITLE...

View Article

TUNING THE join - response (1) by dnoeth

Hi Harshitha, the NUSI on CUST_KEY will not be used for the join, only a NUPI on CUST_KEY, but this will probably skew your table and create other problems. You might change that single aggregate to...

View Article


TUNING THE join - response (2) by harshita45

Hi Dieter, First of all thank you very much for the reply. It worked fine. But i am getting  REFDB.A.EX_QTY does not exists. i ran the query like below SELECT 'UNKNOWN' , 'UNKNOWN' , 0 , - 999 ,...

View Article


TUNING THE join - response (3) by m.kothapally@gmail.com

SELECT W_INT_ORG_D.INTEGRATION_ID BU_ID, W_POSITION_D.OU_ID DIVISION_ID, MIN(W_POSITION_D.INTEGRATION_ID) POSITION_ID, (CASE WHEN SUBSTR( trim(cast(( current_timestamp - X_INVC_DT day(4) to second ) as...

View Article

DBQlogTbl statementtype is null? - response (3) by simonem

  I use an ODBC System DSN.   These are settings, if it helps:   - DS Name /Desc...   - UserName/Password ...   - Do not resolve alias name to IP Address - checked   - Use Integrated Security (NOT...

View Article

DBQlogTbl statementtype is null? - response (4) by ulrich

you called ODBC via javascript? In the cases I saw this happen the query was only executed once - you can validate this on your own by checking the totalIO and AmpCPUTime values. They should be >0...

View Article

DBQlogTbl statementtype is null? - response (6) by simonem

  TotalIO and ParserCPUTime are all > 0.   ParserCPUTime has 2 rows > 0 and 6 rows = 0.       No. We are using Javascript server code in this example, and no prepare. This is a sample call:...

View Article


DBQlogTbl statementtype is null? - response (8) by simonem

    CollectTimeStamp RequestNum InternalRequestNum LogonDateTime AcctStringTime AcctStringHour AcctStringDate AppID QueryBand ProfileID StartTime FirstStepTime FirstRespTime LastStateChange NumSteps...

View Article

convert string to date format - response (5) by Arash

Hi, I have similar question. I need to convert a varchar like this 8/12/2012 into DATE format. I am getting an error message that this is not a valid date.  I appreciate your help.  

View Article


DBQlogTbl statementtype is null? - response (9) by ulrich

Hm, the DBQL is indicating that the query was executed 8 times - 6 queries plans had been used from cache -> parsingCPUTime = 0. So maybe your code is not doing what you expect...

View Article

TUNING THE join - response (4) by dnoeth

Hi Harshitha, this was just a quick'n'dirty try to show you how to do it, you'll have to find out the exact query matching your requirements.   Hi Mahesh, sorry, but this is way to much, i'm not...

View Article


Slow left join query - response (5) by dnoeth

Hi Nitin, you might try an early aggregation similar to this one: http://forums.teradata.com/forum/database/tuning-the-join#comment-23696 Of course it depends on your data, if and how this is possible....

View Article

DBQlogTbl statementtype is null? - response (10) by simonem

Thanks for your help. We found out it was a code problem, a recordset filter that, when set,  was resubmitting the macro multiple times.      

View Article

CREATE TABLE Failed. 3933: The Maximum Possible Row Length in the Table is...

Hi All, I am tying to create the following (and it did work) but was wondering if I can add the other datatypes I have commented out or make my varchar larger than 62000 REMRK_CLOB  VARCHAR(62000)...

View Article
Browsing all 14773 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>