Thank you everyone. I made couple of changes and my final query is like
SELECT elgadr.erstat, elgadr.erzpcd
FROM elgadr, state
WHERE ((elgadr.erstat)= [state].[state_code]) AND
((elgadr.erzpcd)) Not Between Left([state].[Zipcd1],3) And Left([state].[Zipcd2],3) AND
((elgadr.erzpcd)) <>...
Hi, with my query, it is inserting all the data from bilact table to my temptable tblCurrent_Month. But I just need to insert the data where the month of Bcr_Billing_period. Ie I give 01/23/2006 it needs to pick the data where Bcr_Billing_Period is between 01/01/2006 to 01/31/2006.
My data for...
Thank you. I modified it and my query now is
SELECT
elgadr.erstat,
elgadr.erzpcd
FROM elgadr, state
WHERE elgadr.erstat = state.state_code And
elgadr.erzpcd (NOT [BETWEEN (left([state.zipcd1],3) And NOT (left([state.zpcd2],3)) OR elgadr.erzpcd <> (left([state.zpcd3],3));
It still gives me...
Thanks. I modified my query as
SELECT
elgadr.erstat,
elgadr.erzpcd
FROM elgadr, state
WHERE elgadr.erstat = state.state_code And
elgadr.erzpcd (NOT [BETWEEN (left([state.zipcd1,3]) And NOT (left([state.zpcd2,3])) OR elgadr.erzpcd <> (left([state.zpcd3,3])) ;
but still i get the wrong number...
Hello All,
I need to validate State and ZipCode. I will have to extract all the data where is there is data mismatch between state and zipcode in my table elgadr.
The fields in elgadr are
for state: erstat
for zipcode: erzpcd
and data shows like
erstat erzpcd
CA 95682
To handle...
Hi All,
Someone please help me. I wrote a query to extract the members where Child DOB is older than parent. It runs really quick but it is returning duplicate rows. Please help.
My Query:
SELECT DistinctROW elgdep.MEM_SOC_SEC_NUM, elgdep.MEM_DEP_CODE, elgdep.MEM_EFFEC_DATE...
Thanks PHV. I wrote the first query as
SELECT State.State_Code, ZipCode.ZipCode
FROM State INNER JOIN ZipCode ON State.State_ID = ZipCode.State_ID;
and named as Qry_StateZip. It returned me all the state_ code and ZipCode
(Date Stored in State Table looks like)
State_ID State_Code...
Hello,
I have to pull in the records which has state and zip mismatch. For this i created two tables state and zip.
State with State_ID,State_Code,State_name
Zip with State_ID,Zip
Where State_ID is primary key and Autogenerated.
Could someone give me the logic about how do i validate...this...
Hello All,
I need to pull the records where the location starts with 'z' or 'y'. Here is my query
SELECT elgemp.ENR_GRP_NUMBER
FROM elgemp
WHERE (((elgemp.ENR_LOC) Like 'Y*' Or (elgemp.ENR_LOC) Like 'Z*'))
ORDER BY elgemp.ENR_GRP_NUMBER;
Is this right method? I dont get any records when i run...
Thanks a lot Melagan and PHV...PHV..it worked perfect with
Provided that elgdep.MEM_BIRTH_DATE is a pseudo-date field formatted as yyyymmdd:
SELECT ...
FROM ...
WHERE elgdep.MEM_BIRTH_DATE < Format(DateSerial(Year(Date())-110,Month(Date()),Day(Date())),'yyyymmdd')
Thanks a ton
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.