SQL with Pivot expression
The following expression is a part of my sql clause and does not work:
dim strPivot as String
strPivot = “PIVOT Qtr & DatePart(q,[InvoiceDate],1,0) In (Qtr 1,Qtr 2,Qtr 3,Qtr 4)”
When i put this expression in an sql clause, i receive an error mssing operator.
Without the strPivot expression, my SQL works.Do i have some errors in my expression?