• Login

DataSoft Corporation

ANY

The ANY keyword works similarly to the ALL keyword except that Pervasive PSQL v11 SP3 includes the compared row in the result table if the condition is true for any row in the subquery result table.

Examples

The following statement compares the ID column from Person to the ID columns in the result table of the subquery. If the ID value from Person is equal to any of the ID values in the subquery result table, Pervasive PSQL includes the row from Person in the result table of the SELECT statement.


SELECT p.ID, p.Last_Name 
FROM Person p 
WHERE p.ID = ANY 
 (SELECT f.ID FROM Faculty f WHERE f.Dept_Name = 'Chemistry')

 

Sage 50 Example: Selects all JrnlRow records assigned to active customers.

select "JrnlRow"."PostOrder",
       "JrnlRow"."RowNumber", "JrnlRow"."Journal",
       "JrnlRow"."RowDate", "JrnlRow"."RowType", "JrnlRow"."CustomerRecordNumber"  
 from "JrnlRow" "JrnlRow"
 where jrnlrow.CustomerRecordNumber= any (select CustomerRecordNumber from customers where CustomerisInactive = 0)

Thursday, 18 April 2019 Posted in Pervasive SQL Command
 DataSoft Store  Knowledgebase  Contact Us
 Sitemap  Privacy Policy
    Customer Service


Copyright © 2019 DataSoft Corporation All rights reserved.