#DateForumTypeThreadPost
12326 Aug 2008 @ 06:48 PDTToolsReplyexecuting Teradata utilities on ETL server using C#.net applicationTry creating a shell script and running that, also check for rights/permissions and the file paths.Regards,Adeel
12225 Aug 2008 @ 10:52 PDTToolsReplyexecuting Teradata utilities on ETL server using C#.net applicationWell...you need to save the script and pass it to BTEQ, for that you will have to use direction operator e.g. "BTEQ < Script1.btq". Following is the sample BTEQ script:.LOGON system1/user1,passw...
12125 Aug 2008 @ 07:36 PDTToolsReplyexecuting Teradata utilities on ETL server using C#.net applicationThen you might be able to use "PLink.exe". I haven't tried it myself, but you can use it as:plink.exe -ssh -pw pass -noagent -m commands.txt user@10.0.0.2For reference:http://www.chiark.greenend.or...
12025 Aug 2008 @ 07:13 PDTToolsReplyexecuting Teradata utilities on ETL server using C#.net applicationHello,Is it a windows based Teradata machine?Regards,Adeel
11922 Aug 2008 @ 07:56 PDTDatabaseReplyhow to write a function to retrieve random character from A TO ZIt is very weird! It is a simple SQL, it should work on both. I wonder if this issue can be because of Teradata's version. I tried this on V2R6 and TD-12. It works fine on both (in BTEQ and SQL Ass...
11822 Aug 2008 @ 07:20 PDTDatabaseReplyhow to write a function to retrieve random character from A TO ZCan you try running the same in BTEQ and SQL Assistant and check the outputs?Regards,Adeel
11722 Aug 2008 @ 06:41 PDTDatabaseReplyhow to write a function to retrieve random character from A TO ZExactly how are you executing the query?Regards,Adeel
11622 Aug 2008 @ 06:26 PDTDatabaseReplyhow to write a function to retrieve random character from A TO ZHello,On a very basic level, you can use following:SELECT RandChar FROM(SELECT RANDOM(1, 26) AS Rand, CASE WHEN Rand = 1 THEN 'A' WHEN Rand = 2 THEN 'B' WHEN Rand = 3 THEN 'C' WHEN Rand = 4 TH...
11522 Aug 2008 @ 01:37 PDTDatabaseReplyuncommited readHello,If the data is being loaded/inserted in Teradata Table, you can read it using ACCESS lock. Following is an example:LOCKING TABLE Table1 FOR ACCESSSELECT * FROM Table1;Regards,Adeel
11419 Aug 2008 @ 10:51 PDTConnectivityReplyProblems compiling simple UDF (plusudf).Try the following C-code:#define SQL_TEXT Latin_Text#include void plusudf (int *a, int *b, int *result){ *result = *a + *b;}And the following BTEQ script to compile:.LOGON ;CREATE FUNCTION plusu...
11318 Aug 2008 @ 06:35 PDTDatabaseReplySyntax for creating an user defined function in TeradataHello,You cannot include SELECT statements in Teradata UDFs. Teradata UDFs are C/C++ based objects.For example, you can either search the UDFs forum, or consult the manuals.Regards,Adeel
11218 Aug 2008 @ 03:43 PDTDatabaseReplyHow to generate random integer numbers by using a functionYes, you could have tested it yourself as well. :)For verification, try this several times: "SELECT Random(1, 2);"Regards,Adeel
11118 Aug 2008 @ 03:36 PDTToolsReplyAbout Qurey Optimization & TuningI have already listed the factors involving query optimization. Additionally, the locking factor is also important. For details you can consult the documentation.There is no pre-defined patterns/st...
11018 Aug 2008 @ 03:29 PDTDatabaseReplyHow to generate random integer numbers by using a functionHello,You can use following for random number:- SELECT Random("min value", "max value"); e.g.: SELECT Random(0, 10);For selecting random rows, you can use:- SELECT * from Table1 Sample 10;HTH.Regar...
10917 Aug 2008 @ 11:18 PDTConnectivityReplyProblems compiling simple UDF (plusudf).Hello,Can you please provide the whole C code?Regards,Adeel
10817 Aug 2008 @ 11:10 PDTToolsReplyAbout Qurey Optimization & TuningHello,Explain is specifically for knowning and tuning the execution plan of the queries. You can play with indexes, skewness, joins, join-indexes and statistics to optimize and fine-tune the querie...
10717 Aug 2008 @ 11:06 PDTDatabaseReplyReturned Set from MacroHello,Macro cannot be used like that, for the task you are trying to achieve, creating view will be the best option.HTH.Regards,Adeel
10613 Aug 2008 @ 07:09 PDTDatabaseReplyHow to convert minutes to H:M:S formatHello,Can you please provide an example what exactly you want to do?Regards,Adeel
10513 Aug 2008 @ 12:17 PDTToolsReplyCan we invoke a BTEQ script from a BTEQ script?Hello,Yes you can using ".RUN FILE = ;". Following is an example:Script-1: "S1.bteq".LOGON dbc,dbc;SELECT DATABASE;.RUN FILE = S2.bteq;.LOGOFF;Script-2: "S2.bteq"Script-1: "S1.bteq".LOGON dbc,dbc;...
10412 Aug 2008 @ 11:04 PDTDatabaseReplyUser PROMPTHello,In SQL Assistant, you can use following:SELECT * FROM Table1 WHERE Col1 = ?InputVar1;When run, it will ask for the value of input variable.HTH.Regards,Adeel
10312 Aug 2008 @ 11:01 PDTToolsReplyABOUT PRIMARY and SECONDARY INDEXHello,No you can't, doing so will raise an error "Two indexes with the same columns". Following are couple of examples:CREATE TABLE Table1 (Col1 INTEGER, Col2 INTEGER) UNIQUE PRIMARY INDEX (Col1), ...
10212 Aug 2008 @ 07:25 PDTDatabaseReplyDependent viewsHello,It depends on the way you have implemented the views. If you have given specific column names in views, adding more columns will not impact them.In other case, you can use DBC.Columns (to get...
10112 Aug 2008 @ 03:59 PDTDatabaseReplyINSTR FunctionHello,Your best bet will be the UDF, otherwise you can use multiple combinations of SUBSTR and index functions to get the desired results.Regards,Adeel
10011 Aug 2008 @ 07:33 PDTToolsReplyfast load performanceHello,It depends on the requirements. If they are flexible, you can create data file from oracle, and use that as input for Fastload. Next thing to consider is the network. Thirdly, you can try TPT...
9910 Aug 2008 @ 10:52 PDTToolsReplyBTEQ login problemHello,You need to add user's entry in hosts file. You can follow these steps to do so:- Open "C:\WINDOWS\system32\drivers\etc\hosts" file in any text editor (Notepad etc.)- Add this new line in it ...

Pages