SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 link a text file to sql server
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ajazz
Starting Member

India
2 Posts

Posted - 12/04/2013 :  14:28:39  Show Profile  Reply with Quote
hi everyone

how to link a text file in sql server

and how to save/reuse the import specifications

Edited by - ajazz on 12/04/2013 14:30:59

TG
Flowing Fount of Yak Knowledge

USA
6059 Posts

Posted - 12/04/2013 :  15:27:05  Show Profile  Reply with Quote
when you say, "link a text file" do you mean import the file to a table?
If so you can use the import wizard (right-click yourDatabase | Tasks | Import Data...)

To save/reuse I think you need to use SSIS to create a package which can be re-run manually any time or scheduled with a sql job.

Be One with the Optimizer
TG
Go to Top of Page

ajazz
Starting Member

India
2 Posts

Posted - 12/04/2013 :  16:12:00  Show Profile  Reply with Quote
link is different then import

in ms-access we have link and import

link is to link with the data source file. you cannot delete the data

how to use ssis, may u pls tell me

i wish to attach the text file. is it possible ?
Go to Top of Page

TG
Flowing Fount of Yak Knowledge

USA
6059 Posts

Posted - 12/04/2013 :  16:30:36  Show Profile  Reply with Quote
>>i wish to attach the text file. is it possible?
No. Sql Server does not have the "link" type functionality like ms-access does.

>>how to use ssis, may u pls tell me
I can't explain it all in this thread. Open google and search for "SSIS Tutorial". You'll find lots of information.

EDIT:
Here's Books Online section on Sql Server Inegration Services

Be One with the Optimizer
TG

Edited by - TG on 12/04/2013 16:34:12
Go to Top of Page

Natalia89
Starting Member

Poland
12 Posts

Posted - 12/04/2013 :  16:31:20  Show Profile  Reply with Quote
I have a table that contains empid, name, salary, hiredate, positionand supervisor (which includes empid not the name) how do i list the empid and name of all supervisors ? the output has to have to columns supervisor( and a list of their emid) and their names. Thats the create statement used to create the employee table:
/* Create table Employee */
IF OBJECT_ID('Employee', 'U') IS NOT NULL
DROP TABLE Employee
GO
CREATE TABLE Employee (
emp_id NCHAR(5),
name NVARCHAR(20),
position NVARCHAR(20),
hire_date DATETIME,
salary MONEY,
bcode NCHAR(3),
supervisor NCHAR(5)
)

i have tried a variety of statements using having statement and count but the dont seem to work:/

select emp_id, name from employee where position='manager'; i tried this but it doesnt work anoune smart that knows how to do it?


saddf
Go to Top of Page

TG
Flowing Fount of Yak Knowledge

USA
6059 Posts

Posted - 12/04/2013 :  16:38:03  Show Profile  Reply with Quote
Natalia89,
please start a new thread for this (unrelated) question. Maybe title it "how to do a self join". Perhaps that is enough of a hint that you don't need to post anymore

Be One with the Optimizer
TG
Go to Top of Page

badlydressedboy
Starting Member

4 Posts

Posted - 12/05/2013 :  00:28:29  Show Profile  Reply with Quote
quote:
Originally posted by ajazz



i wish to attach the text file. is it possible ?



Import the file to a table using the import wizard (right click on your database in management studio->tasks->import data)

Performance Tuning & Monitoring Software: unspammed
Go to Top of Page

Paul J. Brooks
Starting Member

USA
7 Posts

Posted - 12/05/2013 :  10:22:57  Show Profile  Reply with Quote
This is very good approach for every one and beneficial for every one.Programing is the main part of IT.i wanna discus on this topic and any body online so reply me i m waiting.
unspammed
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000