I have a query that I want to return a field and then a value.
Here is the basic query:
where ABR_ID IN
(SELECT DISTINCT abr_id
WHERE MOCStatus <> 'Inactive' and MOCStatus <> 'Complete'
AND expireyear = '2007')
Order by ABR_ID
What I want to do next is to check a field in the db (tblStatelicense.expirationdate) . It is a date field and I need to check it again today date (getDAte()) and return a value of Y if they have not expired and N if they have expired. There maybe multiple returns for one ID and some of those rows retunred will be expired and some won. But if they have at least on non-expired date then they should get a yes.
so my recordset would be ID Expired
Thanks in advance. Using SQL 2000
PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs).
Being someone who is always looking for alternatives to "work your data", I came across this …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
With just a little bit of SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form. If you have never written code or looked at an SQL statement before, no problem! ... give i…