i know the SqlStatement can convert to "SELECT TODAY " + "From" + g.OdsPROD_DB + ".ETL_BUSDATE";
but i dont understand
the meaning behind that SqlStatement.
Can anyone help convert the following SqlStatement. .... ORZ
Much appreciated.
Vivian
-----------------------------------------------------------------------------------
SqlStatement = "Select TODAY " & _
"From " & Application("odsPROD_DB") & ".ETL_BUSDATE"
Set Rs = Conn.Execute(SqlStatement)
If Not Rs.Eof Then
DataDate = Left(Rs("TODAY"), 6)
Else
DataDate = Right("0000" & Year(Now()), 4) & Right("00" & Month(Now()))
End If
For I = 0 To 3
QueryDate = DateAdd("m", I * -1, Left(DataDate, 4) & "/" & Right(DataDate, 2) & "/01")
If I = 0 Then