467,134 Members | 949 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,134 developers. It's quick & easy.

Select more than one value for a field in a query

pmc_sales1."documentno" AS documentno,
pmc_sales1."aj_date" AS date,
pmc_sales1."aj_ordno" AS ordno,
pmc_sales1."aj_total" AS total,
pmc_sales1."aj_tax" AS tax,
pmc_salesline."aj_servicetype" AS servicetype,
pmc_salesline."aj_totalprice" AS totalprice,
pmc_salesrep."aj_sname" AS sname,
pmc_customer1."name" AS cname,
pmc_customer1."aj_address1" AS address

"adempiere"."pmc_sales1" pmc_sales1
LEFT OUTER JOIN "adempiere"."pmc_salesline" pmc_salesline
ON pmc_salesline."aj_sorderno" = pmc_sales1."documentno"
LEFT OUTER JOIN "adempiere"."pmc_salesrep" pmc_salesrep
ON pmc_sales1."aj_sname" = pmc_salesrep."pmc_salesrep_id"
LEFT OUTER JOIN "adempiere"."pmc_customer1" pmc_customer1
ON pmc_sales1."aj_cname" = pmc_customer1."pmc_customer1_id"

pmc_salesline."aj_servicetype" AS servicetype will get more than one value
How to write query to consider all existing values for this particular field?
Thanks in advance
Oct 31 '08 #1
  • viewed: 1486
1 Reply
code green
Expert 1GB
Not sure what you mean.
If you simply want to filter only a certain servicetype then you need a WHERE clause
Expand|Select|Wrap|Line Numbers
  1. WHERE pmc_salesline."aj_servicetype"  = 'somevalue'
If you want a range of servicetypes then
Expand|Select|Wrap|Line Numbers
  1. WHERE pmc_salesline."aj_servicetype" IN 
  2. ('somevalue1''somevalue2','somevaluen..')
But I am probably wide of the mark
Oct 31 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by phpuser32423 | last post: by
14 posts views Thread by Jos? | last post: by
22 posts views Thread by MP | last post: by
6 posts views Thread by simon.harris@kingshc.nhs.uk | last post: by
17 posts views Thread by trose178@gmail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.