SitePoint Sponsor |
|
User Tag List
Results 1 to 7 of 7
Thread: db contents to a .csv file
-
Jan 16, 2002, 12:55 #1
- Join Date
- Oct 2001
- Posts
- 15
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
db contents to a .csv file
Does anyone have a script (or a resource they can point me to) that will dump the entire contents of a database into a .csv file?
I want to be able to point people to a URL that will open up the .csv file in Excel...
Thanks for all help in advance!
jb
-
Jan 16, 2002, 13:37 #2
- Join Date
- May 2001
- Location
- Northern Virginia
- Posts
- 445
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
which database are you using?
-
Jan 16, 2002, 14:43 #3
- Join Date
- Oct 2001
- Posts
- 15
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
SQL 2000
-
Jan 16, 2002, 15:14 #4
- Join Date
- May 2001
- Location
- Northern Virginia
- Posts
- 445
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
sorry I dont use SQL 2000 so I dont know.
-
Jan 16, 2002, 15:27 #5
- Join Date
- Mar 2000
- Location
- Muskegon, MI
- Posts
- 2,328
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I don't think the database you are using has any bearing on your question.
You'll need to query your database and loop through the recordset writing a line of text for each record.
Are you using ASP?
-
Jan 16, 2002, 16:19 #6
- Join Date
- Oct 2001
- Posts
- 15
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'm using ASP- but I am just learning it. Most of my experience thus far has come from modifying existing scripts...
-
Jan 16, 2002, 16:33 #7
- Join Date
- May 2001
- Location
- Northern Virginia
- Posts
- 445
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
All you need to do is open a file, do a select on all your data, and save it to a file, delimiting each field with a ",".
I dont know ASP so I cant help you out. I've used mysql and a PHP script I wrote to do something similar to what you need.
Do you want this done once, or done dynamically?
Bookmarks