Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. DFW1999

    creating seq Nbr for detail recrods for each header record.

    I have one stage table with following entries: ACCT_ID TimeStamp Dflt_Flag 123 10:30:30 Y 123 10:30:31 N 123 10:30:32 N 124 10:30:33 Y 124 10:30:34 N 124 10:30:35 N 124 10:30:36 N 125 10:30:37 Y All the entries with Default_flag "Y" is kind of header...
  2. DFW1999

    How to validate telephone number in sql

    There is a table one column: telephone_number 1234567777 1112223333 2223334444 %#@&008988 +dhjkky854 78-- 00=7 How in sql you can select only valid telephone numbers(10 numeric character long). In this case I want to see in my sql output only the following output: 1234567777 1112223333...
  3. DFW1999

    Need to put output in one line

    I have a table ORD which has one BTN(0000000000). This BTN has 9 entries in the DTL table( 9 products associated to this BTN). I need to format the out put in this fixed length ONE LINE output: BTN prod_count(9)nm1 nm2 nm3 nm4 nm5 nm6 nm7 nm8 nm9 NOTE: I put spaces between prods for...
  4. DFW1999

    Change data type in tera Data

    Hello, I have a populated table in Tera Data V2R5 with a column Mark_Value as (Decimal 18,0)(Total cols in the table are 12). There are more then one million rows in this table. I want to change data type of col Mark_Value as follows: Current data type: Mark_Value Decimal (18,0) want to...
  5. DFW1999

    SUM ONLY of first table wiht inner join of second table

    Hello, I have First table: CREATE TABLE [dbo].[Table_A] ( [CUT_NO] [int] NULL , [FG_ITEM] [char] (10), [FG_SEASON] [char] (10) , [APPROVAL] [char] (10) , [QUANTITY] [int] NULL ) ON [PRIMARY] GO select * from Table_A; OUTPUT: 1 FIRST JAN NULL 10 2 SECOND FEB...
  6. DFW1999

    IMPORT data from Script in BTEQ

    Thanks dnoeth , I changed my script according to your advice and now it works fine.
  7. DFW1999

    IMPORT data from Script in BTEQ

    Hi, I have one test data file named "Datain.dat" which has only one entry: 100 I have another file named "JobScript.bteq" with the following code: .logon demotdat/dbc,dbc ; .IMPORT DATA FILE = DATAIN.DAT .QUITE ON .REPEAT * USING SYS_ID ( INTEGER) DELETE FROM Test.BaseTab WHERE...
  8. DFW1999

    Setting TIMESTAMP in BTEQ SCRITPS

    Hello Dnoeth, I am dealing with call detail record data. Here we are using timestamp to go minute/Seconds levels. This was the reason I asked for more info from you. Anyway you did a great job in explaining this issue. Thanks
  9. DFW1999

    Setting TIMESTAMP in BTEQ SCRITPS

    Hello Dnoeth, I appreciate your detailed reply. I see your following comment: " When a date is compared to a Timestamp it's converted to yyyy-mm-dd 00:00:00.000000 " One thing I want to re-confirm with you. In the issue which I stated to you, based on the logic I need to fetch all the records...
  10. DFW1999

    Setting TIMESTAMP in BTEQ SCRITPS

    Hi, I have quite a few bteq scripts which I am executing from Perl program. These scripts I need to run during the first 10 days of every month( on the one of the first 10 days of each month). The dates are in the following format for the previous month: " where START_TS BETWEEN cast...
  11. DFW1999

    Adding count of Query result in Footing of BTEQ SCRIPT

    Hello dnoeth, Thanks for your tip regarding adding count(*) at the end of query result output. I tried the following script: .EXPORT REPORT FILE = FILE_NAME.TXT .set defaults on; .set format on; .set heading '00HDR0001||&date||00001'; .set width 80; .set separator "," .set titledashes off...
  12. DFW1999

    Adding count of Query result in Footing of BTEQ SCRIPT

    Hi, I am running a BTEQ script in which I am appending heading as follows: .set heading 'HDR99001||&date' it appends at the header this: HDR001 03/28/2004 then I have my sql which outputs 100 records it can be > 100 or <100 based on the data(any number) at the end of sql output I want to...
  13. DFW1999

    format an Decimal output with leading zeros URGENT

    Hello All, I got the following solution: sel 123 (format'999999') (CHAR(6)) as ch6; Thanks
  14. DFW1999

    format an Decimal output with leading zeros URGENT

    Hello, I need to format output for a decimal value with the leading zeros(total of 6 character long). Here is the info regarding the column column_Name Col_A Col datatype Decimal FORMAT '----.9999 Here is my query: select G.Col_A from TABLE_G G where G.Col_A IS NOT NULL AND...
  15. DFW1999

    USING COALESCE and || in SQL

    Thanks for quick response
  16. DFW1999

    USING COALESCE and || in SQL

    Hi, this following script is part of a fastExport script which I want to execute in TD. Without using COALESCE I am able to process that script with no error. But if one of the concatenated field is NULL then the whole string becomes null and gives me empty fixed length field. When I tried to...
  17. DFW1999

    NCR RDBMS ERROR 2620

    Hello, While running a query without using cast or format with multiple joins to Five(5) tables against V2R5 Teradata I am getting "2620 Error" which has the following description from docs: 2620 The format or data contains a bad character. Explanation: This error indicates that the user...
  18. DFW1999

    Multiple Updates in a Table A with Max(date) from Table B

    Thanks Dieter good job!!!
  19. DFW1999

    Multiple Updates in a Table A with Max(date) from Table B

    Just an updated/revised query for multiple updates to a table A wiht max values of table B. Still getting max aggregated functions is not allowed here. UPDATE TABLE_A FROM TABLE_A , TABLE_B SET CREATE_TIMESTAMP = max(TABLE_B.CREATE_TIMESTAMP) ,UPDATE_TIMESTAMP = max(TABLE_B.UPDATE_TIMESTAMP)...
  20. DFW1999

    Multiple Updates in a Table A with Max(date) from Table B

    Hello, I need to update three fields of Table_A with the two fields of Table_B and with one constant 'M'. I have the following query to update three fields in table_A: UPDATE TABLE_A SET CREATE_TIMESTAMP=(SELECT MAX(CREATE_TIMESTAMP) FROM TABLE_B SET UPDATE_TIMESTAMP=(SELECT...

Part and Inventory Search

Back
Top