Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle error

Status
Not open for further replies.

Kebabmeister

Programmer
Apr 22, 2003
94
GB
Getting "inconsistent data error" with oracle database. I'm very new on Actuate. Any ideas?
Function ObtainSelectStatement( ) As String
Dim SQLlower, SQLupper As Date
Dim Mnth, Yr As Integer
Dim StrDate As String

' SP*** Calculate lower month value

Mnth = Month(RunDate) - 7
Yr = Year(RunDate)
If Mnth <= 0 Then
Mnth = 12 + Mnth
Yr = Yr - 1
End If

' SP*** Build lower date string and assign to SQLlower

StrDate = Cstr(01) + "/" + Cstr(Mnth) + "/" + Cstr(Yr)
SQLlower = Cdate(StrDate)

' SP*** Calculate upper month value

Mnth = Month(RunDate) - 1
Yr = Year(RunDate)
If Mnth <= 0 Then
Mnth = 12 + Mnth
Yr = Yr - 1
End If


' SP*** Build upper date string and assign to SQLupper

StrDate = Cstr(01) + "/" + Cstr(Mnth) + "/" + Cstr(Yr)
SQLupper = Cdate(StrDate)
WhereClause = WhereClause & " AND workorder.actfinish >= " & SQLlower & " AND workorder.actfinish <= " & SQLupper
ObtainSelectStatement = Super::ObtainSelectStatement( )
End Function
 
Oracle does not understand which date format you are using. Do not convert to date on Actuate side, instead send to Oracle as string in format DD-MON-YYYY , like 31-JAN-2004, or send string of explicit conversion specifying format: to_date(your_date, 'MM/DD/YYYY')
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top