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...
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
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...
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...
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...
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...
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.