IPB

Welcome Guest ( Log In | Register )

 
 DSFilter and * (Wildcard)
Eledemar_SC
post Aug 15 2004, 03:40 AM
Post #1


Cool Newbie


Group: Members
Posts: 31
Joined: 21-March 04
Member No.: 2,985



The primer states

This filter will not only activate fields with a ‘D’ as the first character, it will also activate any and all records whose “Email” field contains a ‘D’ anywhere within the string.

On my machine, this is not true.

All instances of me trying to filter using a wildcard will only filter by the FIRST Word in the string, and then... if only 1 letter is specified, it will only filter to the items that match the first letter.

I dont think im doing anything wrong, i'm not a procoder, but my test code did not return results = to the primer results.

CODE

DataSet Testing
Name = string 100
Number = integer
End

DSappend Testing
Setconst Testing[Name] = Kurt J
setconst Testing[Number] = 1234
DSPost Testing
DSappend Testing
Setconst Testing[Name] = J Kurt
setconst Testing[Number] = 1
DSPost Testing

DSFilter Testing, Name = 'J*'
DSFirst Testing
while 1 = 1
if eof Testing
break
end
sendtext 1, Testing[Name]
dsnext Testing
End

DSFilter Testing, Name = 'Kurt*'
DSFirst Testing
while 1 = 1
if eof Testing
break
end
sendtext 1, Testing[Name]
dsnext Testing
End


The first result gives me J Kurt only
the second result gives me Kurt J only

My machine, ACTool, *shrug*

Hoping you guys can help me on this.
Go to the top of the page
 
+
Eledemar_SC
post Aug 24 2004, 08:20 AM
Post #2


Cool Newbie


Group: Members
Posts: 31
Joined: 21-March 04
Member No.: 2,985



just want to bring this back to the top, im still getting the same results.
Go to the top of the page
 
+
cam
post Aug 24 2004, 11:37 AM
Post #3


Overseer


Group: Moderator
Posts: 1,137
Joined: 12-April 03
Member No.: 2



Try this

CODE

DataSet Testing
 Name = string 100
 Number = integer
End

DSappend Testing
Setconst Testing[Name] = Kurt J
setconst Testing[Number] = 1234
DSPost Testing
DSappend Testing
Setconst Testing[Name] = J Kurt
setconst Testing[Number] = 1
DSPost Testing

DSFilter Testing, Name like '%u%'
DSFirst Testing
while 1 = 1
 if eof Testing
   break
 end
 sendtext 1, Testing[Name]
 dsnext Testing
End
Go to the top of the page
 
+
Eledemar_SC
post Aug 25 2004, 02:24 AM
Post #4


Cool Newbie


Group: Members
Posts: 31
Joined: 21-March 04
Member No.: 2,985



OMG, i didnt know you could use like and % wildcards?

lol that is exactly what ive been needing thank you cam!
Go to the top of the page
 
+
cam
post Aug 25 2004, 10:00 AM
Post #5


Overseer


Group: Moderator
Posts: 1,137
Joined: 12-April 03
Member No.: 2



With filters = uses * and like uses %. I posted this somewhere, but here it is again:

CODE

Filter support in client datasets

Operatoror function  

Comparisons  
=  State = 'CA'
<>  State <> 'CA'
>=  DateEntered >= '1/1/1998'
<=  Total <= 100,000
>  Percentile > 50
<  Field1 < Field2
BLANK  State <> 'CA' or State = BLANK
IS NULL  Field1 IS NULL
IS NOT NULL Field1 IS NOT NULL

Logical operators  
and  State = 'CA' and Country = 'US'
or  State = 'CA' or State = 'MA'
not  not (State = 'CA')

Arithmetic operators  
+  Total + 5 > 100
-  Field1 - 7 <> 10
*  Discount * 100 > 20
/  Discount > Total / 5

String functions  
Upper  Upper(Field1) = 'ALWAYS'
Lower  Lower(Field1 + Field2) = 'josp'
Substring Substring(DateFld,8) = '1998'Substring(DateFld,1,3) = 'JAN'
Trim  Trim(Field1 + Field2) Trim(Field1, '-')
TrimLeft TrimLeft(StringField) TrimLeft(Field1, '$') <> ''
TrimRight TrimRight(StringField) TrimRight(Field1, '.') <> ''

DateTime functions  
Year  Year(DateField) = 2000
Month  Month(DateField) <> 12
Day  Day(DateField) = 1
Hour  Hour(DateField) < 16
Minute  Minute(DateField) = 0
Second  Second(DateField) = 30
GetDate  GetDate - DateField > 7
Date  DateField = Date(GetDate)
Time  TimeField > Time(GetDate)

Miscellaneous  
Like  Memo LIKE '%filters%'
In  Day(DateField) in (1,7)
*  State = 'M*'
Go to the top of the page
 
+
Triane
post Aug 25 2004, 11:34 AM
Post #6


Lord of the Forums


Group: Members
Posts: 1,801
Joined: 15-April 03
From: London, Ontario, Canada
Member No.: 14



Heh -- wow! -- It looks like Cam's been holding out on us! tongue.gif

Thx for the additional info!

-Triane


--------------------
SQL>SELECT * FROM users WHERE clue > 0;
0 rows returned
SQL>_
Go to the top of the page
 
+
Chazcon
post Apr 2 2006, 07:34 PM
Post #7


Insane Poster


Group: Members
Posts: 421
Joined: 5-November 05
From: OR
Member No.: 12,547



THANK GOD for this information - now to try to plant my hair back on my head


--------------------
Chazcon (HG) Aluvian swordsman
http://www.chazcon.com

You say, "FOR THE VITAE!"
Ru says, "CHAZ!"
Simply Red tells you, "I am SO not recovering your body!"
-- Good times
Go to the top of the page
 
+
DaMOB
post Apr 3 2006, 07:08 AM
Post #8


Lord of the Forums


Group: Members
Posts: 3,409
Joined: 12-April 03
Member No.: 6



Zombie threads I love 'em.

user posted image
Go to the top of the page
 
+


 



Lo-Fi Version Time is now: 3rd September 2010 - 07:27 AM