Quantcast
Channel: Teradata Forums - Database
Browsing all 14773 articles
Browse latest View live

Can we access a table from SQL UDF in TD 14? - topic by mani.atkuri

Hello, We are trying to create a SQL Udf .It should access the table. For example, like below CREATE FUNCTION SYSLIB.INCLUDE (RLS CHAR(1)) RETURNS VARCHAR(90) LANGUAGE SQL CONTAINS SQL DETERMINISTIC...

View Article


ERROR 3070 when creating a table - response (6) by Qaisar Aftab Kiani

First of all you need to take out the AS keywords before the data type name. Secondly VARCHAR(MAX) is not a datatype - you need to mention some numeric value instead of MAX. Something like this will...

View Article


How to Split Column - response (1) by Wasif.Kabeer

Assuming that you are following a standard convention for splitting your address details (say separated by a comma: ","). CREATE TABLE test ( col1 VARCHAR(500) ) ; INSERT INTO test VALUES('House#1,...

View Article

Insert multiple rows in single statement - response (3) by Qaisar Aftab Kiani

Teradata database manaul should give you enough information to understand these options in more detail. Did you try looking there?

View Article

SQL Parser - response (1) by suhailmemon84

Hi, We have a requirement where I need to find what percentage of queries are querying recent data vs the percentage of queries that are querying historical data. I went on google to find any sqlparser...

View Article


parse sqltextinfo column in dbc.dbqlsqltbl - topic by suhailmemon84

Hi, Has anyone parsed the sqltextinfo column of dbc.dbqlsqltbl? I have a requirement where I need to do analysis of what kind of sqls are running on our production system. We do have querybanding, but...

View Article

parse sqltextinfo column in dbc.dbqlsqltbl - response (2) by sachin.sebastian

It would be easier to export the QueryID, SqlTextInfo into a file; and then use grep/ awk in Unix to extract in the required format.  

View Article

SQL Parser - response (2) by sachin.sebastian

Suhail, It would be easier to export the required columns from dbc.dbqlsqltbl into a file; and then use grep /awk in Unix to extract in the required format.  

View Article


Creating a recursive script to handle Oracle script - response (1) by Adeel...

Hi,   Instead of keeping it recursive, you should better change the logic to sequencial and then implement it .... it will have much better performance that way.   Regards, Adeel

View Article


Can we access a table from SQL UDF in TD 14? - response (1) by Adeel Chaudhry

Are you converting fuctions from other RDBM (e.g SQL Server) to Teradata? What will be the use of this fuction?   Regards, Adeel

View Article

Can we access a table from SQL UDF in TD 14? - response (2) by ToddAWalter

A SQL UDF is only allowed to perform an expression and return the result. A Select is not allowed in a SQL UDF.

View Article

CASE statement inside Store Procedure - topic by JoeL 312

I have an insert statement: INSERT INTO tbl1 (Col1) SELECT     CASE         WHEN Col1 = 'a' THEN 'TRUE'         ELSE 'FALSE'     END FROM tbl2; This works as expected.  For every row in tbl2, 1 row...

View Article

CASE statement inside Store Procedure - response (1) by Qaisar Aftab Kiani

You will see this error normally when the SQL statement in the SP are not terminated with semicolon. Can you share the table ddl alongwith the SP definition to have a look as what could be missing....

View Article


Stored Procedure Input Parameter Problem - topic by goldminer

I have created a basic stored procedure whose parameters are defined as:   REPLACE PROCEDURE STORED_PROCS.SP_UPDATE_SAP_CTRL_TABLE read more

View Article

Convert integer to TIME - response (11) by ocirej23

  Hi,   I think this will work:   SELECT CAST(TRIM(CAST(1256 AS CHAR(4))||'00') AS TIME(0) FORMAT 'HHMISS');   Output: ----------- 12:56:00   HTH Cheers, Eco

View Article


FORMAT symbol - response (1) by tdice

i also want to know about this formatting symbol meaning. Any help?

View Article

How to extract column names from a table using Teradata SQL - response (2) by...

Could you plz tell me how to create nickname for a database in teradata  

View Article


FORMAT symbol - response (2) by rajeev saravanan

Hi, Hope this helps I - Represents the number of characters needed to display the INTEGER portion of numeric data. In the case of a DEC(10,2) data type, I is equivalent to 9(8). N - Represents FULL...

View Article

How to extract column names from a table using Teradata SQL - response (3) by...

You can create the alias names for the tables/views in SQL statement but not for the database...

View Article

substring() on huge text column - topic by hpscheepers

Hi I tried searching the forums, but I cannot find the "search" option on the site. My problem: I am using Teradata v13 and I need to do a substring on a huge text column.  The table DBC.DBQLSqlTbl has...

View Article
Browsing all 14773 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>