#DateForumTypeThreadPost
5704 Nov 2013 @ 06:52 PSTDatabaseReply3976: Incorrect referential constraint definitionPlease include the DDL of the parent and child tables you are attempting to build the reference for.
5630 Oct 2013 @ 04:33 PDTDatabaseReplyfetching data by joining 2 tables in a viewYou can do this by aliasing T2 with two different aliases select  tb2a.H as column1 ,tb2b.H as column2 from table1 t1 inner join table2a t2a on (t1.a=t2a.e and t1.b=t2a.f and t1.c = t...
5528 Jul 2013 @ 04:14 PDTDatabaseReplyDeleting data from DBQLogTbl?Purging the dbql tables to history is a very common task.  How often you run the script and how much history you retain is generally dependent upon a combination of how busy your system i...
5425 Jul 2013 @ 11:06 PDTDatabaseReplySQL Error on 'Create Table'Hi!  The "order by" isn't executed until the entire set has been generated.   Sorting doesn't occur until the query execution has completed.  I'm not sure abo...
5324 Jul 2013 @ 05:15 PDTGeneralReplyReg: Data shift from one column to anotherAre you importing to Excel using comma separated values? I've seen this happen when commas are used as the column separator and exist in the data.  You can try changing your column separat...
5224 Jul 2013 @ 05:12 PDTDatabaseReplyCan I do select from fallback table?umm... no
5118 Jul 2013 @ 05:42 PDTDatabaseReplySQL for last year starting and ending datesThe starting dates and end dates for a year are constant, why would you waste cpu cycles trying find max/min.  The year always starts with January 1 and ends with December 31.  If its a l...
5017 Jul 2013 @ 01:41 PDTDatabaseReplyI want to separate the full name in two partsNew Example:   Elvis Vande Berg.... This problem is simple at first glance, but you need to check for the number of spaces etc.. to effectively pull this off otherwise you contact your &...
4915 Jul 2013 @ 05:49 PDTDatabaseReplyHow to determine the Identity column name for a table having such a column?If you search through the user documentation (freely downloadable from teradata.com) somewhere in there is a list of the mnemonics used in that and some other columns.l
4815 Jul 2013 @ 02:19 PDTDatabaseReplyHow to determine the Identity column name for a table having such a column?You need to spend some time familiarizing yourself with the dbc views. In particular, dbc.columns, which should answer your question.  The Teradata User Documentation will assist in your quest...
4719 Jun 2013 @ 05:07 PDTDatabaseReplyPerfect Query Timings needs to be capturedThe starttime column in the dbc.dbqlogtbl table is when the query started. FirstRespTime is when the query was completed and the first row of the resultset was returned to the user/a...
4618 Jun 2013 @ 12:59 PDTDatabaseReplyPrecision loss during expression evaluation - data type issue?The 2614 error says that the result is too small.  I plugged some literals your  cast stmt, and got the same errors.  When i force the order of operations and limit the values to fou...
4508 Jun 2013 @ 04:51 PDTGeneralReplyWant to remove some data values on the basis of count second column If you can solve it using simple subqueries, you should solve it that way.  These things tend to get complex enough without developers trying to prove their SQL skills.   The subtitle a...
4414 May 2013 @ 07:52 PDTPrivate Forum
4312 May 2013 @ 05:26 PDTDatabaseReplyInternal stored procedure getting executed only once within a do-while loop in a main stored procedure.Niar, Please post the rest of the outer SP.  Without seeing how you are setting cc_max & cc_min, it's tough to evaluate what might be happening Thanks
4209 May 2013 @ 01:06 PDTDatabaseReplySecondary indexesAs was mentioned earlier, MLOAD supports NUSI's, but it won't support USI's...in that case you might look at other suggestions like Shelly's PPI input or drop and recreate as pre an...
4109 May 2013 @ 01:04 PDTData ModelingReplyCan Teradata display the Quarter value of a date?Join your reporting date to the sys_calendar.calendar view and you can pull "quarter_of_year" from the system calendar.  If you need to shift the QOY field to represent a fiscal or o...
4029 Mar 2013 @ 07:34 PDTDatabaseReplyQuestions regarding Aggregate Join IndexYou can build two JI's to "vertically partition" as KS suggested.  Your explain plan should show a join between the JI's without even accessing the underlying tables, if you&...
3905 Mar 2013 @ 12:41 PSTViewpointTopicTVS Portlet The TVS portlet shows me the 'balance' of the cylinders allocated to each bucket, hot, fast, medium.... Is there a way to identify what data is where, i.e. by database or table? Thanks!
3825 Feb 2013 @ 12:50 PSTDatabaseReplyexact table cloneThe following code will generate "show table" statements for all of the tables in the specified database.  You can export the answer set to a .txt file from QueryMan and run the stat...
3723 Feb 2013 @ 06:29 PSTDatabaseReplyHow to validate whether my PI selection is right?The thing about the Primary Index is that ISN'T all about data distribution.  If you select a PI that perfectly distributes the data across the AMPS, but is never used as a Join column or ...
3622 Feb 2013 @ 09:50 PSTDatabaseReplyDropping Primary Composite KeyPrimary Keys and USI's are different animals if you try to run the DDL below code, it fails with "More than one primary index of primary key specified".  Teradata will creat...
3521 Feb 2013 @ 10:53 PSTDatabaseReplyDropping Primary Composite KeyYou can't drop a Primary Index in Teradata. Your initial assertion that its a primary key but not part of the PI cannot be correct.  If you specify Primary Key in your Teradata DDL, ...
3416 Jan 2013 @ 05:07 PSTDatabaseReplyDelete or Drop a table if it already existsDH, This sounds like a perfect use for a Global Temp table in your code.  The structure of the table stays in the DD after you log off, eliminating the need to run all that create volatile ta...
3313 Jan 2013 @ 08:19 PSTGeneralReplypick a NUPI over an UPI because the NUPI column may be more effectiveCheeli, It's all about the access.  Since you've proclaimed yourself a newbie, remember Primary Index <> Primary Key.  PK's are logical constructs in the TD world. TD ...

Pages