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

Substring Error? - response (1) by M.Saeed Khurram

Hi, There are two syntax available for substring:SUBSTRING( STRING FROM FOR)SUBSTR(STRING , START_INDEX , LENGTH) So if you are using substring you must specify FROM and FOR instead of comma. Other...

View Article


How to go last week of end date ? - forum topic by malli123

Hi, I need to pull the last week end date where my week stat day is 'monday' and END day is 'Sunday'. When i am running below query it is working fine for all days except for Monday. Please find the...

View Article


How to go last week of end date ? - response (1) by dnoeth

Did you reading/answer the old post instead of opening a new one? Why do you use a very old version, 12.0.0.03, which is definitely no production system? dayofweek is based on a week starting on sunday...

View Article

Why teradata does not give access to statistics views in dbc by default? -...

What is your TD release? You can always get detailed stats for a table using HELP STATS table plus HELP STATS table COLUMN xy up to 13.10 and SHOW STATS VALUES ON table in 14. Which system views you...

View Article

Delete or Drop a table if it already exists - response (21) by dnoeth

You can't do that in SQLA 12, you have to use BTEQ instead or maybe unchecking "Stop query execution if an SQL error occurs" in the query options helps.

View Article


Why teradata does not give access to statistics views in dbc by default? -...

Similar to all other DBs like oracle, ms sql, sybase etc, you have the rights. You can have a look at dbc.StatsTbl.  If you don't see any DB object, you contact the DBA. In oracle, you can have user-,...

View Article

systemfe.allrestart - forum topic by Raja_KT

Hi, I am executing systemfe.allrestarts with two parameters, but I dont have premission. So I am using as a next way DBC.Software_Event_Log. However, when I use select distinct  function  from...

View Article

Extractin a QUERY TEXT from a Column and using this output we need to insert...

Hi, I have a requirement  which is a following I have a table XX which has a column QUERY_TXT which contains a select query . QUERY_TXT  select * from xxx Now I have to extract the query form the above...

View Article


Extractin a QUERY TEXT from a Column and using this output we need to insert...

Hi, How many rows / Select statements are there in QUERY_TXT?  Do you have to repeat this BTEQ for all the rows in QUERY_TXT? 

View Article


Extractin a QUERY TEXT from a Column and using this output we need to insert...

Hi, What I did is something liks this to get the insert into : select 'insert into '||trim(databasename)||''||trim(tablename) from dbc.tables where tablename='raja_test' and databasename='xxxx';  In...

View Article

Extractin a QUERY TEXT from a Column and using this output we need to insert...

RAJA : Thankyou for the quick response . Khurram : We have to repeat this for all the rows(50 approx) to take the back up in BTEQ .  Regards Anvesh

View Article

Extractin a QUERY TEXT from a Column and using this output we need to insert...

RAJA : I am not able to figureout the logic can you please be a bit more clear on this Regards Anvesh

View Article

Extractin a QUERY TEXT from a Column and using this output we need to insert...

I hope you understand this logic 1: select 'insert into '||trim(databasename)||''||trim(tablename) from dbc.tables where tablename='raja_test' and databasename='xxxx'; ---It gets you the statement...

View Article


Usage of Join indexes? - forum topic by Nishant.Bhardwaj

Hi Experts, As we know that Join Index is helpful in reporting when we have huge tables & complex joins as it avoids the base tables access. But there is limitation that most of the TTUs dont...

View Article

RESERVED WORDS:Query to find Views and macros that reference a particular...

Hello Masters, I am using the following view and macro to find the view/macros that refernce a particular table or view but since it is a macro to pass parameters database and tablename , it is really...

View Article


RESERVED WORDS:Query to find Views and macros that reference a particular...

check http://developer.teradata.com/blog/ulrich/2011/11/extract-and-analyse-database-object-dependencies

View Article

Extractin a QUERY TEXT from a Column and using this output we need to insert...

you can export the SQLs (as full Insert/selects) with bteq and can import and call these generated SQLs in the same job. Check...

View Article


Usage of Join indexes? - response (1) by M.Saeed Khurram

Hi Nishant, a very interesting question, well, there are lot of trade offs when you are deciding about physical implementation alternativs. I beleive when you go for Join indexes, you will have to...

View Article

Multiple Grand Totals - forum topic by spinage

Hello, I have searched for days trying to find answer to this without any sucess.   My Query: select        HOSTNAME       ,LOCATION       ,RACK_NUMBER       ,RACK_POSITION       ,RACK_UNITS...

View Article

Usage of Join indexes? - response (2) by Glass

Nishant, We use quite a few JIs here. Fortunately we use staging tables to apply changes to our base tables. So when updating,inserting or deleting  the ji is alway supported.  Rglass

View Article
Browsing all 14773 articles
Browse latest View live


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