Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A question about ASCAN()
Message
From
12/01/2001 12:16:54
 
 
To
12/01/2001 11:36:12
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00463010
Message ID:
00463051
Views:
14
>>>My code is:
>>>select * from mytable where ascan(myarray,myfld) # 0 into cursor mycursor...
>>>What does # 0 mean or do ????
>>
>>#0 means 'not equals' zero. Same as != 0 or <> 0.
>----
>Hi Rick,
>Is the select statement saying...where myfld is not equal to 0?

If myFld is a field in myTable, then this SELECT SQL statement will select all records from myTable where the value of myFld matches one of the elements in myArray. The example below illustrates this
create table myTable ( myFld c(10))
insert into myTable (myFld) value ("a")
insert into myTable (myFld) value ("b")
insert into myTable (myFld) value ("c")
insert into myTable (myFld) value ("d")
insert into myTable (myFld) value ("e")
insert into myTable (myFld) value ("f")
insert into myTable (myFld) value ("g")
dimension myArray[3]
myArray[1] = 'a'
myArray[2] = 'b'
myArray[3] = 'c'
select * from myTable where ascan( myArray, myFld) &lt;&gt; 0 into cursor myCursor
browse	&amp;&amp; 3 records: 'a', 'b', and 'c'
Rick Borup, MCSD

recursion (rE-kur'-shun) n.
  see recursion.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform