266 | 24 Mar 2012 @ 12:56 PDT | Tools | Reply | Importing fixed length records with BTEQ in Windows environment |
There is a different - a varchar field need to tell how long it is and is information is expect in front of each varchar column. And this was not found in your file as it was fix length char...
|
265 | 22 Mar 2012 @ 12:30 PDT | Database | Reply | Fiscal vs. Calendar Issue - Adjusting SYS_CALENDAR to Begin Monday |
The question is if this change would be already sufficient for you?
How is the fiscal week definition in your company for the week which contains the 01.01. of a year?
Many customers hav... |
264 | 22 Mar 2012 @ 12:25 PDT | Database | Reply | Calculate business days hours between two Timestamp(6) fields |
What you can do is
Cast((sum (extract(hour from hhmmss)) + sum (extract(minutes from hhmmss)) / 60. + sum (extract(seconds from hhmmss)) / 3600.) as... |
263 | 21 Mar 2012 @ 06:01 PDT | Tools | Reply | performance of two columns |
Test your self by checking the explain
So run
explain
SELECT
A.alpha
FROM A
WHERE
A.alpha = B.beta
and
Explain
SELECT
A.alpha
FROM A
WHERE
B.beta = A.alpha
if the... |
262 | 21 Mar 2012 @ 12:17 PDT | Database | Reply | Permissions to a view |
The database XYZ need select and inserts rights on either PQR or PQR.aaa with grant options.
|
261 | 20 Mar 2012 @ 11:32 PDT | Tools | Reply | Importing fixed length records with BTEQ in Windows environment |
You are mentioning fixed length records but you are deining variable length records with
USING (col1 VARCHAR(10), col2 VARCHAR(5), col3 VARCHAR(8), col4 VARCHAR(37)).
Fixed length would requ... |
260 | 19 Mar 2012 @ 11:29 PDT | Database | Reply | Calculate business days hours between two Timestamp(6) fields |
The meesage is indicating that at least for one row (end(i) - begin(i)) is bigger as 9999:xx:xx
Do you have any high/low values in your data?
Can you run
select min(Policy_Enter_time... |
259 | 19 Mar 2012 @ 03:12 PDT | General | Reply | NEED HELP !! - Merging Consecutive and OVERLAPPING date spans |
Thanks Dieter,
these had been on my list to explore for some time. I am impressed.
Run this on a 1.3 mio row table.
The normed cpu is 1/3 of the solution I outlined. And the ellapsed... |
258 | 19 Mar 2012 @ 12:50 PDT | Analytics | Reply | How to use Fastexport exit codes in UNIX Shell Script |
Hi, I think you will find in unix / linux forums more valuable answers.
But you need to do something like
#!/usr/bin/ksh
LOG=./thisDBSetupRun.log
bteq < your_code.btq ... |
257 | 18 Mar 2012 @ 01:26 PDT | Database | Reply | Conversion: Seconds to MM:SS |
It is OK as TD use only the integer part if you cast to int and does not round.
The other formular is independent from this rule and should be valid in all DB systems as id - id mod 60 is a na... |
256 | 17 Mar 2012 @ 01:28 PDT | Database | Reply | Conversion: Seconds to MM:SS |
So you mean that your result would be a string as it can not be expressed as Interval?
You need to calculate the seconds via the MOD function and can either substract these secs fr... |
255 | 16 Mar 2012 @ 01:49 PDT | General | Reply | NEED HELP !! - Merging Consecutive and OVERLAPPING date spans |
to give you an idea - there might be more efficient way do do it...
generate some test data
create table date_range _test as (select calendar_Date from_dt , day_of _week + calendar_date t... |
254 | 16 Mar 2012 @ 01:13 PDT | General | Reply | NEED HELP !! - Merging Consecutive and OVERLAPPING date spans |
can you share a ddl on which your problem is based?
|
253 | 16 Mar 2012 @ 01:10 PDT | Analytics | Reply | Date gap analysis |
on which realease are you?
|
252 | 16 Mar 2012 @ 04:05 PDT | Private Forum |
251 | 16 Mar 2012 @ 03:43 PDT | Private Forum |
250 | 16 Mar 2012 @ 02:37 PDT | Database | Reply | Calculate business days hours between two Timestamp(6) fields |
Hi, please don't get it personal but you need to spend a bit more time on the SQL basics before heading into a bit more advanced SQL calculations.
You need to propagate the folder_id up ... |
249 | 16 Mar 2012 @ 12:26 PDT | Database | Reply | copying sequences based in timestamp |
Gern geschehen!
|
248 | 15 Mar 2012 @ 11:27 PDT | Database | Reply | copying sequences based in timestamp |
Srividhya,
below query should do
select max(logon_session) over (order by activity_date, activity_time rows between unbounded preceding and current row) as logon_session
activity_... |
247 | 15 Mar 2012 @ 12:47 PDT | Database | Reply | CASE Statement with multiple columns/variables |
if you use in you need to enclose the list - even if it is one with ()
WHEN WX-LON-SUB-STA in ('Deferment')
or use
WHEN WX-LON-SUB-STA = 'Deferment'
|
246 | 14 Mar 2012 @ 08:10 PDT | Tools | Reply | Rowhash deadlock during BTEQ insert |
And just saw that this ids are 15 and the table is 12 :-)...
Here an set of ids with length 12
|
245 | 14 Mar 2012 @ 07:56 PDT | Tools | Reply | Rowhash deadlock during BTEQ insert |
At least I can't reproduce this.
I created a some 12000 ids and loaded them with bteq - see attached data, script and log. Load was quite fast.
Can you run this in your environ... |
244 | 14 Mar 2012 @ 06:31 PDT | Tools | Reply | Rowhash deadlock during BTEQ insert |
in the bteq you defined acc_id_no as varchar(15) in the table as varch(12).
Which length has the acc_id_no?
If 15 - only the frist 12 would be used and can result in many equal values.
... |
243 | 14 Mar 2012 @ 02:20 PDT | General | Reply | Error 3149 |
So the select you shared above was not fully what you did.
Adding columns to a distinct would clearly mean longer time to calculate...
|
242 | 14 Mar 2012 @ 12:55 PDT | General | Reply | Error 3149 |
no idea what might be the root caus for that.
Could be that optimizer internal thresholds are responcible for that. But thats only a guess.
Maybe someone from Teradata can ans... |