I have the following string I want to insert into a SQL string
the variables StrEvent1 and StrEvent2 hold strings containing spaces, so I'm trying to wrap the whole AS alias in quotes, but I either get an error about end of statements or end up outputting the whole literal string instead of the string in the variables.
Any help would be appreciated.
Thanks
Code:
strFields = strFields & "DateDiff('d',[" & StrEvent1 & "],[" & StrEvent2 & "]) AS " & StrEvent1 & " to " & StrEvent2
the variables StrEvent1 and StrEvent2 hold strings containing spaces, so I'm trying to wrap the whole AS alias in quotes, but I either get an error about end of statements or end up outputting the whole literal string instead of the string in the variables.
Any help would be appreciated.
Thanks