How to get Client Records from a database

  • i have sql2000 with a database that contain different companies with users in it.

    i need to pull all the clients (along with their info) that belong to a specific company and export it out to a cvs or some other readable format.

    is there an easy way to do this?

    thanks in advance

  • If it's a one time thing only... why not change the text window to use tabbed delimiters and tell it to save to a file?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • thanks for the response - i am new at managing sql and dont know how to do this --

    like the querry or format or the method sql uses to pull this kind of info.

    thanks

  • Use import/export wizard in sql server enterprise manager, use text file (csv) as your destination format, then use a query to specify and filter the data you would like transferred.

    _____________
    Donn Policarpio

  • Mo,

    Donn's method will do you just fine. If it needs to somehow be automated, let us know.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • thanks for this info - very helpful indeed --

    how could i write a query? for example - i need info from abc database and i need to exclude two parameters - for example i dont need to export option1 and option2.

    i am sure it is a simple thing to do but if you dont know i guess it becomes a difficult thing to do.

    thanks

  • You're going to have to give us more detail than that in order to help you. Try to give us the table structure and the criteria of the clients to include and what in those records needs to be excluded.

    In 2000, I would have used the import/export wizard (the automated DTS thing). Makes for a LOT easier way to get stuff exported, IMO.

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • hi, i took a look at the tables - this database has 215 tables - each table has a unique id.

    for example company id is co - user id is indiv ---

    the problem i see now is that each table may have info related to individuals who belong to this particular company. not sure how i would write a query to retrieve info for each individual who belong to company abc --

  • If you have an extensive data structure - then it may be necessary to bering someone in to help you do it. The last thing you want is to not do it the right way - that will lead to Very Bad Things happening to your data.

    Really - if you aren't 100% sure you know how to write those - then don't try. Have someone competent (or - someone you can sue if they're not) do it for you. And by competent I mean - someone who's done it before (not implying anything about you - but this can get tricky, and you don't want to wreck your data). They could actually write you a script allowing you to do this again in the future (if need be).

    Either way, if you want to tackle it - make a separate copy elsewhere and TEST what you try. Don't do this against the production copy even IF you have the backup.

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • thanks --

    i will get the info from the interface of the app - i think i can get the info i need this way -

    thanks for all the suggestions

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply