Showing posts with label names. Show all posts
Showing posts with label names. Show all posts

Friday, March 30, 2012

import question

I have a excel comma seperated file with 2 columns.

Column A contains names and Column B contains zips.

The problem is Column A is not consistent in it's structure. Some columns only contain one name where others contain two names just by last name seperated by a space or a slash.

For example

BOWERING WILKENSON
GEERS/DOODS

I'm trying to clean the data before importing into a sql table. I want to seperate the records for column A where there are two names and move the second name to a new row. Is there a method to do this during the import? Or, within Excel prior to the import using replace? I want to find instances where there is a space or slash and move the name after the space or slash and move to a new row?

Thanks,
-D-I think in Excel you can do a text to column and put "/" or space as the delimitter|||Instead of leaning up just import the fist column in a temporary table and clean it by using substring and charindex.

Import partial Sql table from Excel spreadsheet

I have this situation that I need to read a spreadsheet with user names into a sql table where user name is just one of the columns. I tried using oledb connection to read the spreadsheet and sqlbulkcopy to import into sql table. There was no error, but the data wasn't imported into sql.

Does anyone have any suggestion what I did wrong or what is the right way of doing this?

Thanks a lot.

Mia

Try the thread below for all you need, post again if you still have question. Hope this helps.

http://forums.asp.net/thread/1442470.aspx

|||Thank you. I will take a look at the posts/articles and let you know.

Friday, March 23, 2012

Import Excel to SQL Server 2000

I need to import some excel files in the Database via DTS. The problem is, that I don't know the names of the Excel Sheets (there are multiple sheets in the excel file). Is it possible to get the names of those sheets? (via activeX or SQL Query or anything, but from a DTS package)
You might want to ask this in the DTS news group: http://groups.google.com/group/microsoft.public.sqlserver.dts?lnk=srg

Friday, March 9, 2012

Import data from another table

Hello

I have created a table in mssql.2000 which holds details of names etc. I have also included categories of interest. However the table is growing very big and unmanageable as the list of interest expand.

Instead I would like to create seperate tables for each category of interest within the same database and populate the table with names taken from the Names_Table I could then indicated yes or no if any name is interested in this category.

for example: Art_category.

However, I am unsure how I can import the column of names from the Names_Table to polulate the NameID column in the Art_category table.

I would appreciate advice and possibly a link to step by step tutorial.

Thanks.

Lynn

Not sure whehter this is what you want, but try:

INSERT INTO Art_category (NameID) SELECT names FROM Names_Table

|||

Thank you fou your reply.

Will this automatically update when a new name is added?

|||You can put the insertion in a trigger.