We have a few tables with persisted computed columns in SQL Server.
Is there an equivalent of this in Teradata? And, if so, what is the syntax and are there any limitations?
The particular computed columns I am looking at conform some account numbers by removing leading zeros - an index is also created on this conformed account number...
Hi,
i am getting this(java.sql.SQLException: [NCR][Teradata JDBC Driver]: addBatch not supported) error while trying to execute a query in my application.
i am using addBatch with preparedstatement for constructing the statement and using executeBatch for executing the query.
Cant we use addBatch with preparedStatement for Teradata DB...
Is this valid ANSI SQL?:
SELECT 1 AS X
,2 * X AS Y
,3 * Y AS Z
Because Teradata (12) can do this, as well as this (yes, crazy isn't it):
SELECT 3 * Y AS Z
,2 * X AS Y
,1 AS X
But SQL Server 2005 requires something like this:
SELECT X
,Y
,3 * Y AS Z
FROM (
SELECT X
...
When you need to compare two tables to see what the differences are, are there any tools or shortcuts you use, or do you handcode the SQL to compare the two tables?
Basically the core features of a product like Red Gate SQL Data Compare (schemas for my tables typically always match).
Background: In my SQL Server environment, I created ...
I would like to be able to produce a file by running a command or batch which basically exports a table or view (SELECT * FROM tbl), in text form (default conversions to text for dates, numbers, etc are fine), tab-delimited, with NULLs being converted to empty field (i.e. a NULL colum would have no space between tab characters, with appr...
I'm converting database from Teradata to SqlServer. I've noticed all tables and procedures are named by the prefix "dbo." (e.g. "dbo.Table1").
I would like to know if and how I can get rid of "dbo" because it would make the conversion task a lot more easier.
...
Can anyonen help with Teradata?
I want to create a query that is a standard
select count(*)
from Table
where Column = Something
but has a group by time period done by 5 minute time intervals the time column is in 'Time' format
any idea?
...
Hello
I'm wanting to use variables inside my macro SQL on Teradata.
I thought I could do something like the following:
REPLACE MACRO DbName.MyMacro
(
MacroNm VARCHAR(50)
)
AS
(
/* Variable to store last time the macro was run */
DECLARE V_LAST_RUN_DATE TIMESTAMP;
/* Get last run date and store in V_LA...
Folks,
We are thinking about developing a real time application (a bunch of charts, gauges etc) reading from the database. At the backend we have a high volume Teradata database.We expect some other applications to be constantly feeding in data into this database.
Now we are wondering about how to feed in the changes from the database ...
We need to access a Teradata database via php application We don't have odbc (unixodbc etc) on the server.
How might one go about connecting to a teradata database quickly.
Keep in mind - this app needs to be as portable as possible.
...
I want to use a list of arbitrary numbers as a sort of input to a select. Option A, of course, is to create a temporary table that contains just the values (e.g., 1,2,3).
I hope that you folks know what Option >A is.
Suppose the statement is like:
select Fx,
XXXXXX as Foo
from MyTable
where MyTest depends on each XXXXXX
So if I cou...
I am trying to produce a results table with the last completed course date for each course code, as well as the last completed course code overall for each employee. Below is my query:
SELECT employee_number,
MAX(course_completion_date)
OVER (PARTITION BY course_code) AS max_course_date,
MAX(course_completion_d...
Few months back I saw TeraData Express Edition. I have no idea of this beast. I want to know whether it still comes with Express Edition and whether it is a good idea to use this database for Windows based mid-sized apps.
...
Hi,
I have two tables in a teradata database that look like this
accounts
account_number integer
date_updated_last datetime
delinquency_code varchar(3)
payments
account_number integer
statement_date datetime
delinquency_code varchar(3)
the delinquency code column is populated in accounts, but is not populated in payments. I would li...
I'm trying to make a Teradata SQL query that will return the n-th chronological visit date for each user. E.g.,
user | visit_date
---------------------
a 1/1
b 1/10
c 1/20
a 1/3
a 1/4
b 1/5
c 1/15
b 1/9
> magic_query_for_Second_visit;
user | second
------------------
...
This is in teradata.
For many good reasons, I would like to have a something like the below, where I start by making a CTE that just has a list of literals, and then can refer to it in later statements:
with MyList(num) as(
'a','b','c','d'
)
select foo from mytable where x in ( select(num) from MyList))
This is a very contrived ...
I'd like to be able to set add a field that answers the question "For a value in this record, does that value meet some condition in another table?". I thought I'd try a case-when with an exists, but Teradata (my dbms) does not like it. Any recommendations?
select foo,
(case when exists (select x.foo
from some...
Hi,
I have an inmod for processing one file records and eliminate some unwanted rows and then feed the records to fastload utility. But I am not able to find a correct way to compile it and use it. I have GCC (GNU C Compiler) and TCC (Tiny C Compiler) on my windows macine and I got Fastload utility also installed. I tried to compile the...
hello all,
I have a teradata table with about 10 million records in it, that stores a numeric id field as a varchar. i need to transfer the values in this field to a bigint column in another table, but i can't simply say cast(id_field as bigint) because i get an invalid character error. looking through the values, i find that there co...
I was looking a report on internet that data warehousing is much lucrative and highly paid IT career. I am talking about technologies like abinitio etl datastage teradata. I work in ASP.net and sql server 05. Is it a good thought to move from web programming to data warehousing technologies. Since I would have no experience with data war...