Problem Escaping Quote Characters

  • Oh my god, could SSIS be any more of a PITA? Amazing anyone even uses this POS tool.

    I need quotes in my expression. Everything i'm reading out there suggests that I need to do this:

    \"(DT_WSTR, 6) @[User::TestDate]\"

    It should parse to be something like "121714". But, of course, it doesn't work and I'm getting an error. Shocked, I tell ya, just shocked.

    Sorry i'm ranting a bit , i've never had so many issues with SSIS as i've had these past two days. I've about had enough of it altogether. When I become an IT manager i'm going to ban this tool from my organization.

    Thanks!!

  • Polymorphist (1/6/2015)


    Oh my god, could SSIS be any more of a PITA? Amazing anyone even uses this POS tool.

    I need quotes in my expression. Everything i'm reading out there suggests that I need to do this:

    \"(DT_WSTR, 6) @[User::TestDate]\"

    It should parse to be something like "121714". But, of course, it doesn't work and I'm getting an error. Shocked, I tell ya, just shocked.

    Sorry i'm ranting a bit , i've never had so many issues with SSIS as i've had these past two days. I've about had enough of it altogether. When I become an IT manager i'm going to ban this tool from my organization.

    Thanks!!

    You're forgetting to concatenate your strings. No tool will do that automatically. If your variable is a datetime type, you need to format correctly.

    "\""+RIGHT("0" + (DT_WSTR, 2) DAY(@[User::TestDate]), 2)+RIGHT("0" + (DT_WSTR, 2) MONTH(@[User::TestDate]),2)+RIGHT("0" + (DT_WSTR, 4) YEAR(@[User::TestDate]),2)+"\""

    If it's a string, it becomes simpler:

    "\""+(DT_WSTR, 6) @[User::TestDate]+"\""

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Luis Cazares (1/6/2015)


    You're forgetting to concatenate your strings. No tool will do that automatically.

    +1

    Every tool will crash on that, even the not POS tools 😉

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Thanks, all. Frustration had reached it's boiling-point and I wasn't seeing straight. I have never had the sort of issues with SSIS as i've had in the past few days. Several developers we've been interviewing say they won't use it any more. I like having extra tools in my belt, but not at the cost of time and frustration.

    But this does raise a question - I wonder if Bill Gates can make water from SSIS?

    http://www.theverge.com/2015/1/6/7502271/watch-bill-gates-drink-water-that-used-to-be-human-poop

    Heh heh...just some humor. Sorry if it's not appreciated in here 🙂

  • Polymorphist (1/7/2015)


    Thanks, all. Frustration had reached it's boiling-point and I wasn't seeing straight. I have never had the sort of issues with SSIS as i've had in the past few days. Several developers we've been interviewing say they won't use it any more. I like having extra tools in my belt, but not at the cost of time and frustration.

    SSIS can be frustrating when you're in the initial learning curve. It gets better after a while 😀

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Koen is correct regarding the learning curve for SSIS, for that matter any integration tool such as ODI or Informatica have their initial learning curves that will produce frustrations along the way... especially if you are up against a deadline :w00t:

  • Polymorphist (1/6/2015)


    Oh my god, could SSIS be any more of a PITA? Amazing anyone even uses this POS tool.

    I need quotes in my expression. Everything i'm reading out there suggests that I need to do this:

    \"(DT_WSTR, 6) @[User::TestDate]\"

    It should parse to be something like "121714". But, of course, it doesn't work and I'm getting an error. Shocked, I tell ya, just shocked.

    Sorry i'm ranting a bit , i've never had so many issues with SSIS as i've had these past two days. I've about had enough of it altogether. When I become an IT manager i'm going to ban this tool from my organization.

    Thanks!!

    What is it that your actually trying to do overall? I might be able to show you an alternative to SSIS if I knew more details.

    --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)

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

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