On Feb 13, 2007, at 8:55 PM, Jeffrey Ellis wrote:

I haven't worked with the built-in SQL database before. I just need to do
something pretty simple.

I have a list of Networks, and Servers on those Networks. The list is in a text file. I just need to read it in, and add each line's data to fields in
a database.

So the text file might look like this:

NET: WINDOWS_OFFICE
SER: Win_Off_A
SER: Win_Off_B

NET: WINDOWS_Remote
SER: Win-Rem_A

NET: NY_Loc
SER: NY_A
SER: NY_B
SER: NY_C
SER: NY_D

I'd like to read this in line by line, and add each line to a database so:

NETWORK         SERVER          KEY_FIELD
WINDOWS_OFFICE  Win_Off_A       WINDOWS_OFFICEWin_Off_A
WINDOWS_OFFICE  Win_Off_B       WINDOWS_OFFICEWin_Off_B
WINDOWS_Remote  Win-Rem_A       WINDOWS_RemoteWin-Rem_A
NY_Loc          NY_A            NY_LocNY_A
NY_Loc          NY_B            NY_LocNY_B
NY_Loc          NY_C            NY_LocNY_C
NY_Loc          NY_D            NY_LocNY_D

Can someone walk me through the basic procedure to do this?

You just did all the "hard work" describing what you need to do
No real need to put both the network and server into one field since in SQL you can search on multiple fields very easily

The only thing your missing is

 1) create a file to hold the database
2) create a table - create table network_servers ( network text, server text) 3) insert each row as you figure out what should be in it - "insert into network_servers ( network, server) values ('" + network + "','" + server + "')"
 4) check for errors along the way




_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to