A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Complicated Data Checking



 
 
Thread Tools Display Modes
  #1  
Old January 30th, 2008, 02:25 AM posted to microsoft.public.access
zyus
external usenet poster
 
Posts: 210
Default Complicated Data Checking

I hv this field and sample data in my table

ID DOB
701011123214 11-Oct-70

ID is text field & DOB is date field.
First 6 digit in ID field represent date of birth (reversed sequence).

How to check records which are not in compliance with the structure as
mentioned.

Thanks

  #2  
Old January 30th, 2008, 02:43 AM posted to microsoft.public.access
DanRoss
external usenet poster
 
Posts: 27
Default Complicated Data Checking



SELECT *
FROM [TABLE]
WHERE (((Left([ID],6))Format([DOB],"yymmdd")));

should find records where DOB and ID(dob) are not the same



"zyus" wrote in message
...
I hv this field and sample data in my table

ID DOB
701011123214 11-Oct-70

ID is text field & DOB is date field.
First 6 digit in ID field represent date of birth (reversed sequence).

How to check records which are not in compliance with the structure as
mentioned.

Thanks


  #3  
Old January 30th, 2008, 06:14 AM posted to microsoft.public.access
zyus
external usenet poster
 
Posts: 210
Default Complicated Data Checking

Wonderful DanRoss.....It's very so uncomplicated to you...Thanks A LOT

"DanRoss" wrote:



SELECT *
FROM [TABLE]
WHERE (((Left([ID],6))Format([DOB],"yymmdd")));

should find records where DOB and ID(dob) are not the same



"zyus" wrote in message
...
I hv this field and sample data in my table

ID DOB
701011123214 11-Oct-70

ID is text field & DOB is date field.
First 6 digit in ID field represent date of birth (reversed sequence).

How to check records which are not in compliance with the structure as
mentioned.

Thanks


  #4  
Old January 30th, 2008, 07:37 AM posted to microsoft.public.access
zyus
external usenet poster
 
Posts: 210
Default Complicated Data Checking

Need to get opinion on 2nd scenario
ID SEX
701011123214 M or F

Both are text field.
Last one digit in ID field indicates the gender. Odd=M and Even=F

How to check records which are not in compliance with the structure as
mentioned above.

Try to simulate from your earlier statement but failed

Thanks

"DanRoss" wrote:



SELECT *
FROM [TABLE]
WHERE (((Left([ID],6))Format([DOB],"yymmdd")));

should find records where DOB and ID(dob) are not the same



"zyus" wrote in message
...
I hv this field and sample data in my table

ID DOB
701011123214 11-Oct-70

ID is text field & DOB is date field.
First 6 digit in ID field represent date of birth (reversed sequence).

How to check records which are not in compliance with the structure as
mentioned.

Thanks


  #5  
Old January 30th, 2008, 06:39 PM posted to microsoft.public.access
DanRoss
external usenet poster
 
Posts: 27
Default Complicated Data Checking

Try:



SELECT *
FROM [User]
WHERE (((User.Gender)IIf((CDbl(Right([UserID],1)) Mod 2)=0,"F","M")));





"zyus" wrote in message
...
Need to get opinion on 2nd scenario
ID SEX
701011123214 M or F

Both are text field.
Last one digit in ID field indicates the gender. Odd=M and Even=F

How to check records which are not in compliance with the structure as
mentioned above.

Try to simulate from your earlier statement but failed

Thanks

"DanRoss" wrote:



SELECT *
FROM [TABLE]
WHERE (((Left([ID],6))Format([DOB],"yymmdd")));

should find records where DOB and ID(dob) are not the same



"zyus" wrote in message
...
I hv this field and sample data in my table

ID DOB
701011123214 11-Oct-70

ID is text field & DOB is date field.
First 6 digit in ID field represent date of birth (reversed sequence).

How to check records which are not in compliance with the structure as
mentioned.

Thanks



  #6  
Old January 31st, 2008, 05:26 AM posted to microsoft.public.access
zyus
external usenet poster
 
Posts: 210
Default Complicated Data Checking

Thanks Again,,

You have brighten my day

"DanRoss" wrote:

Try:



SELECT *
FROM [User]
WHERE (((User.Gender)IIf((CDbl(Right([UserID],1)) Mod 2)=0,"F","M")));





"zyus" wrote in message
...
Need to get opinion on 2nd scenario
ID SEX
701011123214 M or F

Both are text field.
Last one digit in ID field indicates the gender. Odd=M and Even=F

How to check records which are not in compliance with the structure as
mentioned above.

Try to simulate from your earlier statement but failed

Thanks

"DanRoss" wrote:



SELECT *
FROM [TABLE]
WHERE (((Left([ID],6))Format([DOB],"yymmdd")));

should find records where DOB and ID(dob) are not the same



"zyus" wrote in message
...
I hv this field and sample data in my table

ID DOB
701011123214 11-Oct-70

ID is text field & DOB is date field.
First 6 digit in ID field represent date of birth (reversed sequence).

How to check records which are not in compliance with the structure as
mentioned.

Thanks



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:33 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.