173 | 18 May 2010 @ 07:24 PDT | Analytics | Reply | Need help with OLAP or If function in subquery | You need to take all the needed columns from your Group Insured table in the OLAP part. So:
/*Group Insured Table************************************************* ***************FIX DUPLICATES ... |
172 | 17 May 2010 @ 08:55 PDT | Analytics | Reply | Need help with OLAP or If function in subquery | Post the full SQL you are trying to run, together with show table output ffor all the tables involved. |
171 | 15 May 2010 @ 09:36 PDT | Database | Reply | query not giving desired result | Select *
From B
Minus
Select * From A
;
Depending on volumes, it may take a while because the different PI's mean it will have to rehash one of the tables.
Make sure you have stats (up to d... |
170 | 14 May 2010 @ 08:40 PDT | Analytics | Reply | Need help with OLAP or If function in subquery | Your requirement is not fully spelled out, but try using an OLAP and Case on your select from the gird table.
Something like:
LEFT JOIN
(Select i_pol
, i_ird
From ltc_p.vltc_er_ird_mo
Q... |
169 | 14 May 2010 @ 08:23 PDT | Database | Reply | lock on TABLE | No.
But the view could have a Locking For Access clause which allows a dirty read on anything accessing the table via the view. |
168 | 30 Apr 2010 @ 12:30 PDT | Database | Reply | Use of a Primary Index | The primary index is not really an index - it is the columns which go into the hashing algorithm to position (or locate) the record physically within the database.
If the PI has 4 columns, but you... |
167 | 23 Apr 2010 @ 11:09 PDT | Database | Reply | Pivoting Data in Teradta | http://forums.teradata.com/forum/analytics/transposing-data
|
166 | 16 Apr 2010 @ 07:10 PDT | Database | Reply | Junk Characters in FASTEXPORTED Flat file.. | The pipe constant you are using as a separator defaults to a varchar, making the whole string a varchar. Cast the whole string:
SELECT
cast(cast(cast(ProcID AS CHAR(5))||'|'||
cast(CollectTim... |
165 | 26 Feb 2010 @ 09:38 PST | Database | Reply | Sending email from Procedure | If you are running on Linux/ Unix, you can call your stored procedure from bteq, then use the .OS command to send the messages. If you want to add some sort of details from the database, your store... |
164 | 15 Feb 2010 @ 03:30 PST | UDA | Reply | Packed decimal format issue. | Try:.FIELD PRE_CNT_BK_VALUE * DECIMAL(7,2) NULLIF PRE_CNT_BK_VALUE= '00000000'XB;(Hex Binary) |
163 | 09 Feb 2010 @ 04:09 PST | Database | Reply | Stats Collection | The old rule was to collect stats on the columns while the table was empty; collect stats on the table when it is populated and it will repopulate them all at once (in a single pass).
Later rele... |
162 | 01 Feb 2010 @ 04:02 PST | Tools | Reply | Regarding Temporary Space | Temporary space is the amount of space which can be used to create temporary tables - either volatile tables or global temporary tables.The space comes from within the users spoolspace; it is in ef... |
161 | 28 Jan 2010 @ 06:00 PST | Database | Reply | Error -7423 while selecting | Upendra's answer only gave part of the picture.When inserting or updating rows from a query (Insert/ Select or Update where the primary index is not specified), a Write lock is placed on the table.... |
160 | 27 Jan 2010 @ 03:57 PST | UDA | Reply | Conditional where clauses | Try this below (but check it gives you the result you expect):FROM F_SR_DMD_SALES_T DMD LEFT OUTER JOIN LKP_AMGEN_PRD_TO_PI_SLS_SPLIT LKPON DMD.MATERIAL_KEY = LKP.AMGEN_MATE... |
159 | 23 Jan 2010 @ 07:05 PST | Tools | Reply | Mload on Multiple tables | Multiload Reference Manual, Appendix D.(Multiload Job Script Examples - Import Task) |
158 | 23 Jan 2010 @ 03:18 PST | Database | Reply | sql statement to convert hundred year date to yyyy-mm-dd format | I presume these dates are the number of days since Jan 1st, 1900.So:select Date '1900-01-01' -1 + 40196;gives you 19th Jan 2010. |
157 | 22 Jan 2010 @ 08:58 PST | Database | Reply | Comples Sql query | SelectTwoSeq1.Item_Id, TwoSeq1.Manager_Id As Seq1_Mgr, DiffSeq.Manager_Id As NxtSeq_MgrFrom(Select Item_Id, Manager_IdFrom TblWhere Seq_No = 1Group By 1Having Count(*) > 1) AS TwoSeq1Inner Join(... |
156 | 18 Jan 2010 @ 09:26 PST | Tools | Reply | Loading a table from multiple files using fastload. | Depends on your environment.On Unix/ Linux, cat the files together by: cat infile*.dat >>newfile.dat(will take infile1.dat, infile2.dat, etc and put them all in newfile.dat.)On mainframe, use... |
155 | 06 Jan 2010 @ 04:20 PST | Database | Reply | Teradata SQL | If you use bteq to build the script, use .FOLDLINE to split across lines.eg:.Export Report file = filename.Foldline on All .Heading OffSelect'Create User'||usrname (Title ''), 'From etc,etc,etc' (T... |
154 | 05 Jan 2010 @ 03:19 PST | Database | Reply | Oracle numeric data type equivalent on Teradata. | Oracle is using a float data type - so use a float data type if you want the same features.One problem with float is that you can get loss or approximation of significant digits if you have very lo... |
153 | 05 Jan 2010 @ 03:13 PST | Database | Reply | Need help with WHERE EXISTS | No you cannot - you do it by using a normal join.Product Join is not always bad news. If you have a few states and lots of counties, it is more efficient for Teradata to duplicate the states across... |
152 | 05 Jan 2010 @ 03:06 PST | Database | Reply | Convert Volatile Table to Permanent Table | You cannot convert the existing table to permanent, but you can:Create Table permtable From volatiletable with Data ;That will create a table same as the volatile table (columns, indices) and copy ... |
151 | 01 Jan 2010 @ 07:03 PST | Database | Reply | How to combine duplicate rows into unique rows in the different fields | See the code below.This joins SF and LA rows on the basis of same Key, and the lowest Any field in SF is joined to the lowest Any field in LA.This gives a difference from your expected result set b... |
150 | 29 Dec 2009 @ 04:25 PST | Database | Reply | Outer join Issue | Select HTLD.Hotel_Id, HCAL.Month_Id, HCAL.Week_Id, HTL.Room_Reserve_Dt AS Reservation_DtFrom Hotel_Data_Tbl HTLDCross Join Hotel_Calendar HCALLeft Join Hotel_Tbl HTLOn HTLD.Hotel_Id = HTL.Hotel_... |
149 | 24 Dec 2009 @ 08:16 PST | Database | Reply | How to monitor the Volatile table | Try doing a:Show query;instead of explain query.This normally gives an explain of the query and DDL of all tables/ views involved.I have not tried it with a volatile table yet, but I see no reason ... |