Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A question about ASCAN()
Message
De
12/01/2001 12:52:06
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00463010
Message ID:
00463067
Vues:
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)  0 into cursor myCursor
>browse	&& 3 records: 'a', 'b', and 'c'
----------
thanks Rick for the help...:))
Robert Keith
Independent Developer
San Antonio, Texas
E-mail address:
rebelrob1@yahoo.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform