473,473 Members | 1,822 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Scrambled data in some fields

1 New Member
We have recently discovered that several sending systems (all using the same subroutine) have been scrambling some of the data sent to an MS SQL database.

I'm trying to figure out how to identify the scrambled records.

We know that records with zero in the 4th, 6th and 7th positions of their SSNs, had the SSN rearranged. Instead of the SSN in order (123456789) it is now (467512389).

The SSN is used as a subsidiary ID field in the system (let's call it the SID field.) Since some people don't have SSNs, an alternate number, which may begin with three zeros, is used.

I can select off all SIDs beginning with 3 zeros, but some of those will be legitimate records.

I can also select off all SIDs with zeroes in positions 4, 7 and 8, but only SOME systems were making the mistaking.

I can't figure out how to make a list of SIDs with 4, 7, and 8 for which a corresponding SID with 3 zeroes in front exists. This list would be the first we examine. (We will have to check all '000' SIDs, since it's possible that only 'bad' SIDs were created for some people, instead of both 'good' and 'bad' SIDs.)

Can someone help a novice SQL programmer with this (to me) perplexing problem?
Aug 1 '06 #1
1 2085
moldster
18 New Member
If I understand you, you need to try the following

INSERT INTO PossibleErrors
( SID )
SELECT SID
FROM Table
WHERE SUBSTRING(convert(varchar,SID),1,3) = '000'
AND SUBSTRING(convert(varchar,SID),4,1) = '0'
AND SUBSTRING(convert(varchar,SID),7,1) = '0'
AND SUBSTRING(convert(varchar,SID),8,1) = '0'
Aug 7 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Ilan | last post by:
Hi all I need to add data from two Excel sheets (both on the same workbook) to an existing table in my SQL DB. The problem is that each sheet holds different fields for the same record, though...
32
by: Neil Ginsberg | last post by:
We're using SQL Server 7 with an Access 2000 MDB as a front end with ODBC linked tables. I recently created a new set of tables for the app, and users are complaining that unsaved data is being...
1
by: Andrew Arace | last post by:
I scoured the groups for some hands on code to perform the menial task of exporting table data from an Access 2000 database to Oracle database (in this case, it was oracle 8i but i'm assuming this...
7
by: Neil Ginsberg | last post by:
I'm having some problems with an Access 2000 MDB file with a SQL Server 7 back end, using ODBC linked tables. I previously wrote about this, but am reposting it with some additional information and...
3
by: acuttitta | last post by:
I ran into something really bizzaro today. A team member had me look into some export code for some data he was outputting. The data looks at shipping containers and attempts to look at how...
4
by: Vigneshwar Pilli via DotNetMonster.com | last post by:
Hey, Well, I have a Problem. I have designed a table which has few fields which are being declared in the database of type .... char of length 10. and other fields with varchar 50 and...
4
by: OpticTygre | last post by:
I need to write a loop that prints all the combination possibilities of a character array. Basically, taking a scrambled word, or a regular word, and printing out all the combinations. The...
5
by: sck10 | last post by:
Hello, Occasionally, my web.config file will get scrambled and I have no idea why. Has anyone else experienced this problem? Thanks, sck10... It goes from this: <add name="ConnOracleIPS2"...
5
by: Ben | last post by:
Hi, I am looking to incorporate the scrambled text functionality (a graphic etc with scrambled text appears and the user is required to type in what he sees to prevent anonymous hits/spamming etc....
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.