I have two tables...
One Calendar table One Job table
Both have a create date and a client id.
I am trying to figure out at the point of someone creating a calendar event for a client at that exact point in time did any jobs against that client exist.
If they did exist, was the date the job was added less than 90 days or not.
I've attempted doing a join using a datediff between the create dates however what I am struggling with is the order of things.
For example if someone adds a calendar event today and then puts a job on tomorrow then that is less than 90 days but actually at the time they created the calendar event e.g. Before the job was added then the job before that may have been greater than 90.
Any ideas would be appreciated
hi, this is maulik.
I am having 8 years of experience in software part and having a good experience in SQL queries.
this most probably require a join of multiple tables with the condition of datediff core function of a SQL itself. I can do it and can tune your query to fetch the record as you wish.
there are also some ways that I can help you with.
like write a SQL query which resulted in best performance instead of taking longer time.
also it would be undersble so in future you can modify it as well.
I can use no lock so that other queries can't fail which are fetching record from the same table.
Hi
This looks from you description like you need 2 parameters and a sort order in the query
I have an hour or so free this afternoon free, or could look at later this evening for you
Relevant Skills and Experience
Use SQL for all our development
Proposed Milestones
£19 GBP - Working Query or Procedure supplied
I will require both table field detail
Relevant Skills and Experience
I have passion for database and I will finished this task with 100% accuracy
Proposed Milestones
£13 GBP - After work get complete