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

Concatenate o/p of two select statements - response (7) by mohan.mscss

Hi Teradatauser2, All the queries which is posted here will get product join except the query which is posted from Mathuram especially when you are performing with more than one table process. if we...

View Article


Concatenate o/p of two select statements - response (8) by mohan.mscss

To add, the query posted by Dieter is a scalar sub query which will work with TD 13 onwards.. Hence I am not sure about whether this will get product join or not..  

View Article


Add comment on a COLUMN or TABLE - topic by veskojl

Hi, I'm trying to add a comment whithin the CREATE TABLE ddl. I've check that Teradata supports comments  via statements of the type: COMMENT ON COLUMN table.col 'A comment!'but the problem is SQL...

View Article

Add comment on a COLUMN or TABLE - response (1) by mohan.mscss

if you just need it in the query then use double hypen to put comments ct dummy( int a --value of a ,int b -- value of b ) But make sure, the comma has to be on the next line :-). . Regards, Mohan K

View Article

Command Help : Alter table modify column - response (1) by Qaisar Aftab Kiani

ALTER TABLE to change the datatype of existing columns is very limited. You can use this statement to change the VARCHAR and increase the number of characters but I don't think you can do that to...

View Article


Add comment on a COLUMN or TABLE - response (2) by veskojl

I've just realized that adding regular comments will do the trick. CREATE TABLE test( id INT /* This is the ID! */ ) 

View Article

Command Help : Alter table modify column - response (2) by taruntrehan

Thanks for your inputs ... I am aware of this approach. However, wanted some inputs as there are 25 columns to be renamed !!! Further, i need to maintain the same order of columns as there is load...

View Article

Concatenate o/p of two select statements - response (9) by KS42982

I don't think any of the above queries (except Dieter's) would work without having product join. To ask your question on what is the better solution, then in my opinion, as in your scenario - where you...

View Article


Command Help : Alter table modify column - response (3) by KS42982

As you need to rename so many columns, I'd suggest, you create a new table with desired datatypes, copy all the data from the existing table to this new table by casting to varchar, drop the existing...

View Article


Command Help : Alter table modify column - response (4) by dnoeth

@KS42982: Why use a temp table and drop it Create a new table with the required definition, insert/select and the rename the tables: create newtab (...); ins newtab sel * from oldtab; collect stats on...

View Article

Need to calculate using LEAD, LAG function - response (13) by dnoeth

ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING is similar to ROWS UNBOUNDED PRECEDING (= ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW), but ROWS UNBOUNDED FOLLOWING is syntactically not allowed....

View Article

Best approach to handle partition in truncate load table - response (1) by...

Short answers: #1: Yes, No #2: No   The partitioning on dates fits your example queries, they will benefit from the PPI, but when the PI is accessed it will be slower than before: it's still an...

View Article

Can't compile UDF's on Windows - response (2) by tdgi

I should have included more info.  Here's an excerpt from the resultant dip14.txt:   /************************************************************************ *  External Procedure SQLJ.INSTALL_JAR:...

View Article


Command Help : Alter table modify column - response (5) by KS42982

That is definately a good approcah. However, what I hear from DBAs in my company that RENAMEing table is not a good stable thing to do in teradata. So in such kind of situations, they always prefer us...

View Article

Concatenate o/p of two select statements - response (10) by teradatauser2

  1 2 SEL Col1,Col2,Col3,MaxCol FROM table1, (SEL MAX(eff_date) MaxCol FROM table2)t Hi Mathuram, Could you please explain you query. I couldn't uderstand it. Where we get maxcol value in the upper...

View Article


I need to add starbox comments to table DDL. Works with view DDL, but not...

Hello everyone, I'm on a new project and one of our requirements is that all DDL objects must be created using a STARBOX in the DDL for tracking purposes.  Here's what this looks like when creating a...

View Article

Concatenate o/p of two select statements - response (13) by Mathuram

Hi teradatauser2,     SEL Col1, Col2, Col3, MaxCol FROM table1, (SEL MAX(eff_date) MaxCol FROM table2)t   In the above query t is the derived table, so table1, t will do Cartesian Product Join, that...

View Article


Cursors in stored procedures - response (3) by mithunk

Do we have any other option apart from using cursors to return resultset from a teradata stored procedure?  

View Article

DBQLOBJTBL - unknown values - response (1) by HelmutR

Hi Kepler, I think your question was already answered somewhere else ... But in my opinion you have to see this like a bitmask 1   = Found in the resolver =                      0000001 2   = Accessed...

View Article

Cursors in stored procedures - response (4) by dnoeth

Hi Mithun, there's no other option, but it's *not* a cursor, it's just the syntax of a cursor. Dieter

View Article
Browsing all 14773 articles
Browse latest View live