Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by firmusgrp

  1. firmusgrp

    Moving from UNION to ... ?

    ... always a bit funny (read: sad) when you are reminded of the basics you've forgotten from lack of use. Thanks imex, I appreciate the refresher.
  2. firmusgrp

    Moving from UNION to ... ?

    Hello all and thanks for the help. At the moment I have a SQL UNION within a CTE as follows (simplified for the thread) ... WITH InvTrans AS ( SELECT po.unitQty AS qtyIn, po.POLineID FROM dbo.tblPOLine AS po LEFT OUTER JOIN dbo.tblPOLedger AS poL ON po.POLedgerID =...
  3. firmusgrp

    Sql View / Query help

    @JonFer Hi John, Thanks for having a look and I should clarify my remarks. When I say none existst, I meant with the same status (i.e. the WHERE condition)
  4. firmusgrp

    ASP 4 / PasswordRecovery

    Hi All, I was hoping to move our ASP.NET PasswordRecovery control functionality into a silverlight control that duplicates its process.Is there code behind or methods that can reproduce its functionality without too much heavy lifting? I was hoping to keep the user within the application...
  5. firmusgrp

    ASP 4 / PasswordRecovery

    Hi All, I was hoping to move our ASP.NET PasswordRecovery control functionality into a silverlight control that duplicates its process. Is there code behind or methods that can reproduce its functionality without too much heavy lifting? I was hoping to keep the user within the application...
  6. firmusgrp

    Sql View / Query help

    Thanks for the tip, appreciated. Agreed on the oddity. Definitely correct database, I emptied all data to test the query when I noticed the strangeness. In fact it is a pretty complex one and I removed all the other fields so as to get to the root of the problem. I only have 2 result lines...
  7. firmusgrp

    Sql View / Query help

    @markos Thanks again for your efforts. Specific to your questions, on the UNION no POLineID exists in both tables so so there is no SUM needed. Each quantity per po.POLineID is a total sum as is the same with tr.POLineID. That's what made the UNION idea so clean and neat. It seemed to...
  8. firmusgrp

    Sql View / Query help

    Changing the CTE end Select to Distinct as ... SELECT DISTINCT ino.qtyIn - ISNULL(out.qtyOut, 0) as qtyAtSea FROM InvAtSea AS ino LEFT OUTER JOIN InvLanded AS out ON ino.POLineID = out.POLineID produces the correct results, I just am not sure why. Can anyone...
  9. firmusgrp

    Sql View / Query help

    @markos Please ignore my last post, I misread yours and apparently we can't go back an edit.
  10. firmusgrp

    Sql View / Query help

    @markros Thanks for your thoughts. If you'll see by the larger code I am using CTE and getting this odd result.
  11. firmusgrp

    Sql View / Query help

    Hi all and thanks for the assistance ... I'm trying to (logically) combine to tables for a total inventory count, then subtract items from a third table. I UNION two tables as such: /* Inventory Purchased Afloat */ SELECT unitQty AS qtyIn, POLineID FROM dbo.tblPOLine AS po...
  12. firmusgrp

    Convert CTE query to nested

    Thanks very much
  13. firmusgrp

    Convert CTE query to nested

    Hi all, I have the following CTE query which I need to convert to a nested query. Any help in converting is appreciated. WITH InvAtA AS ( SELECT SUM(Lin.qty) AS qtyOut, Lin.POLineID, Led.locationID FROM dbo.tblTRLedger AS Led INNER JOIN dbo.tblTRLine AS Lin ON Led.TRLedgerID = Lin.TRLedgerID...
  14. firmusgrp

    SQL Query help please

    Thanks to makros for suggesting CTE. This looks like it will do the job WITH InvOut AS (SELECT RDLineID, SUM(rstQty) AS qtyOut FROM dbo.tblRSTLine AS rst GROUP BY RDLineID), InvIn AS (SELECT...

Part and Inventory Search

Back
Top