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 strongm 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 RobHat

  1. RobHat

    Adding Events to a record in new window

    Hi, Hoping someone may be able to offer some advice. I have an asp.net page using c# code behind. This page pulls an individuals record from an sql database and displays the info on the page using the asp:formview control. This control is bound to an asp:sqldatasource control. Also on this page...
  2. RobHat

    Merge duplicate records based on certain criteria

    Thanks George, So am I right in thinking that the following should be the overall plan: Run the previous query you gave me into a new table: DupeIdentify Write a new query which does the following: Selects the data from DupeIdentify, loops through the results and for each row returned: uses...
  3. RobHat

    Merge duplicate records based on certain criteria

    After looking a bit more. Do I need to use the CURSOR function or would a WHILE loop be ok?
  4. RobHat

    Merge duplicate records based on certain criteria

    Hi Sorry I'm back on this again. I have been looking into where to go from here and have a few ideas. Just wanted to run them by you for feedback? So from the previous result could I: Copy the previous resultset in a temp table then: loop through the results using CURSOR and if for example...
  5. RobHat

    Merge duplicate records based on certain criteria

    Sorry to be a pain, any thoughts on the merge and delete. Thanks again for your help with this GMMastros.
  6. RobHat

    Merge duplicate records based on certain criteria

    No worries, I am impressed so far. I have been staring at these tables trying to figure out the best method of doing this for ages. My next step was to go manual he he. Now my challenge is understanding what each piece is doing lol :) Looks fine to me. Has returned all duplicates and put the...
  7. RobHat

    Merge duplicate records based on certain criteria

    Hi again, I ran this but got the error: Column 'Contract.PersonId' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause. I added a group by clause so it looked like: ;With RecentActivity As (Select Contract.PersonId...
  8. RobHat

    Merge duplicate records based on certain criteria

    Yep perfectly, I obviously did'nt explain it as badly as I thought :)
  9. RobHat

    Merge duplicate records based on certain criteria

    Thanks for the quick response. I have been trying this out but I dont think I am getting the desired result. My original post with the table details in was a basic mock up to explain the structure. However it was a little too basic. The actual structure is as follows (I have created a replica...
  10. RobHat

    Merge duplicate records based on certain criteria

    Hi guys, this is still an issue any ideas. Rob
  11. RobHat

    Disable Menu Item

    Also just want to add a thanks to Robertfah for all the help. Most appreciated.
  12. RobHat

    Disable Menu Item

    Ok finally sorted. in aid of finishing the thread and for future reference: I had been writing my code in the wrong place and needed to define a new event for the menu. The completed code is as follows: private void contextMenuStrip1_Opened(object sender, EventArgs e) { string ssql = ""...
  13. RobHat

    Disable Menu Item

    Hi, SO I now know how to get the menu item disabled but am stuck linking it to a query or similar to determine whether there is a date present in the record. I so far have this: private void InitializeComponent() { if () this.ToolStripMenuItem.Enabled = false; else...
  14. RobHat

    Disable Menu Item

    Thanks for that. Sorry to push my luck but any hints on the If statement and how to set the query up? Thanks again for all your help today. Really appreciated.
  15. RobHat

    Disable Menu Item

    ok, forget my previous post as I have now sorted it. I know where I need to put the disable in to get the desired result. The menu looks like this: <right click the persons details> Registration > Demographics Events etc If you hover or click the Registration text it takes you to: Register I...

Part and Inventory Search

Back
Top