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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. UltraSmooth

    Trying to find MAX from join of two tables

    I managed to solve my problem after, just needed to take it a step further, and with an extra index added is running quick and smooth.
  2. UltraSmooth

    Trying to find MAX from join of two tables

    I'm sure this is easy but I've been banging my head on it for a while and can't come up with the proper solution, I have two tables maintaining transaction records for items, whscosthdr [whh_cdate,whh_username,whh_trans_no,whh_tsource,whh_from_loc,whh_to_loc,whh_pct_incr] whscostdtl...
  3. UltraSmooth

    Sort Records By Total of Group

    Thanks Rudy for you help, have a great day!
  4. UltraSmooth

    Sort Records By Total of Group

    Hi Rudy, Yes, it's quite the query but performs extremely fast so my indexes must be working well ! :) The sales table has millions and millions of records and the query is generated dynamically with lots of parameters... I'm not really sure I can get rid of the 2nd temporary table. I cannot...
  5. UltraSmooth

    Sort Records By Total of Group

    Rudy, I've implemented your solution and it is giving me exactly the results I am looking for. The sales data that I am using is the result of a fairly long query . Because I need to use the resultset of this query twice in your solution (once for the grp table, once for the loc table) I...
  6. UltraSmooth

    Sort Records By Total of Group

    It makes so much sense now that I'm looking at your sql code...I don't know why that didn't come to me. Thank you so much for your help...now I'm off to implement :)
  7. UltraSmooth

    Sort Records By Total of Group

    Hi r937, you've helped me a great deal in the past, good to see you're still around helping out! My columns are his_key (group/department) key_desc his_loctn (location) ty_retail ty_cost ty_units ly_retail ly_cost ly_units My ORDER BY clause is ORDER BY his_key, his_loctn Some SQL would...
  8. UltraSmooth

    Sort Records By Total of Group

    I have a query that totals up sales at retail and cost by Group/Location. Up to this point I have been just ordering my results by group name (alphabetically) and by location. I need to now sort by results by the Group with the most sales. So if my results before were like the following, CHILD...
  9. UltraSmooth

    Join Third Table Based on Join Between Two Other Tables

    Thanks for you feedback. At least I know I'm on the right track with the join structure. I believe the reason I'm getting more records than I should is due to what you mentioned, the one-to-many relationships. Table A has a one-to-many relationship with tables B and C. I'll do some more...
  10. UltraSmooth

    Join Third Table Based on Join Between Two Other Tables

    I need to make a join between 3 tables, where the 3rd table is dependent on the join of the first two. Here's an example to elaborate, Table A A.col1 A.col2 ... A.colN Table B B.col1 B.col2 B.col3 ... B.colN Table C C.col1 C.col2 C.col3 ... C.colN I need col1 from table A, col2 from table B...
  11. UltraSmooth

    Help with Last Sold Query

    Here's what I've come up with so far, and I just noticed it's very similar to Riverguy's response, SELECT MenuItem.* , sales.* FROM MenuItem JOIN ( SELECT DISTINCT custitem.PLU , custitem.LocationNo , MAX(Custinv.InvoiceDate) AS LastSold FROM Custinv JOIN custitem ON...
  12. UltraSmooth

    Help with Last Sold Query

    I need to write a query selects all items from an inventory table 'MenuItem' that have sold since a user specified date. The sales table 'Custinv' has a record for every item sold by date and location (quite a large amount of records). I'm not really sure how to proceed, should I be joining...
  13. UltraSmooth

    Secondary Display Just Flashes

    Just a quick update on my laptop. The technician replaced the motherboard this morning and that corrected the problem. Looks like it was hardware after all.
  14. UltraSmooth

    Secondary Display Just Flashes

    Hi Phil, thanks for your response. My laptop has a FN+F5 to enable dual display. This just mimics the Win+P button function. I have also tried enabling it from nvidia control panel as well as through the windows control panel. I have also tried completely removing and reinstall the nvidia...
  15. UltraSmooth

    Secondary Display Just Flashes

    Whenever I try to enable a secondary display on my laptop it detects the monitor but then all it does is flash the desktop and then go black, like it's stuck in this auto-detect loop or something. I have tried multiple monitors and get the same thing. What's even funnier is that it worked the...
  16. UltraSmooth

    Error starting openreports webapp in Tomcat

    Thanks Dan for your reply but I have since solved my problem. Not sure exactly what caused it but I dumped the tomcat6 install that came with ubuntu server and did a manual install of tomcat 6.0.20 from apache.org. I also had to modify the my.cnf file to bind to 127.0.0.1. I had a bunch of...
  17. UltraSmooth

    Error starting openreports webapp in Tomcat

    I am running ubuntu server 9.10 with Tomcat 6, using java-sun-jdk. Tomcat is running but throws an error when I'm trying to start the openreports webapp, here's the error: SEVERE: Exception sending context initialized event to listener instance of class...
  18. UltraSmooth

    Top N of Group

    Thanks for responding Mark. I have tried implementing something like what you mentioned (how I interpreted it anyways) but am still not getting the correct results. Here's my query, SELECT trim(substr(pm_element,4,3)) AS department , pm_str_var as dept_desc , sales.* FROM syparamt LEFT JOIN...
  19. UltraSmooth

    Top N of Group

    I'm having some problems coming up with a "Top N Of Group" query. I've googled it as well as gone through this forum but cannot come up with anything that works. Here's my situation, hopefully someone might have some tips to point me in the right direction. I have 3 tables needed in the query...
  20. UltraSmooth

    Improving Query

    I have written a query, although provides the correct results, I'm wondering if my limited sql skills have made it a bit disorganized. I was wondering if someone can have a quick look and possibly punch some holes in the way I am doing things. First I'll explain the tables being used, syloctn...

Part and Inventory Search

Back
Top