|
Go
![]() |
New
![]() |
Search
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Member |
Hi
Thanks for your help! WebFOCUS 7.1.7, Windows XP, Oracle, Output-Excel/PDF/HTML |
||
|
|
Virtuoso |
There is a function call ARGLEN that tests the length of a character string (not including trailing spaces.) Create a defined field using that function and then create your WHERE statement based on the defined field. Be aware that this criteria cannot be passed to the DBMS so it may be somewhat inefficient, but I can't think of another way to do it.
Regards, Darin WF Server: 7.1.6 on Z/OS and Linux, ReportCaster, Self-Service, MRE, Java Data: DB2, DB2/UDB, Adabas, SQL Server Output: HTML,PDF,Excel2K WF Client: Linux w/WebSphere, Servlet, CGI |
|||
|
|
Guru |
WHERE ARGLEN(fieldlength, field, 'I4') EQ 1
(Prod: WebFOCUS 7.1.3: HPUX hub/Servlet Mode; various subs; mostly Self Serve; DBs: Oracle, Redbrick, JDE, SQLServer; various output formats) (Test: WebFOCUS 7.6.4: HPUX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, Redbrick, JDE, SQLServer; various output formats) |
|||
|
|
Virtuoso |
I guess you could also use EDIT to mask off the first character in a defined field and then test to see if your masked field is equal to the full field. However, this would not be any more efficient than ARGLEN and less straightforward.
Regards, Darin WF Server: 7.1.6 on Z/OS and Linux, ReportCaster, Self-Service, MRE, Java Data: DB2, DB2/UDB, Adabas, SQL Server Output: HTML,PDF,Excel2K WF Client: Linux w/WebSphere, Servlet, CGI |
|||
|
|
Platinum Member |
Think about the following
WHERE MYFIELD IS '$' This should select data where MYFIELD is fixed length field, anything appears in the first position, and the balance of the field is blank. ref: wf713crlang.pdf p5-29 HTH jimster06 DevStu WF 7.6.1 Tomcat WINXP HTML, PDF, EXL2K |
|||
|
|
Member |
Thank you all for your assistance! ARGLEN worked. It gave me the exact result I was looking for!
Have a great day WebFOCUS 7.1.7, Windows XP, Oracle, Output-Excel/PDF/HTML |
|||
|
|
Master |
All blanks would be length zero, not one -- so if you use
WHERE MYFIELD IS '$' you should add AND MYFIELD NE ' ' My guess is expressing the first as WHERE MYFIELD EQ EDIT(MYFIELD,'9'); (or an equivalent expression using SUBSTR) increases the likelihood that it will be passed through. - Jack Gross WF 7.6.7, Win |
|||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|

