Announcement

Collapse
No announcement yet.

Create related items. SQL junkies help!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    ack! i cannot get that query to run on my dataset, no matter how much time, cpu and ram i throw at it.

    i think one's out of the reach of mere mortals. i'll need deep blue to crunch a single product's associateds.

    *sigh*

    Comment


      #17
      Hmm - there will be a better, more efficient query that can be run. As I said, SQL can be an art form to build correctly.
      Fergus Weir - teclan ltd
      Marketing - Design - Technology

      Comment


        #18
        This rather evil piece of SQL will do it. My table is called test and this gets a list out for user a

        SELECT DISTINCT ProdID From Test WHERE UID <> "a" AND UID IN
        (SELECT Test.UID FROM Test
        WHERE (((Test.ProdID) In
        (SELECT ProdID FROM Test
        GROUP BY ProdID HAVING Count(ProdID) > 1))));

        Includes the product being viewed as well ATM but you can easily screen that out either in the SQL or in the app.

        Regards,
        Jan Strassen, Mole End

        Comment

        Working...
        X