Hello, I am using the code below in Excel , as part of a call to an external db ( from another function ), to fetch data based on the parameters in sSQL below:
---
Public Function sSQL() As String

Dim dd As String
Dim mm As String
Dim yy As String

dd = "17"
mm = "january"
yy = "2014"

Dim x As String

x = (dd & " " & mm & " " & yy)

sSQL = "Report.RiskPivotDetailLevel @pCOB= '" & (x) & "', @pDomain=87, @pOrg = 99, @pFactor=1254, @pCOB >= '" & (x) & "' "

End Function
----
can the vba code or the sSQL string which defines the parametrs to the stored procedure, be changed to specify a start date and end date, as opposed to listing one date?

Any help would be appreciated as im a novice to this.

Thanks