Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: volatile tables with Stata and Teradata

From   "Dimitriy V. Masterov" <>
To   Statalist <>
Subject   st: volatile tables with Stata and Teradata
Date   Tue, 12 Feb 2013 12:11:04 -0800

TL;DR Summary:

Is there a way to tweak odbc to work with volatile tables? I gather
these are a special Teradata feature. They are materialized in spool
and are unknown in the DD, but unlike a derived table, a volatile
table may be used in more than one SQL statement throughout the life
of a session.

Longer Explanation:
Currently, these seem to go poof with Stata (but work with SQL Assistant):

odbc load, exec("create volatile table new_usr as
(select distinct user_id from dw_users where cast(date_confirm as
date) > '2011-09-15') with data primary index(user_id) on commit
preserve rows;

select * from new_usr;") clear dsn("mozart") lowercase;
The ODBC driver reported the following diagnostics
[Teradata][ODBC Teradata Driver][Teradata Database] Only an ET or null
statement is legal after a DDL Statement.

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index