Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSIS Expression w/ imbedded DOUBLE QUOTES not passing syntax check Expand / Collapse
Author
Message
Posted Monday, April 27, 2009 7:52 AM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Thursday, December 18, 2014 4:23 AM
Points: 663, Visits: 962
I'm using an expression in my SSIS pkg to reference my EXCEL 20007 input data source. When I attempt to evaluate the expression I receive an error --- attributed to the nest DOUBLE QUOTES around the ---> Properties="Excel 12.0;HDR=YES";

These double quotes are required. Any Ideas as to how to get this expression to successfully evaluate?

@[User::Excel2007Files] + "\\XLS_Test_Type_T.xlsx;Provider=Microsoft.ACE.OLEDB.12.0;Extended Properties="Excel 12.0;HDR=YES";"

thx in advance...


BT
Post #704932
Posted Monday, April 27, 2009 8:17 AM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Thursday, December 18, 2014 4:23 AM
Points: 663, Visits: 962
Solution: http://sqlblog.com/blogs/andy_leonard/archive/2007/07/22/ssis-design-pattern-dynamic-sql.aspx

SSIS Expressions Using nest Double Quotes

The best way I've found to do this is to write the query as I'd like it to appear, then copy it and paste it into notepad. I then replace all the quotation marks (") with slash and quotation marks (\"). (EXCEPT for the FIRST & LAST Quotation Marks)

If you then copy this and paste it into the expression builder, you merely need to nest it inside opening and closing quotation marks.

EXAMPLE:

This:

@[User::Excel2007Files] + "\\XLS_Test_Type_T.xlsx;Provider=Microsoft.ACE.OLEDB.12.0;Extended Properties="Excel 12.0;HDR=YES";"

WOULD BE CHANGED to THIS:

@[User::Excel2007Files] + "\\XLS_Test_Type_T.xlsx;Provider=Microsoft.ACE.OLEDB.12.0;Extended Properties=\"Excel 12.0;HDR=YES\";"


BT
Post #704960
Posted Wednesday, July 22, 2009 6:50 PM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Monday, October 21, 2013 11:43 PM
Points: 945, Visits: 1,234
Hello,

I had the exact same requirements of embedding " " for C:\Program Files in expression builder in SSIS.
I implemented the above solution and it worked like a charm.

Thanks,
Amol


Amol Naik
Post #757923
Posted Thursday, January 21, 2010 1:07 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, January 27, 2011 6:11 AM
Points: 158, Visits: 7
Me, too!! I had to put double-quotes around the path inside a variable for a winzip process. Worked beautifully!!

Here's the code that fills in the argument for winzip:
"-e -o \"" + @[User::ZipFileName1] +"\""



Carl Ranquist



Carl Ranquist
Data Services Manager
MTD Marketing, Inc.
Post #851537
Posted Tuesday, January 31, 2012 11:40 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, April 23, 2012 10:07 AM
Points: 1, Visits: 16
Thanks for the post...this saved me hours...
Post #1244647
Posted Tuesday, July 24, 2012 10:39 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, July 24, 2012 10:33 AM
Points: 4, Visits: 23
Thanks! really helped, simple enough ,just place "\" before " to use in SSIS expressions.
Post #1334656
Posted Thursday, October 10, 2013 11:24 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, May 19, 2014 2:46 AM
Points: 1, Visits: 23
Thanks!!!
exactly what I was looking for.
Post #1503869
Posted Wednesday, March 12, 2014 3:05 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, December 4, 2014 7:53 AM
Points: 19, Visits: 622
Thanks! That was a quick easy solution. I love this site.
Post #1550434
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse