LIKE in datawindow filter

I get the error message "Expected TRUE/FALSE" when setting this filter 
expression

text LIKE '%sometext%' AND string(from_date, 'YYYYMMDD') > = Today()

It should be possible to combine LIKE with other expressions? 

0
O
12/7/2010 2:22:07 PM
sybase.powerbuilder.datawindow 28057 articles. 4 followers. Follow

5 Replies
4586 Views

Similar Articles

[PageSpeed] 37

Try reversing the expressions.

This works...
date( string(entry_datetime,'yyyy/mm/dd') ) = today() and  state like 'S%'

But this doesn't...
state like 'S%' and date( string(entry_datetime,'yyyy/mm/dd') ) = today()

hth,
Mark

On 12/7/2010 9:22 AM, O.Steine wrote:
> I get the error message "Expected TRUE/FALSE" when setting this filter 
> expression
>
> text LIKE '%sometext%' AND string(from_date, 'YYYYMMDD') > = Today()
>
> It should be possible to combine LIKE with other expressions?
0
Mark
12/7/2010 2:44:59 PM
You have to use parentheses around the different sesctions when using the 
like statement, or move the like to the end:

string(from_date, 'YYYYMMDD') > = Today() and text LIKE '%sometext%'
or
(text LIKE '%sometext%') AND (string(from_date, 'YYYYMMDD') > = Today())

-- Terry Dykstra (TeamSybase)
http://powerbuilder.codeXchange.sybase.com/
http://casexpress.sybase.com
http://my.isug.com/cgi-bin/1/c/submit_enhancement

"O.Steine"  wrote in message news:4cfe430f@forums-1-dub...

I get the error message "Expected TRUE/FALSE" when setting this filter
expression

text LIKE '%sometext%' AND string(from_date, 'YYYYMMDD') > = Today()

It should be possible to combine LIKE with other expressions? 

0
Terry
12/7/2010 2:45:20 PM
Yes, but its precedence is messed up in the dw expression engine, so you 
need to wrap the clause in parens:

(text LIKE '%sometext%') AND string(from_date, 'YYYYMMDD') > = Today()

Ken

"O.Steine" <osteine@gmail.com> wrote in message 
news:4cfe430f@forums-1-dub...
>I get the error message "Expected TRUE/FALSE" when setting this filter 
>expression
>
> text LIKE '%sometext%' AND string(from_date, 'YYYYMMDD') > = Today()
>
> It should be possible to combine LIKE with other expressions? 


0
Ken
12/7/2010 2:45:25 PM
> ... AND string(from_date, 'YYYYMMDD') > = Today()

The second condition is not valid - you are comparing a string with a date. 
Do not rely on implicit conversion (even if it works in the version you are 
using - it doesn't in 11.2 or 12 )


0
Scott
12/7/2010 2:55:30 PM
Thank you all :)

Works like a charm!!

"Ken Balakrishnan"  skrev i nyhetsmeldingen: 4cfe4885$1@forums-1-dub ... 

Yes, but its precedence is messed up in the dw expression engine, so you 
need to wrap the clause in parens:

(text LIKE '%sometext%') AND string(from_date, 'YYYYMMDD') > = Today()

Ken

"O.Steine" <osteine@gmail.com> wrote in message 
news:4cfe430f@forums-1-dub...
>I get the error message "Expected TRUE/FALSE" when setting this filter 
>expression
>
> text LIKE '%sometext%' AND string(from_date, 'YYYYMMDD') > = Today()
>
> It should be possible to combine LIKE with other expressions? 

0
O
12/9/2010 6:44:22 AM
Reply:

Web resources about - LIKE in datawindow filter - sybase.powerbuilder.datawindow

PowerBuilder - Wikipedia, the free encyclopedia
PowerBuilder is an integrated development environment owned by Sybase , a division of SAP . It has been in use since 1991, peaking around 1998 ...

Intelligent Versus Surrogate Keys
Should I use business columns as primary key fields for tables in thedatabase, or generate artificial primary key values? When business-related ...

chevy volt
ProEXR File Description =Attributes= channels (chlist) compression (compression): Zip dataWindow (box2i): [0, 0, 5119, 2475] displayWindow (box2i): ...

Enable - A comprehensive solution for the localization of PowerBuilder applications Untitled Document ...
Enable is localization/ translation tool used by PowerBuilder developers to make their applications multilingual.Enable is a powerful tool that ...

comp.lang.clipper.visual-objects - Google Groups
comp.lang.clipper.visual-objects 1-20 von 33006 Themen werden angezeigt Integrity of a file marcosm...@gmail.com 09:35 Combobox value Lu 08:12 ...

Sybase PowerBuilder tool readied for Microsoft's .Net
Developers can choose Win32 or newer style .Net development

PowerToTheBuilder - PowerBuilder UI Controls
HOME - COMPONENTS - PB UI DESIGNER - DOWNLOAD\PURCHASE - SUPPORT - FAQ - ABOUT Take Control of your UI with PB Ultimate Suite PowerToTheBuilder.com ...

Beautiful iPad Mini 3 Concept Reimagines Appleā€™s Tablet With iPhone 6 Design, Gold Color [Images]
The iPhone 6 may be grabbing all of the recent headlines due to its impending announcement, but spare a thought for those who prefer to stay ...

Java Networking - Real's HowTo
Real's HowTo Custom Search Java Language String and Number Applet AWT Swing Environment IO Javascript interaction JDBC Thread Networking JSP ...

Business Intelligence Products - Database Management, Data Warehousing & Mobility Software - Sybase Inc ...
Sybase offers a variety of Business Intelligence (BI) software like products for database management, data warehousing and mining, data integration ...

Resources last updated: 1/12/2016 10:50:39 PM