Thank you,
I figured it out that if I didn't put no-lock after outer-join it
seem to work for me.
Larry
I figured it out that if I didn't put no-lock after outer-join it
seem to work for me.
Larry
--- In vantage@yahoogroups.com, pjw@s... wrote:
> Larry,
>
> Here is a sample of some outer-joins, etc....
> If you have Shop Floor Data Collection its active labor on setup.
> Also I have changed the "EACH" to "FIRST" where appropriate for
performance
> reasons.
> Note this is not from the Query Wizard.
>
> Patrick Winter
>
> for each LaborDtl Where LaborDtl.Company = cur-comp
> and LaborDtl.ActiveTrans = yes
> and LaborDtl.LaborType = "S" no-lock,
> First LaborHed Where LaborHed.Company = LaborDtl.Company
> and LaborHed.LaborHedSeq = LaborDtl.LaborHedSeq no-lock,
> First EmpBasic Where LaborHed.Company = EmpBasic.Company
> and LaborHed.EmployeeNum = EmpBasic.EmpID no-lock,
> First JobOper outer-join no-lock Where JobOper.Company =
LaborDtl.Company
> and JobOper.JobNum = LaborDtl.JobNum
> and JobOper.AssemblySeq = LaborDtl.AssemblySeq
> and JobOper.OprSeq = LaborDtl.OprSeq,
> First JobHead Outer-join no-lock Where JobHead.Company =
LaborDtl.Company
> and JobHead.JobNum = LaborDtl.JobNum,
> First Part Outer-join no-lock Where Part.Company = JobHead.Company
> and Part.PartNum = JobHead.PartNum
> BY LaborHed.PayrollDate Descending
> By LaborDtl.DspClockInTime Descending
> BY LaborDtl.WCCode:
>
>
>
>
> -----Original Message-----
> From: Larry Barriere [mailto:larrybarriere@y...]
> Sent: Thursday, November 11, 2004 2:47 PM
> To: Vantage Group
> Subject: [Vantage] BAQ outer-join
>
>
> I am trying to write a BAQ to do a Gross Margin. This what I have
so far.
>
> for each OrderHed Where OrderHed.Company = cur-comp
> no-lock,
> each OrderDtl Where OrderDtl.Company = OrderHed.Company
> and OrderDtl.OrderNum = OrderHed.OrderNum
> and OrderDtl.requestDate >1/1/2002
> and OrderDtl.OpenLine = yes no-lock,
> each OrderRel Where OrderRel.Company = OrderHed.Company
> and OrderRel.OrderNum = OrderHed.OrderNum no-lock, each
Customer Where
> Customer.Company = OrderHed.Company
> and Customer.CustNum = OrderHed.CustNum no-lock, each JobProd
Where
> JobProd.Company = OrderHed.Company
> and JobProd.OrderNum = OrderHed.OrderNum no-lock BY
> OrderDtl.RequestDate:
>
> What I need to be able to do is create an outer join between
JobProd and
> OrderHd. so that I can have all Orders whether they have a job or
not.
> I have tried putting this syntax on the third line from the last
end but I
> am getting and error.
> EX:
> each JobProd outer-join no-lock Where JobProd.Company =
OrderHed.Company
>
> Can anyone help me with the right syntax.
>
> Larry Barriere
> barriere@p...
>
>
>
>
> signature
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------ Yahoo! Groups Sponsor --------------------
~--> Make
> a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
> Now with Pop-Up Blocker. Get it for free!
> http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/PhFolB/TM
> --------------------------------------------------------------------
~->
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You
must have
> already linked your email address to a yahoo id to enable access. )
> (1) To access the Files Section of our Yahoo!Group for Report
Builder and
> Crystal Reports and other 'goodies', please goto:
> http://groups.yahoo.com/group/vantage/files/.
> (2) To search through old msg's goto:
> http://groups.yahoo.com/group/vantage/messages
> (3) To view links to Vendors that provide Vantage services goto:
> http://groups.yahoo.com/group/vantage/links
> Yahoo! Groups Links