Thanks SQLBill. Actually that suggestion would only return the minimum value that is greater than Jan. 1, 2003. I needed to return the minimum value for someone whose minimum value is at least Jan. 1, 2003. So if they had a record in 2002 and 2003, I don't want that on the report at all...
here is the entire query. I didn't want to paste all this if the issue was just with the subquery.
SELECT
EBase."EbSocNumber", EBase."EbFirstName", EBase."EbLastName",
EBenefit."EnDateBeg", EBenefit."EnDateEnd", EBenefit."EnEECostPerPay", EBenefit."EnERCostPerPay", BenBase."BbDescrip"...
when I try:
and (ebenefit.endatebeg =(SELECT Min(eb1.endatebeg) FROM ebenefit as eb1 GROUP BY endatebeg HAVING Min(eb1.endatebeg) >= '1/1/2003'))
I am told that the subquery is returning more than 1 value which is not allowed. If it's selecting the minimum date where the minimum date...
oops. sorry, here is the whole piece:
...and(ebenefit.endatebeg = (select min(eb1.endatebeg) from ebenefit as eb1 where eb1.enflxideb = ebase.ebflxid and min(eb1.endatebeg) >= '01/01/2003'))
I have the min in both the select and the where which I dont think can happen, but amn not sure of the...
Hello,
I am having problems running the below portion of a query. Any suggestions are greatly appreciated. Ultimately, I am trying to pull the minimum date from a benefit table, where the minimum date is in 2003. It is important to have both parameters because I need to know whether an...
In my query below for terminated employees, I need the datepart function to return terminated employees up to the date entered but only from the year of the date entered.
So if a user enters the date 2/1/04 they should see all employees that have terminated in 2004, through Feb. 1st...
Hi Ito,
That's what I figured. I can't create Views because this is linked to my HRIS. I do not have the ability to generate views in the typical manner one would in an Access DB or a SQL Server (though this is a SQL Server DB, but it is hosted by our vendor and I cannot even establish an ODBC...
Thanks Ido. I made the correction to where I dropped off the table name prefix and shortened the table name (though it was about 2700 characters before and still didn't exceed 3000) but am still told it will exceed the threshold.
Synapsevampire, I am not very familiar with creating views within...
OK. I have a report that works fine as is and highlights discrepancies between fields and our 18 digit grant code which is compile fromt he codes (but in not linke din the software and so this is my data validation). I have set-up Crystal alerts to identify onbly the discrepancies, but you...
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.