HELP REQUIRED!!! SSIS CHALLENGE

  • Hello All,

    I am having a challenge with SSIS to generate txt Files for a where clause i.e when the ref changes it should generate a txt file,

    How do i go about it ???

    select * from diet details

    where ref = 56789

    Please How do U go about this ???

    Thanks

  • I'm not clear on what you're asking.

    Are you having trouble with the export? Are you trying to have it automatically export data when a value changes in a table?

    - 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

  • Please reply

  • I think he is asking how to export a text file via SSIS.

  • pespes009 (10/10/2011)


    Please reply

    I already did. Please read my question and supply the data needed. I can probably help you, but I need more information from you in order to do so.

    - 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

  • If you want to export a different set of results depending on the value of your field called ref you can accomplish this server side or package side.

    Server side

    -prepare a staging table of only the records you want to export and have the package select from that table without a where clause

    -create a export parameter table that will contain the ref to be exported. Then your package select will look like this:

    SELECT * FROM YourTable WHERE ref IN(Select ref FROM ExportParameterTable)

    You will of course have to update the export paramter table before you run the export

    Package side

    -Use the SET option within DTEXEC to set a variable in your package. The variable will in turn become a parameter within your query

    http://www.rafael-salas.com/2007/11/ssis-mapping-parameter-inside-of.html

    -use package configurations

  • Hello all,

    i got it solved ....this way...its a ole db to file extract pakage ....

  • Hello all,

    i got it solved ....this way...its a ole db to file extract pakage ....

    All i was having challenges with was to use to extract many files from the flat file using for each looop enumerator for the where statement..

    All i did was to replace the value of the ref with a ? and called it as a parameter.changed the hard coded conn manager string with an expression....

    And finally set up the for each loop enumerator and that was it ...had files coming for each ref ...

    thanks all

Viewing 8 posts - 1 through 7 (of 7 total)

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