#DateForumTypeThreadPost
17318 May 2010 @ 07:24 PDTAnalyticsReplyNeed help with OLAP or If function in subqueryYou need to take all the needed columns from your Group Insured table in the OLAP part. So: /*Group Insured Table************************************************* ***************FIX DUPLICATES ...
17217 May 2010 @ 08:55 PDTAnalyticsReplyNeed help with OLAP or If function in subqueryPost the full SQL you are trying to run, together with show table output ffor all the tables involved.
17115 May 2010 @ 09:36 PDTDatabaseReplyquery not giving desired resultSelect * 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...
17014 May 2010 @ 08:40 PDTAnalyticsReplyNeed help with OLAP or If function in subqueryYour 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...
16914 May 2010 @ 08:23 PDTDatabaseReplylock on TABLENo. But the view could have a Locking For Access clause which allows a dirty read on anything accessing the table via the view.
16830 Apr 2010 @ 12:30 PDTDatabaseReplyUse of a Primary IndexThe 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...
16723 Apr 2010 @ 11:09 PDTDatabaseReplyPivoting Data in Teradtahttp://forums.teradata.com/forum/analytics/transposing-data
16616 Apr 2010 @ 07:10 PDTDatabaseReplyJunk 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...
16526 Feb 2010 @ 09:38 PSTDatabaseReplySending email from ProcedureIf 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...
16415 Feb 2010 @ 03:30 PSTUDAReplyPacked decimal format issue.Try:.FIELD PRE_CNT_BK_VALUE * DECIMAL(7,2) NULLIF PRE_CNT_BK_VALUE= '00000000'XB;(Hex Binary)
16309 Feb 2010 @ 04:09 PSTDatabaseReplyStats CollectionThe 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...
16201 Feb 2010 @ 04:02 PSTToolsReplyRegarding Temporary SpaceTemporary 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...
16128 Jan 2010 @ 06:00 PSTDatabaseReplyError -7423 while selectingUpendra'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....
16027 Jan 2010 @ 03:57 PSTUDAReplyConditional where clausesTry 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...
15923 Jan 2010 @ 07:05 PSTToolsReplyMload on Multiple tablesMultiload Reference Manual, Appendix D.(Multiload Job Script Examples - Import Task)
15823 Jan 2010 @ 03:18 PSTDatabaseReplysql statement to convert hundred year date to yyyy-mm-dd formatI 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.
15722 Jan 2010 @ 08:58 PSTDatabaseReplyComples Sql querySelectTwoSeq1.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(...
15618 Jan 2010 @ 09:26 PSTToolsReplyLoading 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...
15506 Jan 2010 @ 04:20 PSTDatabaseReplyTeradata SQLIf 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...
15405 Jan 2010 @ 03:19 PSTDatabaseReplyOracle 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...
15305 Jan 2010 @ 03:13 PSTDatabaseReplyNeed help with WHERE EXISTSNo 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...
15205 Jan 2010 @ 03:06 PSTDatabaseReplyConvert Volatile Table to Permanent TableYou 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 ...
15101 Jan 2010 @ 07:03 PSTDatabaseReplyHow to combine duplicate rows into unique rows in the different fieldsSee 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...
15029 Dec 2009 @ 04:25 PSTDatabaseReplyOuter join IssueSelect 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_...
14924 Dec 2009 @ 08:16 PSTDatabaseReplyHow to monitor the Volatile tableTry 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 ...

Pages