Solved

Teradata SQL - need to import txt document to filter

Posted on 2006-06-23
1
819 Views
Last Modified: 2013-12-12
Select cust_acct_nbr, creation_dt, sale_terr_nbr, dup_acct_flg from cf_cust_acct group by 1,2,3,4 order by 1,2,3,4

I am using Teradata SQL Assistant with the above statement.
This statement finds all cust_acct_nbr.
What I need to do is IMPORT (upload) a .txt file that contains one row on numbers (cust_acct_nbr).
I want to only find the data (creation_dt, Sales_terr_nbr, etc.) for those numbers.
I have seen an IN LIST statement before, I think it would be something like that??

Can anyone help me accomplish this? Thanks a MILLION!!! :)
Regards,bethanne
0
Comment
Question by:ba_trainer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 8

Accepted Solution

by:
sapnam earned 500 total points
ID: 16981029
If you need to upload a .txt file, then you can use Oracle SQL Loader which will load the data into a table.  There are some third party products also available.  

I have not worked on Teradata SAL Assistant and would not know if there are any tools available within it to load data.

I can give you the steps for using SQL Loader, if you want to use the same.

Also, let us examine your SQL Statement

Select cust_acct_nbr, creation_dt, sale_terr_nbr, dup_acct_flg
 from cf_cust_acct
group by 1,2,3,4
 order by 1,2,3,4

In SQL, this statement will fail because you cannot use group by 1,2,3,4. You will have to use the actual field names.Again, I do not know abt the product you use, so maybe the statement works in that.

And why are you grouping, You are selecting 4 fields and grouping by all 4. Do you want a count or something ? Then you have to include a count column.

Please respond to the above so that me or others can help you out better

0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question