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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with IF statement

Status
Not open for further replies.

t16turbo

Programmer
Mar 22, 2005
315
GB
hi folks,

I have the following IF statement in my ObtainSelectStatement:

Code:
If (NewReportApp::param_start_client <> ""  AND NewReportApp::param_end_client <> "") Then
			WhereStr = WhereStr & " AND (c.id > "& NewReportApp::param_start_client &" AND c.id < " & NewReportApp::param_end_client & ")" 
	Else If (NewReportApp::param_start_client <> "" AND NewReportApp::param_end_client = "") Then
			WhereStr = WhereStr & " AND c.id > " & NewReportApp::param_start_client & " "
	Else If (NewReportApp::param_start_client = "" AND  NewReportApp::param_end_client <> "") Then		
			WhereStr = WhereStr & " AND c.id <" & NewReportApp::param_end_client & " "
	End If

it was originally a nested If to make it a bit shorter and neater, but I changed it to get back to basics.
I'm having an error when I compile it that says:

OracleTextQuerySource%ObtainSelectStatement(102): Actual: If Expecting: ':', [new line]

OracleTextQuerySource%ObtainSelectStatement(104): Actual: Else Expecting: End

2 Error(s) found

this happens no matter wht values I put in for param_start_client and param_end_client.

can anyone tell me why this might be happening?
thanks..
 
possibly so!
so thats why its not liking it!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top