How to import data from excel sheet using SqlAssistant
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


How to import data from excel sheet using... Expand / Collapse
Author
Message
Posted 8/12/2008 3:12:32 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/30/2008 4:02:35 AM
Posts: 7, Visits: 17
Hi,



I need to import rows from an excel sheet to a table in my data base using SQLAssistnt.

DDL of my table

CREATE MULTISET TABLE ANIL.XREF ,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT
(
METRC_ID SMALLINT NOT NULL,
TRAN_TYPE SMALLINT NOT NULL,
INCR_DECR CHAR(4) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL)
UNIQUE PRIMARY INDEX XREF_UPI ( METRC_ID ,TRAN_TYPE );



Thanks in Advance.



Regards,

Anil


Anil
Post #12525
Posted 8/12/2008 7:08:53 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 9/8/2008 7:42:33 AM
Posts: 22, Visits: 53
Hi Anil,

There are several ways to inport the data from Excel sheet to our target database. I will tel you one of two approach, you can try any of that.

Follow the steps :-
-------------------
I) Approach I
-------------
1. Export data File from Excel to Comma Separated values (CSV ) Format.
2. Use Fastload For your Database Table
3. Now make use of the generated CSV files
4. point to file generated & Run the Fast Load Scripts

II) Approach II
-------------
1) Apply Formula Logic in Excel Sheet & try to generate the Individual Insert Select Statement
2) once if you gets it , You can execute all the scripts in SQL Assitance.

Let me know if you have any other issues.





Best Regards,

Maran A
Oracle Certified & DW+BI Proffessional
Post #12534
Posted 8/12/2008 11:13:43 AM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 9/17/2008 6:21:35 AM
Posts: 30, Visits: 105

Junior Member



Group: Forum Members
Last Login: Today @ 9:41:19 PM
Posts: 22, Visits: 65
hi

-------------------
I) Approach I
-------------
1. Export data File from Excel to Comma Separated values (CSV ) Format.
2. Use Fastload For your Database Table
3. Now make use of the generated CSV files
4. point to file generated & Run the Fast Load Scripts

tell me how 2 convert excel file into CSV file format?




SHEEBA
Post #12543
Posted 8/12/2008 11:46:47 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 9/8/2008 7:42:33 AM
Posts: 22, Visits: 53
There are two ways to do that

1) Go to Excel Worksheet where you want to convert into CSV
2) Save the Doc as CSV file Format ( .CSV )
3) then Finally Open the doc in Notepad
4) Now you can able to see the data in delimited format



Best Regards,

Maran A
Oracle Certified & DW+BI Proffessional
Post #12545
Posted 8/12/2008 2:18:15 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/30/2008 4:02:35 AM
Posts: 7, Visits: 17
Maran,

Thanks for your responce,

There is an option to import data from file in SQL Assitant,but I am unable to undertand how to use
that option.

GO to tools->options->export/import/->import

and then goto FILE->import data.

please let me know if you have any idea about this.

Regards,
Anil


Anil
Post #12553
Posted 8/13/2008 12:59:47 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 8/17/2008 6:46:55 PM
Posts: 9, Visits: 14
Click on File and Select Import Data,

Now write

insert into table.name
values
(?, ?, ?, ?) no of columns on the table should be equal to ?

now press f5, it will ask for the source, jus browse and select the source and you can load the data in to the table using SQL assistant.


Thanks,
atadaret
Post #12566
Posted 8/13/2008 1:00:45 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 8/17/2008 6:46:55 PM
Posts: 9, Visits: 14
And when your data is loaded, agagin goto file and click on import data.

Thanks,
atadaret
Post #12567
Posted 8/14/2008 6:32:47 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 2 days ago @ 11:55:04 PM
Posts: 5, Visits: 32
SQL assistance will support only a delimited text file , Unicode text file ,UTF-8 text file and MS Access table only. Other file types r not suppported by SQL assistance.

cheers.


Sai.
Post #12593
« Prev Topic | Next Topic »