0 - 49 of 49 tags for query

Query -

Hai, i want to insert value to identity column,

is there syntax like

SET IDENTITY_INSERT ON | OFF ------- SQL SERVER
in teradata ??

This is for migrating data from table1 to table2, both of tables have identity column ?
Help

Thanks.

Hi guys,
The Viewpoint of my inviroment is very slow and I want find another way to monitoring when this kind of problem occurs.
How can I create something like the portlet of "Query monitor" of viewpoint throught DBQL tables or anything else ?
Is there possible ? 
 

Hi All,
 
Is there any way to count queries which do all row scan of tables? I tried to get the same through dbc.DBQLExplainTbl but it didnt help.
Any help would be appreciated.
 
Thanks,
Dinesh

My data looks something like this:
table1:
ID | Line | Code
1 | 1 | a
1 | 2 | b
2 | 1 | d
2 | 2 | e
2 | 3 | f
 
table2:
Code | Name
a | alpha
b | beta
d | delta
e | epsilon
f | phi
 
A common join brings the following results:
ID | Line | Name

Hi.
When I tried to drop the table I got the error "The string contains an untranslatable character" The table name looks like "sth_wro->s" in Teradata Administator. I tried using BTEQ to select the table name from dbc.tables with various session charset, but it's still the same.
How can I get the real table name or just drop it?

There is  "poetic query" that takes forever to run
Kind of looks like this
sel
col1.tb1,
col2,tb1,
(case <condition involving tb1 and tb2>) as "Dcol1",
Sum ( col1.tb3),
sum (col2.tb3 ),
sum (col3.tb3)
etc
from
tb1 left outer join tb2 <condition> LOJ tb3 <conditions>

We are pleased to announce general availability of the Teradata Developer Tools for Visual Studio 15.11.
This product may be integrated with Visual Studio 2010, 2012, 2013 or 2015 and can be downloaded from the following locations:

We are pleased to announce general availability of the Teradata Developer Tools for Visual Studio 15.10.
This product may be integrated with Visual Studio 2010, 2012 or 2013 and can be downloaded from the following locations:

We are pleased to announce general availability of the Teradata Developer Tools for Visual Studio 15.01.
This product may be integrated with Visual Studio 2010, 2012 or 2013 and can be downloaded from the following locations:

Hi,
 
I'm trying to do something like below, but its giving me syntax error,
can anyone please tell me what is the issue and how to fix this.
 
with cte0(ID,int_col1) as(
    select row_number() over (order by (select 1)) AS ID,int_col1 from shuffletest
)
update cte0 set int_col1=ID;
 

Hello there,
I have table in Teradata Express that contains the countries of the world. The NAME column contains the country names and the GEOM colum contains their geographical information (the GEOM colum is of type ST_Geography). I created this table by importing a shapefile using Teradata's TDGeospatialImporter tool.

Hello,
I have an issue while trying to get only the record containing max(c.event_dtm) from the following query:
SEL     a.startclock_day,
           a.shacct_no,
           a.awb_no,
           b.ship_ref,
           b.lc_event_cd,
           c.event_dtm,
           c.gmt_event_dtm,

Hello All !
 
I am bit new to Teradata and started working on it couple of months back.
 
I working on performance tuning suggestions for some new queries.
 
Wondering if anybody can help on:
How we can decide for the stats for new queries. I mean, the queries which are not in production yet.

Hi,
 
I'm trying to write an SQL statement based on this example data (just the first 3 columns)
 
OUTLET_ID DATE_ID      QUALITY_FLAG Count
799              01.06.2014   1            
799              02.06.2014   1

Hi Guys,
 
I am brand new to Teradata and writing advanced queries (with data munipulation).  I just got out of school.

 

This article will introduce the new features and UI enhancements that have been added to Teradata SQL Assistant 15.0.
With the exception of a few minor enhancements to support new Teradata Database 15.0 features these changes all relate to the Query window or Query execution.

I have a small database to keep track of weekly scores.  Each participant can have 2 or more scores each week.  Some players don't play every week and have no scores for those weeks.  I have the following tables:
Person:  pid, pname
Week: wn, CalDate
Scores:  wn, pid, score

We have several queries that sometimes get stuck in response mode. Is there a way to real time see what the queryid is of a query that is currently in response mode? Using the following:
 
SEL a.*,
    b.sqlrowno,
    b.sqltextinfo
FROM dbc.qrylog a
     LEFT OUTER JOIN dbc.qrylogsql b

 

We are pleased to announce general availability of the Teradata Developer Tools for Visual Studio.
This product may be integrated with Visual Studio 2010 or 2012 and can be downloaded from the following locations:

How do I combine multiple Select queries?

I have 7 queries run separately. Each query return 2 columns. Count(of something), (date)

Date Range is Fixed for each query Set to 1 Week only.

 

This article will introduce the new features and UI enhancements that have been added to Teradata SQL Assistant 14.10, and highlight some existing but lesser known features.

This article assumes that you are already familiar with the features in SQL Assistant 14.01. If not, you may wish to read the following articles first:

Hello,
 
I would like your help for the next issue.It is a real problem,but i will presente you like an example.
 
I have a view which is composed as below
 
