9831 Jul 2008 @ 11:09 PDTDatabaseReplyconvert string to date formatHello,For character dates, you need to specify the format as well.Examples:SELECT CAST('July 22, 2008' AS DATE FORMAT 'MMMMBDD,BYYYY');SELECT CAST ('January 1992' AS DATE FORMAT 'MMMMBYYYY');Please...
9731 Jul 2008 @ 10:55 PDTDatabaseReplyUsing INETERVAL With CASE StatementHello,What error you are getting?Regards,Adeel
9631 Jul 2008 @ 02:59 PDTToolsReplyHelp needed in bteq script to load data into a teradata table from an excel sheetHello,Few of the possible options can be as follows:- Save excel file as CSV file- Use that file as source in fastload script and load the dataor- Using string functions in excel, create INSERT sta...
9530 Jul 2008 @ 03:43 PDTDatabaseReplyInteger Vs Varchar in joins - Performance ImpactHello,It depends on numerous factors such as data, data volume, indexes defined on both tables and type of join used. And logically speaking yes it will affect the performance. And the worst scenar...
9428 Jul 2008 @ 11:25 PDTDatabaseReplyCalculating no of months between 2 datesHello,You can do that using:SELECT CURRENT_DATE - CAST('2008-06-06' AS DATE) MONTH(4);Regards,Adeel
9328 Jul 2008 @ 11:19 PDTDatabaseReplyhow to clean a user's maxpermExactly ... Jim Chapman is right ... my bad!! :(
9228 Jul 2008 @ 11:19 PDTUDAReplyVARCHAR fieldsHello,I seriously doubt if it is a standard practice, and it can degrade the performance as well! If you know your data, I'll suggest you to use data-types accordingly.Regards,Adeel
9128 Jul 2008 @ 07:28 PDTDatabaseReplyTeradata sql to give the table names when you have given the column names in a databaseYou can use it as follows:SELECT * FROM DBC.Columns WHERE ColumnName = 'ACC_NO' AND DatabaseName = 'Account';Regards,Adeel
9028 Jul 2008 @ 07:20 PDTDatabaseReplyTeradata sql to give the table names when you have given the column names in a databaseCan you please define the system tables?And do you know the name of database in which you need to search for the column?Regards,Adeel
8928 Jul 2008 @ 06:05 PDTDatabaseReplyTeradata sql to give the table names when you have given the column names in a databaseWell...for that you can filter using DatabaseName...Regards,Adeel
8828 Jul 2008 @ 05:03 PDTDatabaseReplyudfSubstringIndex functionHello,This is not a Teradata's built-in function.Regards,Adeel
8728 Jul 2008 @ 02:18 PDTDatabaseReplyTeradata sql to give the table names when you have given the column names in a databaseHello,You can use DBC.Columns table for that.Regards,Adeel
8628 Jul 2008 @ 12:47 PDTDatabaseReplyfunction to separate values from a column which are dot separated into n number of columnsHello,If the input column contains delimiter (in your example "."), you can write a UDF which takes 2 inputs i.e. Index and Input string and returns a value on that index.Then you can use it as fol...
8528 Jul 2008 @ 12:43 PDTDatabaseReplyIdentity Column Not Coming in a sequence. Need Suggestion.Hello,Yes, there is no direct/1-to-1 equivalent in Teradata for Oracle sequencers.What you can do, is to write a simple trigger as follows:Suppose we have table definition as follows:CREATE TABLE T...
8428 Jul 2008 @ 12:34 PDTDatabaseReplyExporting - without using the "File->Export Results" functionHello,The following can be done to achieve this:- You need to know the total number of columns you need to export- You can write a UDF, which (if output file doesnot exists, creates it, or append...
8328 Jul 2008 @ 12:28 PDTDatabaseReplyThe installed Teradata Express Database can't be connectedHello,Have you checked your HOST file? Is Teradata UP & Running?HTH!Regards,Adeel
8228 Jul 2008 @ 12:20 PDTDatabaseReplyhow to clean a user's maxpermHello,What is the CurrentPerm for that user?MaxPerm is the maximum perm-space in bytes, ever occupied. It is not the current perm-space!HTH.Regards,Adeel
8128 Jul 2008 @ 12:18 PDTDatabaseReplyHow to read parameters from a table?Hello,You can use Dynamic SQL in Stored-Procedure for this purpose. You may dump the results in some temporary tables, within dynamic-sql statement.Regards,Adeel
8028 Jul 2008 @ 12:15 PDTConnectivityReplyupdating teradata through asp.netFor that you can use query as follows:cmd.CommandText = "UPDATE "+ txtTableName +" SET "+ txtColumnName +" = "+ numValue +" WHERE ID = 1;";This can cause SQL injection attacks possible, which you c...
7925 Jul 2008 @ 12:53 PDTConnectivityReplyupdating teradata through asp.netHello,All you have to do is to change the command text in following:cmd.CommandText = "select Group_Descrip from ExampleDB.ExampleTable";Example:cmd.CommandText = "UPDATE Table1 SET Col1 = 1 WHERE ...
7823 Jul 2008 @ 11:12 PDTDatabaseReplyError-Missing/Invalid SQL statement'E(3706):Syntax errorHello,The best thing you can have for this is, UDF. Alternatively, you can try with EXTRACT and/or INTERVAL.Regards,Adeel
7723 Jul 2008 @ 11:09 PDTAnalyticsReplyif and else condition in bteqHello,You need to put a dot "." before IF as follows:.IF ACTIVITYCOUNT = 0 THEN .QUIT 65;HTH.Regards,Adeel
7623 Jul 2008 @ 04:49 PDTDatabaseReplyDependencies between the tables.Hello,If you are looking for Referential Integrity (Foreign Key Constraints) or Table Level Constraints, you can surely find related tables/views in DBC.HTH.Regards,Adeel
7523 Jul 2008 @ 01:36 PDTDatabaseReplydefault usersHello,Usualy they are DBC, SysAdmin and SystemFe.Regards,Adeel
7423 Jul 2008 @ 01:33 PDTDatabaseReplytrack userHello,You can use Database Quert Loggin (DBQL) for this purpose.On how to use it, consult manuals.Regards,Adeel