198 | 08 Jul 2010 @ 09:16 PDT | Database | Reply | Help Neeed: conditional execution in macro | Select col1, col2 from tab1
where :id = 2;
Select col1, col2 from tab2
where :id 2; |
197 | 08 Jul 2010 @ 10:09 PDT | UDA | Reply | Numeric Overflow error | Oracle does not recognise the same implicit datatype conversion as Teradata.
Try:
Select Cast(Count(*) As Float) From Tablename;
It is ANSI standard, so even Oracle should cope! |
196 | 08 Jul 2010 @ 09:37 PDT | UDA | Reply | BT/ET | If everything is going OK, there is no difference.
But if they are run in bteq, and there is a restart or deadlock during statement 2 (case 1), statement 1 is rolled back and statement 2 is resubm... |
195 | 01 Jul 2010 @ 03:00 PDT | Database | Reply | Expanding the column size | It is not a bug.
When you define the table (or add a new column) it sets appropriate defaults - Format x(20) in this case for a Char(20) or Varchar(20) column.
When you change a tables properties... |
194 | 28 Jun 2010 @ 03:32 PDT | Database | Reply | How to select values based on variable name and primary key using SQL | Go for the CASE. Volumes are trivial (if you are not using Teradata Express!) and it is easier to build.
Something like:
.Export Report file = bldextr.sql
.Format Off
.Foldlne on all
.Width ... |
193 | 26 Jun 2010 @ 09:33 PDT | Database | Reply | Transaction Units across Multiple | You can wrap BT/ ET around procedure calls as long as the procedures follow the rules. IE you cannot have DDL within a transaction unless the DDL comes immediately before the ET. So if any of the p... |
192 | 23 Jun 2010 @ 10:20 PDT | Database | Reply | How to select values based on variable name and primary key using SQL | I would go with CASE first too, but compare it against this plan B (Union) with your volumes:
Select Var1
From Table1
Join Table2
On Table2.TrackId = Table1.TrackId
And Table2.Attrbute = 'Va... |
191 | 23 Jun 2010 @ 04:31 PDT | Database | Reply | Dynamic DDL | 3 hours ago
You can run something like this in bteq.
.Export Report File=crtab.txt
.Format off
Select 'Create Table dbname.tblname (Title '')
;
Select 'Start_Dt Date Not Null' (Title ''... |
190 | 23 Jun 2010 @ 01:02 PDT | Analytics | Reply | MAX() and MAX() OVER (PARTITION BY ....) in the same query produces error 3504 | The query below using derived tables will give you what you asked for, but it is probably not what you want!
------------------------------------------------
Select D1.employee_number, D1.max_dat... |
189 | 17 Jun 2010 @ 06:06 PDT | Tools | Reply | UTY2403 An invalid statement was found before the .LOGON statement | There is often a clue in the script you submitted!
Check your script had a .Logon, not Logon.
Failing this, post your script. |
188 | 17 Jun 2010 @ 06:04 PDT | Tools | Reply | Transaction Deadlock issue in BTEQ - Failure 3510 Too many END TRANSACTION statements | When you get the deadlock, the transaction is aborted but the session retries - so you are in a new transaction!
I would do too things:
Before the BT in both sessions, tell Bteq not to retry.
Af... |
187 | 15 Jun 2010 @ 03:16 PDT | Database | Reply | DB link equivalent in Teradata | There is an Arcmain Copy facility which will copy databases/ tables from one system to another. |
186 | 08 Jun 2010 @ 06:44 PDT | Database | Reply | Need help with Unicode in DDL issue | You can always put it in as a comment. |
185 | 08 Jun 2010 @ 02:29 PDT | Database | Reply | teradata sql help | The two answers do not give the same results; it depends on your definition of overlapping dates.
Consider a case where table1 has dates of 2010-03-14 and 2010-04-15; table2 has 2010-03-16 and 201... |
184 | 07 Jun 2010 @ 08:17 PDT | Database | Reply | Need help with Unicode in DDL issue | Cannot try it on my machine, but try explicitly making the character constant a Unicode constant.
By:
_Unicode'Česká pošta' AS nazev_cpost |
183 | 07 Jun 2010 @ 12:54 PDT | Database | Reply | teradata sql help | Try this:
Create Volatile Table Table1
(C1 Char ,
c2 Char,
c3 Date Not Null,
c4 Date Not Null,
c5 Smallint Not Null)
Unique Primary Index (c5)
On Commit Preserve Rows
;
Create Volat... |
182 | 04 Jun 2010 @ 03:01 PDT | Database | Reply | Need help with Unicode in DDL issue | What is the issue to be solved?
When you created the view, your default character set must have been set to Unicode.
When the view was set up, it stored the Ceska Polska as a Unicode string and e... |
181 | 04 Jun 2010 @ 02:45 PDT | Database | Reply | re: Help converting SQL Server Loop Query to Teradata! | It may exist on your saystem; it did not on mine! I simply set up a table for testing and put a few records in it to test.
As for the database/ tablenames, substitute your names accordingly. |
180 | 04 Jun 2010 @ 12:12 PDT | Tools | Reply | Do MLOAD affect performance | Yes. When you do a lot of work quickly, it affects your performance on other jobs!
Mload will run as fast as it can. If it is run at the same priority as other jobs, the resource will be shared be... |
179 | 04 Jun 2010 @ 12:06 PDT | Database | Reply | re: Help converting SQL Server Loop Query to Teradata! | You need to use a recursive query to determine the hierarchy in your Region_Cd table.
The following will work:
Create Volatile Table Region_CD
(azcac Smallint Not Null,
ALocClliCd Char(3) ... |
178 | 01 Jun 2010 @ 05:19 PDT | Tools | Reply | Fast Export | You need to put your script in a bat file and run it from there.
(I presume the date you want is yyyymmdd!)
Try:
for /F "tokens=1-3 delims=/ " %i in ('date /t') do set tddt=%k%j%i
echo %tdd... |
177 | 01 Jun 2010 @ 04:32 PDT | Database | Reply | Numeric processor operand error... | 1. unitprice is probably zero on one of the records.
2. You have no join condition, so if either of your subqueries returns more than one row, you are going to do a product join.
So, something li... |
176 | 20 May 2010 @ 03:42 PDT | General | Reply | Query/SP to find unicode | DBC.Columns.Chartype = 2 for unicode, 1 for latin. |
175 | 20 May 2010 @ 02:26 PDT | Database | Reply | Help plz...No more spool space! | You need to join your derived table t to tab1 on all the primary key values. (Note Primary KEY not primary index!)
So:
update DB.tab1 from
(SELECT col1, col2, ROW_NUMBER() OVER (PARTITION BY c... |
174 | 20 May 2010 @ 02:20 PDT | Database | Reply | Error -7423 while selecting | If User1 and User2 do not have the NOWAIT option set, the inserts will run consecutively. First one to send the statement gets in first; the second waits until the other user completes.
You cannot... |