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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
This is what I need to know:
I tried to intstall ODBC driver on Window2000 Advanced Servers only first and then with all utilities but it did not work in both cases. When I looked at the version of newly installed driver it was saying "Not Marked".
1-Need to know why it is giving...
Hi,
I have developed DTS Package in a Clustered environment in SQL2000 Analysis server.I can execute this package from Enterprize Manager design window successfully.
Now I want to automate this process through scheduling a Job. I created a job for this package to execute. The user which is...
Can somebody tell me how to insert a sequence in teradata table.
I tried to use csum() for this insert. It did not work.
CSUM() I can use when selecting data from an other table. But in this case I am inserting new rows in a table and want to add a unique seq no each time a row inserts into this...
I need to know how I can select all the procedure/Macro objects from the teradata with the timestamp when these objects were last compiled/created.
In this way I can see which are the latest objects with version and time.
Thanks
Hi,
I am looking for any functionality like PRINT OUT/DBMS_OUTPUT.PUT_LINE in my procedures/macros in order to debug my code in TeraData.
Can someone give me an example code or steps to setup this functionality in TeraData QueryMan.
thanks
I need to parse a comma delimited string and insert each token into a new table.
For example this is a string which I am passing to a procedure as input parameter:
'ABC,DEF,GHI,JKL,MNO,PQR'
Any help would be appreciated.
thanks
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.