Link to home
Start Free TrialLog in
Avatar of chalie001
chalie001

asked on

create database table based on Excel spreadsheet

hi i have a excell spreadsheet which got about 25 rows how can i create database table based on this spreadsheet am in oracle database 11gR2 am using pl/sql developer IDE
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

create table some_table (col1 char(1), col2 char(1));

Just add the additional columns and correct data types.


Are you asking how to do this dynamically through VBA?
You use the Import Data wizard for that.

Open a connection to your db and right-click 'Tables', choose 'Import Data' and Browse to your Excel sheet,follow the wizard.
Avatar of chalie001

ASKER

User generated imageUser generated image
hi am not able to see import data i what to create a table without writing excell spreadsheet with 50 columns
User generated image
i have excell spreadsheet wth 50 columns how can i create new table with those spreadsheet columns without writing script thats what i need i don't what to do import data
how can i do this  dynamically through VBA? if it can do this for me
ASKER CERTIFIED SOLUTION
Avatar of Gerwin Jansen
Gerwin Jansen
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>> without writing script thats what i need i don't what to do import data

You do realize that with notepad you could have had this done and the table created a long time ago...  and done correctly.

Wizards are all great and wonderful but they will still have to "guess" at column data types.

What if it creates the table as varchar2(10) but you really need varchar2(50)?
>>how can i do this  dynamically through VBA? if it can do this for me

You would rather write VBA code than open up notepad and type out the CREATE TABLE syntax?  Seems like A LOT more work.

If the spreadsheet has a header row, notepad is a lot easier, copy/paste the header row and you have the column names (after 'fixing' the spaces in the names).  then some quick copy/paste for the data types and you are pretty much 90% done.
>> how can i do this  dynamically through VBA? if it can do this for me
How exactly do you want this done through VBA? About your SQL Developer, I think you have an older version, which version do you have?