Hi

where r u writing this query?? in a form?? i think if u write like 
this it will work.

Query                q;
QueryBuildDataSource qbds;
QueryRange           qr;

;

q      = new Query();
qbds   = q.addDataSource(TableNum(InventTable));
qr     = qbds.addRange(FieldNum(InventTable,Blocked));

qr.value(queryValue(NoYes::Yes));

when you run this query the items that are not blocked(assuming 
blocked is a NoYes enum as it usually is) will be shown. 

let me know where you are using it, so that may be i can help you 
out..



--- In [email protected], "Chwaszczewski, Jim" 
<[EMAIL PROTECTED]> wrote:
>
> How do I write this SQL query in X++?
> 
>  
> 
> select a.ItemId,a.ItemName, b.blocked 
> 
> from InventTable a 
> 
> join (select ItemId,max(blocked) as blocked from InventTableModule 
group
> by ItemId) b on b.ItemId=a.ItemId
> 
>  
> 
> I'm trying to filter a query so that only items that are not 
blocked are
> selected.
> 
>  
> 
> Jim Chwaszczewski
> 
> Wipfli, LLP
> 
> Email: [EMAIL PROTECTED] 
> 
>  
> 
> 
> 
> [Non-text portions of this message have been removed]
>


Reply via email to