SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    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

  2. #2
    SitePoint Evangelist jkh1978's Avatar
    Join Date
    May 2001
    Location
    Northern Virginia
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    which database are you using?

  3. #3
    SitePoint Member
    Join Date
    Oct 2001
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    SQL 2000

  4. #4
    SitePoint Evangelist jkh1978's Avatar
    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.

  5. #5
    SitePoint Wizard westmich's Avatar
    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?
    Westmich
    Smart Web Solutions for Smart Clients
    http://www.mindscapecreative.com

  6. #6
    SitePoint Member
    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...

  7. #7
    SitePoint Evangelist jkh1978's Avatar
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •