sick and itred of bcp

  • Anyone have any suggestions for some other executable that is free and offers the same functionality if not more? Doesnt even have to be free if it useful. Has to be cheap though

  • Importing or exporting?

    And have you checked out SSIS?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • exporting. I'm fed up w bcp. I cant get the column headers to appear w/o a workaround that in my opinion should be built in. Staying away from ssis for these processes who simply send a file to someone. I want to mimic the current archetecture. So i'm looking to call the command shell that calling an executable that i can put on all out sql boxes. Sed executable would simply build and send file. Has input params such as: includeColumnheadersFl, Delimited, etc.

    Anyone got any thing they've used in the past or heard of?

  • sorry. the executable doesnt have to send the file. just build it and save it locally.

  • CLR procedures can write to a text file pretty easily.

    I'd use SSIS, but if you don't like that, and don't like BCP, give CLR a shot.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • BLM I've got a .NET project that i built that, among other things, is my Developer Report Builder;

    I was re-inventing the wheel to improve my own skillset, and created a kind of SSMS + Saved Queries + Reporting Tool kind of thing that fits my personal needs.

    I put every kind of export option i could think of; it loads whatever query you paste/type in a SSMS-like query panel, and dumps the results to grids, similar to SSMS. Supports multiple queries, same as the real SSMS.

    the difference with mine is if you right click the grid, you can export the results to lots of different formats; what's really nice is the DevExpress grid I'm using also offers WYSIWYG export options as well as the stuff I added , so if you , say, hide any columns, they do not appear in the file it creates; the other ones I've add have an options like include headers, include hidden columns,left-vs-right align of columns, lots of crap like that;

    The grid allows for grouping, column moving, and data filtering as well;

    if you think it might help you, i can clean it up a bit and dump you a copy of it; there's a lot of excess crap in it, as i use it to test any .net code that catches my eye.

    the stuff that's annoying for me so far is the SQL panel for pasting your query is slow...the syntax highlighting is slowing it down, and i'm playing around with that.

    All I'd ask is since you'd be a guinea pig with it, report anything that you find annoying. I know the export options are what you'd be looking for.

    Eventually i was going to add playing with importing of raw text files, but it's more of a hobby and distraction for me.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • wow thats pretty cool. Not sure if it satisfies my needs however. I'm looking for an executable that takes in some params such as the delimiter, export location, includeHeaders. Stuff like that. Forgive me if i'm wrong here but your saying you build a sort of ssms of your own? Is that correct? If so then thats pretty cool. I have a feeling i'm going to have to create this executable myself. I'm just a little surprised that of all the free stuff out there that there isnt a bcp equivalent. i find that very odd. Maybe i'm trying to simplify what bcp does and that it would actually be a lot more complex to mimic.

    Did u do that in .net?

  • ok so you are after more of a console application to run at the command line; still very doable in .net, but you need a lot of parameters, which can be annoying.

    so you need, what, at least 4 parameters for a connection string(server/db/user/pass/trusted connection instead), a param for the query itself, probably a param for a filename for the output, plus params for things like header Y/N, Delimited/delimter, use QuotesOrNot, maybe more options.

    that's a lot of stuff to pass via command line; CrLf in a sql won't get handled gracefully, either i think.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • good point. Hadnt thought of that. I need to dabble w/ .net when i have time and build this over time. I'll be honest though i could see this as something that you could probably sell long term. Especially if it was marketed as bcp on steroids.

  • also if u think about it most of the code is already there in your app. just delivered in a different way.

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

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