Have you already tried the max feature. Maybe something like this:
SELECT MAX (RT.RentalTxnDate),RT.serial, Rt.Customer, RT.Invoice, RT.TxnLineID,RT.Location, CD.InvoiceTxnDate
FROM RentalsView as RT
INNER JOIN InvoicesView as CD
ON RT.serial = CD.serial
AND RT.customer = CD.customer...
Now I am a bit torn. I feel that the time is import. I have a number of records that were updated multiple times within a minute. I will stick with Erik's response
HAVING Min(S.Stat_Chng_Dt) >= DateAdd(mm, DateDiff(mm, 0, GetDate()) - 18, 0)
For one thing the timestamp would limit...
That makes alot of sense. WOW! I appreciate all the help guys. The having clause makes all the difference.
~ every wise man started out by asking many questions~
George-
I am looking through your results set. Can you explain what you did? Did I not need the STAT_TY_CD from the derived table like Erik is talking about?
~ every wise man started out by asking many questions~
Same deal. [sad] This has been the strangest query I have written in a while. Thanks for the suggestions. Do you have anymore?
~ every wise man started out by asking many questions~
A little more informationa about the data. There are many records that that have more than one S1.STAT_CHNG_DT before the 18 month cut off. I only want where the first time the property becomes 'active' and if that property falls after the 18 month cut off. Hope that makes sense
~ every wise...
Hey Folks-
I have a query here where I am looking for the first time a property has gone active. The twist is that I only want properties where they have gone active in last 18 months [July 2006]. I am have been looking for a while in other posts for another topic like mine, but nothing is...
I have a similar situation at the moment. I have tried using a derived table. I would suggest the same and see what you come up with.
~ a journey of a thousand miles must begin with a single step ~
I relinked the table and double checked that my primary key was accounted for. This is working according to plan.
Thank you for your help
~ a journey of a thousand miles must begin with a single step ~
Is there an ldb file in the folder when you open the mdb? - Yes
Is the table an Access table or is it linked from another system? - Yes it is linked to a sql server db
The problem did not occur until this morning and for only two tables.
~ a journey of a thousand miles must begin with a...
Good Afternoon-
I am working with a couple of tables that I need to paste data into. When I actually try to paste the data into the table, the normal empty row at the bottom of the table is gone. This limits my ability to paste records into the table from my excel spreadsheet. This feature...
All the fields are varchar. I believe I will be safe with that. Let me give this a shot!
~ a journey of a thousand miles must begin with a single step ~
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.