Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A question about ASCAN()
Message
 
 
À
12/01/2001 11:36:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00463010
Message ID:
00463051
Vues:
15
>>>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform