#DateForumTypeThreadPost
18715 Jan 2013 @ 12:20 PSTDatabaseReplyDelete or Drop a table if it already existsSQL Assistant only supports SQL statements and IF-ELSE are not SQL commands. I don't think you can do this in SQLA, BTEQ scripts are the options where you can implement this functionality!
18611 Jan 2013 @ 12:56 PSTTeradata ApplicationsReplySQL to pull dataOps missed the from clause... SELECT 'SELECT ' || TRIM(TABLENAME) || ' AS TABLE_NM' || ' ,CASE WHEN SUM(CASE when SRC_CD=''S1'' THEN 1 ELSE 0 END) >=1 T...
18511 Jan 2013 @ 12:53 PSTTeradata ApplicationsReplySQL to pull dataThe below SQL will generate the SQL for all the tables in the specified database. You can either execute this in SQL Assistant and can execute the SQLs produced in the resultset or you can create a...
18411 Jan 2013 @ 11:37 PSTDatabaseReplyString Replacements in Teradata SqlTeradata doesn't have a REPLACE function like Oracle does. If you are looking for some complex replace functionality like replacing multiple instances of the same set of characters in the give...
18311 Jan 2013 @ 10:26 PSTDatabaseReplyMERGE-INOThe error message is pretty clear that you have PI or Partition Column included in your SQL statement, you need to remove those columns. As you haven't provided the ddl so its difficult to sugg...
18211 Jan 2013 @ 04:08 PSTToolsReplyNeed help in BTEQ(Import)In the same script, you can load the records from the file in a staging table and then load the target table from the staged table with the filter condition which you want to apply...
18108 Jan 2013 @ 12:24 PSTDatabaseReplyWhich two below reduce the likelihood of a Full Table Scan (FTS)?A
18008 Jan 2013 @ 12:23 PSTDatabaseReplyInsertion ProblemSeems like cust_Acct_nbr contains a character data and thus failing the casting operation. Make sure that cust_Acct_Nbr is numeric only!
17904 Jan 2013 @ 06:25 PSTDatabaseReplyDictionary CACHEThere could be alot of reasons for the bad performance. The index selection of the target table could be different than the source table causing the redistribution of data on the AMPs resulting in ...
17804 Jan 2013 @ 06:22 PSTDatabaseReplyFast Load - Insert Select StatementNormally in this case fastexport/multiload scripts are used, but if you just have an adhoc request then bteq scripts should servce the purpose.
17703 Jan 2013 @ 01:58 PSTDatabaseReplyHow data is physically stored in the Disks by Teradata?The Teradata file system B-Tree is implemented on the Master Index, Cylinder Index, and Data Block Descriptor structures. You can find more details in the following manual... www.info.teradata.com...
17603 Jan 2013 @ 01:52 PSTDatabaseReplyFast Load - Insert Select StatementYou can use fastload to insert the values that are already defined via DEFINE in the script.
17503 Jan 2013 @ 01:35 PSTGeneralReplyAlternate to DBC.SYSEXECSQL()DBC.SYSEXECSQL() has its limitations. There are few SQL statements which are not supported like SELECT, SELECT...INTO, EXPLAIN etc. If you want to see the results of the query, you can insert them...
17403 Jan 2013 @ 01:31 PSTDatabaseReplyError Code 4 Solution requiredReturn Code 4 means warning messages and can be ignored. This message tells you that BTEQ has exhausted the .RUN file and will resume the inputs from stdin. I have seen this happening when bteq s...
17303 Jan 2013 @ 01:25 PSTDatabaseReplyAlter table add columns from variableDynamic SQL is the way to go but you need to consider that the dynamic SQL statements are not validated during the stored procedure compilation, they are only validated during the stored procedure ...
17202 Jan 2013 @ 07:47 PSTPrivate Forum
17113 Dec 2012 @ 07:21 PSTDatabaseReplyI am NEW to SQL writing and I am getting a error message I thought it would work. Anyways, can you share the DDL of referenced tables to have a look.
17013 Dec 2012 @ 04:42 PSTDatabaseReplyBTEQ Equivalent to SQL+ "EDIT" CommandTrue but I think thats the limitation we have to live with while using BTEQ
16912 Dec 2012 @ 12:29 PSTDatabaseReplyI am NEW to SQL writing and I am getting a error message I think the last condition in the AND clause is causing the problem. You can't have LIKE operator in a JOIN clause. You need to move the LIKE condition (MASTER_AGENT_ID LIKE '%APPLE%') ...
16811 Dec 2012 @ 12:00 PSTDatabaseReplyBTEQ Equivalent to SQL+ "EDIT" CommandIf you are in a windows environment then why dont you try text editors like notepad++ or ultraedit...
16705 Dec 2012 @ 01:21 PSTDatabaseReplyWould someone please explain ROW_NUMBERROW_NUMBER generates the allocates a sequence number to the data set. In your case, for each unique combination of A.TID, D.PIN, Tyr (columns in the PARTITION BY clause) will have a unique sequenc...
16605 Dec 2012 @ 12:20 PSTDatabaseReplyHow to find the associated tables or view in teradata?I am not sure if such specific UDF exists or not, but you can have a look at the existings UDFs over the teradata website... http://downloads.teradata.com/download
16505 Dec 2012 @ 11:58 PSTDatabaseReplyHow to find the associated tables or view in teradata?Hi Vaishali, No, the SHOW QUALIFIED SELECT... statement works only for the children (top to bottom). You can't find the parents of a specific table/view through this statement. However, the v...
16405 Dec 2012 @ 10:28 PSTDatabaseReplyHow to find the associated tables or view in teradata?If you are looking for something that returns you the dependency in some table format then unfortuantely nothing like this exists. But you can try SHOW QUALIFIED SELECT * FROM V2. This will retur...
16305 Dec 2012 @ 10:23 PSTDatabaseReplySELECT Failed. 3504: Selected non-aggregate values must be part of the associated groupThe syntax of your Group By Clause is not correct. There is a "." instead of "," in between 2 & 3. Replacing the "." with "," will make it work. GROUP B...

Pages