Jump to content

excel/mysql question


Shamrox

Recommended Posts

I've got a spreadsheet that has a few tabs with data in them. The first tab has suppliers listed with a name column and an ID column. All the other tabs, the person omitted the ID column and just has the name column with other data. I'm trying to put this into a mysql database and would like to have the ID on all the tables so it's easy to index.

Any idea of how to do this aside from hand typing all the IDs on the other tabs before i import?!!?

Link to comment
https://forums.phpfreaks.com/topic/99031-excelmysql-question/
Share on other sites

Would it not be possible to create a sequence? then index them with that while they are being inserted? e.g.

 

CREATE SEQUENCE index

  START WITH 1

  INCREMENT BY 1

  NOCACHE

  NOCYCLE;

 

 

then when your inserting just use INSERT INTO tablename VALUES (index.NEXTVAL, etc etc

Link to comment
https://forums.phpfreaks.com/topic/99031-excelmysql-question/#findComment-507071
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.