viewa =
sel * from
(
calendar_dim
inner join
(
sel * from table_a
inner join table_b

I am building a query to show VendorID, Check#, and CheckDate
Vendors have many check numbers  and many check dates, I just want to pull the most recent check number and date per given vendor. 
Help?

I've run into an issue with a rollup I am trying to do and was wondering if anyone has any ideas on how to do it in as few steps as possible.
I have used several olap functions to build a table that has the following data:

Hi, can anyone tell me how to check the progress of my SQL Query?  I've looked around on viewpoint but the best I get to is to check wheter or not is running or if there is a CPU skew.  The hep told me to click on session in the query monitor, but that's not doing anything.  Anyone?

 

 

Hello,

 

I have to analyze some really complex queries. I would like to have a general overview of the whole process which contains about 15 sql scripts.

It would be a tremendeous help if I could find some software that could helm me do that.

Hello,

 

I have to analyze some really complex queries. I would like to have a general overview of the whole process which contains about 15 sql scripts.

It would be a tremendeous help if I could find some software that could helm me do that.

dear all, below is my query and the explain.

any suggestion on how to tune the query..thx for your time.

-----------------------------------------------------------------------------------------

I want to Update and Insert when a condition in the case was true. However, it seems that Teradata doesn't accept it. My question is, is there a way for that to happen?

Like

 

CASE WHEN SEL Table1.Column return TRUE

THEN UPDATE Table2 AND INSERT Table3

ELSE

INSERT Table2 AND INSERT Table3

END

Hello Masters,

I am dealing following case right now. When a query is run 4 times in matter of 'half a minute' I got four different elapsed times, variation between these times are ranging from 2 sec to 6 sec.  And I do not think there is any change in amount of load being put on the box during that half a minute.

 

It was a complex Business Objects report with some > 30 joins and instead of coming up with some sort of Join Index recommendation I Wiz is asking me to drop a bunch of NUSI's that are'nt getting used and says it will improve the system performance 15%.

Teradata is pleased to announce the official release of Teradata Viewpoint 13.12 effective August 26th, 2011.

Hello,

I have an issue regarding a group by for my query: Error 3540

I understand what it means on a basic level and I believe the issue revolves around this particular column

CAST((COALESCE(price, 0.000000)) AS DECIMAL(18,6)) * quantity amount

I have a table that is a list of users that I need get as a heirachal answer set. This table has people from 1st level, 2nd level, and 3rd level in the organizations heirarchy all built the same way..i.e.

user_id first_name last_name supervisor_id

My problem is that supervisors are built the same way, where the supervisor_id is actually a 2nd line manager. What I need to do is retrieve users by specifying the 3rd level (second line manager) , and list it as such:

user_id first_name last_name supervisor_id second_line_manager

Hi,

I was running a complicated query using Teradata installed on my local laptop. But my laptop went to stand-by mode as it was closed. So, I had to re-boot my laptop. I have been running the teradata query for the last 8 hours and feel frustrated. Is there a way to recover whatever was done by the query and re-start from where it crashed?

This article will introduce the new features and UI enhancements that have been added to Teradata SQL Assistant 13.11. The focus of this release is on usability and Section 508 conformance.

This article assumes that you are already familiar with the features in SQL Assistant 13.10 Edition 2. If not, you may wish to read the following articles first:

I have data in Apps Table as:

(app_id,store_id,mail_id)
(1,111,'abc.com')
(1,111,'def.com')
(2,222,'krk.com')
(2,222,'gfh.com')

How could I obtain the output in this format:

(app_id,store_id,mail_id)
(1,111,'abc.com,def.com')
(2,222,'krk.com,gfh.com')

Hi

I have a few Decimal, Character and Integer columns in my table. How may I write a query in Teradata to get the maximum permissible characters/digits in each of those columns? Please help this newbie.

Thanks and regards
Abhishek

I am using Teradata SQL Assistant 12. I have an sql query consisting of 26 steps - 13 create table select statements with a drop table statement before each. Sometimes, but not always, when I execute the query it will run the first 3 steps and stop. It does not error, nor does it tell me it did not execute the entire code.

Teradata is pleased to announce the official release of Teradata Viewpoint 13.11 effective December 17th, 2010. The fourth release of Viewpoint in 2010!

I need some help with creating a SQL query.

I have 3 tables Table1 (ID1, ID2, dataValue1) , Table2 (ID1, ID2, dataValue2), Table3 (ID1, ID2, datavalue3)
there is zero to many relationship between Table1 and Table2
and zero to many relationship between Table1 and Table3

This article will introduce the new features and performance enhancements that have been added to Teradata SQL Assistant 13.10 Edition 2. The focus of this release is on usability and performance.

Please see What’s new in Teradata SQL Assistant 13.10 for details of the new features that were added to the original 13.10 release.

Hi people...i am sorry if i am posting this in the wrong forum, but please bear with me...
I have a requirement where i need to find out whether a particular column in the table is a unicode or not... any pointers would be of great help. A query if possible is more desirable.

Thanks in advance!!

Hi All,

I need to create a teradata query.
The below is the senario:

I have a table name ABC.In that table i have a column student id, course id, course name, assigned date and completion date

Eg:

IDN STUDENT_ID Course_Id Course_Name Assigned_date Com_date
1 10001 X XYZ 2-JAN 11-May
2 10001 X MLN 2-JAN 11- May

I have a pretty complex query that pulls the following "Insured IDs" from a table specified in the coalesce statement. The problem is that there are duplicate records with the exception of two letters in a string. I want to be able to only bring in the record with the "RT" In the string. I realize i might have to use a substring of sorts to accomplish this as well as a subquery? Perhaps an IF statement?

This is what the data looks like:

42078 00561070 610000000 06042129 Smith Joe 00561000000000000EE19470123F

This is the second in the series of blogs regarding cool features and tidbits within Teradata Viewpoint. Today's discussion is going to focus on SQL Scratchpad, a new Self Service portlet released with Viewpoint 13.0.1 in June 2009.