User Profile

Collapse

Profile Sidebar

Collapse
trickyidiot
trickyidiot
Last Activity: Jul 30 '07, 04:32 PM
Joined: Jul 12 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • SP kills a query when put in a parameter... help?

    This query executes fine by itself:
    SELECT count(id) as countr, username FROM endeavor_search WHERE IN (SELECT username FROM endeavor_member Info WHERE workingWith = @workingWithID) AND searchDate > @maxDate GROUP BY username;

    When trying to put it in a variable within a stored procedure, it fails:
    SET @savedSearches = (SELECT count(id) as countr, username FROM endeavor_search WHERE EXISTS (SELECT username FROM endeavor_member Info...
    See more | Go to post

  • UPDATE

    After extensive reading I have changed my approach...

    I'm selecting the sums grouped by usernames from each of the three tables and storing them in temp tables but I'm stuck on something I;ve never dopne before - a union select statement

    What I hope to achieve with this select statement is a full count of all activity per member, and from there I should be able to loop through those results and...
    See more | Go to post

    Leave a comment:


  • VERY Complex stored procedure... I'm lost. Help?

    I don't even know if this is possible - I'm still fairly new to stored procedures.

    I have 4 tables I need to compile data from:
    saved_searches
    saved_homes
    printed_homes
    member_info

    saved_searches, saved_homes and printed_homes each track the date they were created.

    I need to grab all the users from member_info who have had activity in saved_searches, saved_homes and printed_homes...
    See more | Go to post
No activity results to display
Show More
Working...