#DateForumTypeThreadPost
4220 May 2016 @ 05:12 PDTGeneralTopicRunning Sum counter restart when threshold value reachedHi All, I have a unique situation in that I have the following scenario: Cust      UID     Txn Amount      Running Sum Amount         &...
4121 Dec 2009 @ 11:11 PSTDatabaseReplycalculating for last weekHi,You will have to use the following query for this:Hi folks, I am unable to resolve one issue. Please look at the query below.Selecthotel_id,hotel_week_id,sum(paidearly_rooms_rev) as reserved_roo...
4017 Dec 2009 @ 11:20 PSTToolsReplyfastexport flat file data probHi,I believe the basic issue here is Unicode character set. Please read the data file using a good file reader like EditPlus or UE32. These file readers/editors are capable of reading a file of any...
3930 Nov 2009 @ 11:44 PSTUDAReplyStored Procedure or SqlHi,You can achieve this by using what is called a Partitioned Sum Window function. Use the the grouping key as "ABC", "..." etc and use the MIN and MAX functions to get your first and last times an...
3830 Nov 2009 @ 11:34 PSTToolsReplyTearadata Query and Result using Export UtilityHi,I would have to agree with jimm on this. One approach for you to achieve this is as follows:When doing your select, please make sure to print a special character at every location you want a lin...
3724 Nov 2009 @ 11:21 PSTToolsReplyTearadata Query and Result using Export UtilityHi,Please use SELECT '.....' (title '') FROM ...;the (title '') function will nullify the header and you will get nothing printed in the place of the header. This will solve your problem.
3620 Nov 2009 @ 12:53 PSTUDAReplyNumeric Overflow errorGood point, or you can CAST it to a DECIMAL of (15,0). This should take care of this issue. But knowing your data demographics is the only solution.
3520 Nov 2009 @ 12:51 PSTUDAReplyCopying Table structureHi,I am not sure if you can actually do this automatically. You will need to generate the SHOW TABLE results for your XYZ.Table, manually (or automatically using script) edit the Table structure to...
3420 Nov 2009 @ 12:48 PSTToolsReplyany one plz give me brief explain about this errorHi,I am not sure if this issue is with the data or the logging. Can you please drop all UV, ET, LG and WT tables, release mload on the table and start the job again and try. Let me know what happen...
3320 Nov 2009 @ 12:15 PSTToolsReplyList of views created on a tableSELECT TableNameFROM DBC.TablesWHERE TableType = 'V'and ExplainText LIKE '% your table name here %'Group By 1Order By 1;--Note sure it is ExplainText or SQLText--Please check accordinglyThis will g...
3220 Nov 2009 @ 12:04 PSTToolsReplyTearadata Query and Result using Export UtilityHi,Within your file, make 2 statements. First one will be:SELECT 'SELECT ......... FROM ...... WHERE ...';Second statement will be the actual SELECT statement.Please note that to print a single quo...
3119 Nov 2009 @ 11:59 PSTToolsReplyany one plz give me brief explain about this errorHi,What you should look at is that you have probably set the Table with a UPI. No matter whether it is SET or MULTISET, if a UPI is set on the table, it will not accept duplicate values for the key...
3005 Nov 2009 @ 01:03 PSTAnalyticsReplyweek issuesHi,I can suggest a simple solution based on a few assumptions as stated below. If these assumptioons are wrong then we will have to re-write this query.Assumptions:1. If a guest checks out on a Fri...
2902 Nov 2009 @ 12:25 PSTUDAReplySelect (SHOW sometable) into volatile tableHi,The task you are requesting is not a straight forward implementation in Teradata. But what you could do is as follows:1. Use BTEQ and get the Structure of the tables fromthe 2 environments in 2 ...
2828 Oct 2009 @ 04:52 PDTAnalyticsReplyInserting '?' into a TD tableHahaha,Ok, if I have read this question correctly, Manjeet is actually refering to the SPECIAL CHARACTER "?" which you see in SQL Assistant. Manjeet, this is how a NULL value in a table is also rep...
2728 Oct 2009 @ 04:11 PDTDatabaseReplyrank() (partition by....) helpHi,Yes you are right. You cannot use the PRECEEDING/PROCEEDING function on a rank. But you can use it on an AGGREGATE function call from the Partition function. What you can do too is to ensure you...
2627 Oct 2009 @ 05:18 PDTToolsReplyHow to Convert VARCHAR(30) to a DATE in FastloadOr simpler still, once you have successfully loaded the data on to the table as a VARCHAR (ie you see the DATE 10/01/1900 etc), SELECT INSERT this data onto another staging area table with a CONVER...
2527 Oct 2009 @ 03:24 PDTDatabaseReplyPlease help with update conversion from oracle to TeradataHi,The issue you are seing is that 2 or more rows are appearing from your result set to update one target row. Effectively means that data row duplicates exist in your tables. Try this:update table...
2427 Oct 2009 @ 03:19 PDTDatabaseReplycreate inserts on table dataHi,I am not too sure if I understood your question correctly. But one solution IF YOU ARE USING DYNAMIC inputs for Inserts in Query Assistant is:INSERT INTO TAB A( COL1, COL2, COL3)SELECT (?,?,?);W...
2327 Oct 2009 @ 03:11 PDTDatabaseReplygetting UDFCALLNAME errorHi,Please try this.SELECT 111 "id",item,atr1,rprt_format,'Submitted' "status"FROM (SELECT pkglineitem,atr1,rprt_format FROM TAble1 as a , (SELECT 'Detail' Rprt_format from Sys_Calendar.Calendar whe...
2227 Oct 2009 @ 03:07 PDTDatabaseReplyrank() (partition by....) helpHi,WHat you could use is the PRECEEDING or PROCEEDING function call in the Partition to SELECT the # of rows you desire. Example, if you are ranking, then you can use a filter for Rank #1 and the P...
2127 Oct 2009 @ 01:59 PDTUDAReplyTpump loader ErrorHi,There may be 2 reasons why this may happen.1. The last line of your input file is corrupted or has some special characters (printable or nonprintable) in it.2. The last correct data line of your...
2027 Oct 2009 @ 01:24 PDTUDAReplySQL Question.Hi,The simplest solution I see is to Inner Join your current table to a Table containing all dates as columns with a BETWEEN clause for the eff_bgn_date and eff_end_date. There is usually a DATE da...
1906 Sep 2007 @ 04:42 PDTToolsReplySQL assistant vs BTEQHi,After all the things said in the past replies, I noticed one major point missing in the replies which is a major difference between the 2 tools mentioned:1. Conditional logic can be applied in B...
1821 Mar 2007 @ 06:01 PDTDatabaseReplyLogin using BTEQHi,What have you entered for the logon command?You should use.logon /,;Example.logon abc/user1,pass1;This message usually appears only if the logon details are wrong. it is not usually because of c...

Pages