Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Go
New
Search
Notify
Tools
Reply
  
[solved] Semi-colon
 Login/Join
 
Silver Member
posted
Hello,

Does anyone know what is the purpose of having semi-colon at the end of WHERE/DEFINE statement?
Even the code works without having the semi colon.
Please let me know.

WHERE COUNTRY EQ 'USA' ;

This message has been edited. Last edited by: Venkat-,


product release:8203
o/s: windows 10
expected o/p formats: HTML,EXCEL,PDF
 
Posts: 34 | Location: Kearney, Nebraska | Registered: December 14, 2011Reply With QuoteReport This Post
Virtuoso
posted Hide Post
They used to be required way back when...
Now they don't seem to matter. Not sure of the exact reason that changed.
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Reply With QuoteReport This Post
Guru
posted Hide Post
There are random times when leaving out the semi-colon causes failure. Its best to leave it in.


(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
 
Posts: 391 | Location: California | Registered: April 14, 2003Reply With QuoteReport This Post
Virtuoso
posted Hide Post
In DEFINE, it's required between one definition and the next -- without it, the interpreter will think it's all one definition, usually resulting in an "undefined variable" message. The interpreter does not require it after the last definition -- end of definition is implied by the "END card", but I doubt that's documented.

BTW, same goes for ENDSTYLE -- if absent, it's implied by END.

In WHERE clauses of a TABLE request it's an optional part of the syntax (optional, whether de jure or de facto). If present, the interpreter know it's reached the end of the expression. If absent, the interpreter can generally deduce from the following word whether or not it's is a continuation -- but why leave it to chance. Even though the interpreter does not require it (and does a good job of inferring end or continuation of the expression when it reads the next word), supplying the closing s/c is a good habit.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Reply With QuoteReport This Post
Silver Member
posted Hide Post
Thanks all for the reply!


product release:8203
o/s: windows 10
expected o/p formats: HTML,EXCEL,PDF
 
Posts: 34 | Location: Kearney, Nebraska | Registered: December 14, 2011Reply With QuoteReport This Post
<JG>
posted
quote:
;
Is an optional semicolon that can be used to enhance the readability of the request. It does not affect the report


Is the official line.

However with compound statements and with Statements that include a function

i.e.
WHERE FIELD EQ EDIT(field,'999xx$')

It is generally advisable or required.
 
Reply With QuoteReport This Post
Virtuoso
posted Hide Post
ALWAYS put the semi-colon.
It is in the manual.
And one day, someone will tighten the code and then... Red Face!


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1932 | Location: Tel Aviv, Israel | Registered: March 23, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
Always follow the manual, then if it breaks, you have a valid course of action.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.05OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6104 | Location: Land of the Darug people, Terra Australis Incognita | Registered: October 31, 2006Reply With QuoteReport This Post
Silver Member
posted Hide Post
Thank you!


product release:8203
o/s: windows 10
expected o/p formats: HTML,EXCEL,PDF
 
Posts: 34 | Location: Kearney, Nebraska | Registered: December 14, 2011Reply With QuoteReport This Post
Expert
posted Hide Post
If you with to flag this as closed, then please edit the first post in this thread, and add [CLOSED] to the title.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.05OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6104 | Location: Land of the Darug people, Terra Australis Incognita | Registered: October 31, 2006Reply With QuoteReport This Post
  Powered by Social Strata  
 


Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.