Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


using tearadata date as index in a volatile table

using tearadata date as index in a volatile table

using tearadata date as index in a volatile table

I am running a program in teradata sql in SAS using proc sql.
I am creating a month end date that I need to use as a primary index later in the program

here is an example
proc sql exec noerrorstop;
connect to teradata (tdpid=xxxx database='dbname'  
SERVER=xxxx   username=xxxxxxx password='yyyy' mode=teradata

create volatile table xyz as
( select  f1
         ,(ADD_MONTHS(teradata_dte - EXTRACT (DAY FROM teradata_dte) + 1, (0+1)) - 1) as mo_end_dte
)by teradata;

in the above example if the mo_end_dte is the first column listed, the query runs for a long time...as long as an hour
before i cancelled it. in the listed form, it runs in seconds. Likewise if I use it as the first column building a volatile table further in the query (making it a PI) it grinds on forever. Any ideas?

I need to use it as a PI in successive volatile tables.
Thanks for any help.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close