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. Emmy2368

    Creating Year to Date Filter

    Thanks Dell. My apologies for the late response. Your first solution worked for me. Thanks for your assistance. Very much appreciated. Emma
  2. Emmy2368

    Creating Year to Date Filter

    I wasn't able to solve the problem so I ended up hard-coding it. I'm still very interested on hearing a dynamic way of doing it. I intend to achieve this at Universe level rather than database level. I use SQL server 2012
  3. Emmy2368

    Creating Year to Date Filter

    Hi, Could you please assist. Currently using BO version 4.1 SP6 I have a task of creating a Year to LastMonthEnd filter for both current & previous year. Our financial year starts from 1st Sept. I'm trying to avoid hardcoding the date in the filter but to make it more dynamic. DATE Between...
  4. Emmy2368

    Inserting start and end timestamps using triggers on multiple rows

    Thanks gmmastros for your great assistance. I tried different approach as below but with the initial guidance from you and it's working very well. Insert Into History(PtN, PtCt, StartDateTime, EndDateTime) Select I.PtN, I.PtCt, GetDate(), NULL From Inserted I INNER JOIN Deleted d on...
  5. Emmy2368

    Inserting start and end timestamps using triggers on multiple rows

    Hi gmmastros, thank you so much. The startdatetime is working perfectly well as I expected and it writes a new record each time the value of PtCt =0, but the EndDateTime isn't yet. Instead what it's currently doing is defaulting all the records with same enddatetime as at the time the value...
  6. Emmy2368

    Inserting start and end timestamps using triggers on multiple rows

    Yes the original table has unique id (Pk) which is PtN. The table only holds one record for each PtN at any point in time. So, I’m trying to build a history table to record all the changes that occur on that table since it only shows the current status. See table layout below PtN | PtCt | Pt1...
  7. Emmy2368

    Inserting start and end timestamps using triggers on multiple rows

    Hi Philhege, apologies if my explanation wasn't clear. I have rephrased it, see table below PtN | PtCt | StartDateTime | EndDateTime Pt1 | 0 | getdate()* | getdate()** Pt1 | 0 | getdate()* | getdate()** When the value of PtCt = 0 then getdate()* and when it changes from 0 to another...
  8. Emmy2368

    Inserting start and end timestamps using triggers on multiple rows

    Hi gk53, Yes column PtCt is the field that should fire the trigger once there's a change. I intend to use getdate() to generate the timestamp which will populate startdatetime when PtCt =0 and another getdate() to populate enddatetime when PtCt value changes from 0 to any other number. I hope my...
  9. Emmy2368

    Inserting start and end timestamps using triggers on multiple rows

    Hi, I'm a newbie in writing triggers and would appreciate if you could please assist. I want to capture a startdatetime and enddatetime each time PtCt changes value, when this condition is met i.e If(PtCt = 0, Insert timestamp(StartDateTime)) and when the value of PtCt changes from 0 to any...

Part and Inventory Search

Back
Top