Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Help Merging Records?

Author  Topic 

gladdack
Starting Member

2 Posts

Posted - 2005-10-15 : 07:19:15
Hello there. I am Completely new to SQL and this forum, and this problem that I have may appear to be very basic to you guys but still... I was wondering if I could get some help with a database I am trying to make in MS Access.

I have used the Access TransferText function to import data from a text file into a table with an ID attached to each line, eg.

ID Text
1 Hello world
2 This is an example
3 Of my database

I want to merge the data, or copy it into a field in a new table to get:

ID Text
1 Hello World
This is an example
Of my database
2 [more imported text from a different table]

and i have been advised that SQL is the best way to do this. Is it possible to have line breaks in a field within microsoft access, or would it have to be structured as

ID Text
1 Hello World This is an Example Of My Database
2 ...

And how would i make the SQL to do this?

Thanks,

Thom

sachinsamuel
Constraint Violating Yak Guru

383 Posts

Posted - 2005-10-15 : 14:17:31
Hi Thom,

Using DTS, you can transfer data in text file to SQL server and vice versa. DTS is one of the best components which comes with SQL Server. After selecting file, and specifying the row and column delimiter you can import or export data to and from SQL SERVER.

Checks Books online for more details.

regards
Sachin

Regards
Sachin
Go to Top of Page

gladdack
Starting Member

2 Posts

Posted - 2005-10-16 : 12:25:51
Is there another method apart from DTS? I know that sounds like a silly thing to say, but my problem is not with importing the text, more about joining the records together. Is there a simple way to select a record, copy it into a new table, select the next record and copy it into the same field in the new table in a loop?

Thanks for your original reply nonetheless

Thom
Go to Top of Page
   

- Advertisement -