Showing posts with label mssql. Show all posts
Showing posts with label mssql. Show all posts

Wednesday, March 21, 2012

Import Excel into Ms SQL 2005 Automatically

Hi All,

I'm having problem with import excel into MsSQL automatically, i knew that we can import the file manually from MsSQL.
However, i want it to run automatically. is it possible? I've heard that, its possible if we use script. And I have no clue how to write the script, cause im really new to it. Anyone can help me? Thanksthere are some tools avialable in Net for this .try through google.those tools will take this excel sheet as input and gives mssql database.first u should create the database and tables according to the datatypes.try through google.i worked once on that|||Hello are you using SSIS? If so you can use the file watcher object that you can download from SQLIS.com. Just amke sure that the structure of the .xls is the same each time. cjb-|||There are various tool avaiable, which can import any document, in to ur MS SQL database.

try this one its works really gr8, its a wizard that will guide you.

"SQL Manager 2005 for SQL server"|||

Quote:

Originally Posted by cbellizzi

Hello are you using SSIS? If so you can use the file watcher object that you can download from SQLIS.com. Just amke sure that the structure of the .xls is the same each time. cjb-


Thanx, i'll try to do with that. hopefully, it'll be worked :)

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.

Wednesday, March 7, 2012

Import and Export Data tool bug

Hi,

I'm tring to import an Access database to a MsSQL Server 2000 SP4 using Import and Export Data tool which comes with SQL server 2000. After the import finishes with result: "Success", I saw that there are records which aren't exported. These records type is Memo in the Access database. But some of them are filed in others aren't. Is there a fix for this? Is there another way to import this records? Using TSQL?

Thanks guys.

Hi,

another option would be to setup a linked server for the access database and to normal TSQL statements to insert the data from the access database to SQL Server tables.

There are samples in the BOL how setting up a linked server for Access.

HTH, jens Suessmeyer.

http://www.sqlserver2005.de

Sunday, February 19, 2012

import .sql file into mssql

I have backup.sql created by mysql. How can I let mssql server to import such file?Well, assuming it's a dumpfile created from mysql, you need to attach it to a mysql server and use ODBC to connect and import from it. If it's just a SQL file, which I seriously doubt, then you can just open it up and run it from Query Analyzer provided it only used ANSI sql, which again I seriously doubt if it's mysql.|||Look inside the file. If it is an .sql file, it probably contains SQL statements ... in the MySQL variant of the language which may or may not be compatible with MS-SQL. (Also, it may contain statements like DROP TABLE that you might not want to execute, so I say again ... look first!)

If the file contains SQL statements, the information is processed by executing the statements. A "mysql dump file" is most commonly in this foramt.

It's also possible that the file contains only data, possibly in some format like comma-delimited-ASCII. Such information is handled in other ways, and the correct treatment will be indicated based on what you actually find in the file.|||Thanks a lot. I did it over ODBC connection to MySQL and it is fine. I didn't work with MSSQL for a long time so I forgot completely to ODBC,..
But again thanks a lot.