1

I would like to know how to put a single quote around a ssis variable. This is my ssis expression

"INSERT INTO LOGS.LOG_FILES VALUES("+(DT_WSTR,29) @[User::Row_Count] +","+SUBSTRING((DT_STR,30, 1252) GETDATE(), 1, 19)+")"

This is my output or (Evolution value)

INSERT INTO LOGS.LOG_FILES VALUES(59,2020-05-28 13:59:42)

But I want the output to look like this

INSERT INTO LOGS.LOG_FILES VALUES(59,'2020-05-28 13:59:42')

or: How to include date value in single quotes '2020-05-28 13:59:42'?

So how would the syntax look like on SSIS to accomplish this please?

Martin Gal
  • 4,180
  • 3
  • 10
  • 23
Amar Ch
  • 11
  • 2

1 Answers1

0

You can try to place the single quotes, first after the comma and the second before closing the bracket, like bellow:

"INSERT INTO LOGS.LOG_FILES VALUES("+(DT_WSTR,29) @[User::Row_Count] +",'"+SUBSTRING((DT_STR,30, 1252) GETDATE(), 1, 19)+"')"
F.Lazarescu
  • 1,342
  • 2
  • 13
  • 26