Reject random characters in name field

Hi Everyone,
I am trying to develop a heuristic for checking the value in a field to make sure that the value coming from an external database table is a word rather than random characters.  For example, identify the value "asdfadfag" entered into the
first name field instead of a legitimate word (Kim, John, Ken, etc). Based on the output, I could either pass the record or reject it. I realize that this might be a pretty tall order, but I want to be reasonably sure that the value in a name field is, in
fact, a name before I commit the record to the database table.  I do not have access to the front end web app that is the source of the data.  Any suggestions?

If you have possible list of valid names , you can try using the SQL Server inbuilt functions SOUNDEX or DIFFERENCE.
Difference and Soundex
create table test1(c1 int identity(1,1),c2 varchar(100))
create table test(c varchar(100))
insert into test (c) values ('John'),('Peter'),('Rose'),('jack'),('Kim')
insert into test1 (c2) values ('John'),('Peter'),('sdgev'),('asdfadfag'),('kem')
select * from
test1 where not exists (select 1 from test where SOUNDEX(c2)=SOUNDEX(c))
select * from
test1 where not exists (select 1 from test where DIFFERENCE(c2,c)>=2)
Please use Marked as Answer if my post solved your problem and use
Vote As Helpful if a post was useful.

Similar Messages

  • Shared photo-stream, makes long file names with 42 random characters

    Windows icloud 3.1, in a shared photo-stream, makes file names with 42  random characters long. It didn't do this in iCloud  2. I have installed  iCloud 3.1 on a windows 8.0 and 8.1 machine and two Windows 7 machines.  They all do the same thing.  It used to give me file names like  "IMG_0001.jpg" now it gives me random file names like  "01a9fc3363330464233a142486180f0c1622eb9fca.jpg" all the pictures are  out order.
    Does anyone have fix for this? Does any one else have this  problem? I have posted this before and know one else that uses windows  seams to have this problem exect me. I did call Apple and they did some  research and bumped me up to senior  techs and eventuality Apple told me this is working the way it was  designed to. This is extremely stupid, I need the sequential file names  so the pictures will sort correctly.

    I have never found a solution for this.
    I did find a Work Around. What I do when I receive a folder full of pictures from another ios iPhone user, I copy all the photos as a batch from the PhotoStream folder into a free Windows program called "FastStone Photo Resizer" from www.FastStone.org. This program allows you to resize the photos as a batch to what ever size you wish. In my case I resize them to 2560 x 1440 which fills my 27" monitor and reduces the file size of each picture from 2MB or 3MB down to about 450 KB without degrading the picture as far as what you see on the screen.
    This program will also within the same batch operation, allow you to sort the pictures by "Date Taken" which is the Date and Time the picture was taken. It gets this information from the EXIF data in the jpg file. This program will then rename the files with different numbering format options including date, time, alphanumberic and with just simple numbers starting at what ever number you wish to start with. I can get files that look like this again "IMG_0001.jpg" and have all the pictures in the correct order that they were taken. At this point, I save the pictures directly to a folder on my PC. The cool thing about this is, all the EXIF data is preserved as well. I can process a 100 pictures in less that 60 seconds. I hope this helps. For me, I can now live with this iCloud numbering defect.

  • Random characters after computer name

    Hello,
    We have a new issue with our agent deployment since we use MDT to deploy our workstations.
    When computer register to ZCM some random characters appear after computer name, for example:
    Computer name: corporate001
    ZCM computer name: corporate001-741132927c2e6f41b5569a9f9409b983
    Do you have an explaination?
    ZCM Agent is automatically installed after deployment through a .vbs script.
    cscript ZCMscript.vbs
    Code:
    Set objShell = CreateObject("Shell.Application")
    objShell.ShellExecute "PreAgentPkg_AgentCompleteDotNet.exe", "-q " & "-x"
    strComputer = "." ' local computer
    strProcess = "Setup.exe"
    Do Until isProcessRunning(strComputer,strProcess)
    WScript.Sleep(5000)
    Loop
    Do While isProcessRunning(strComputer,strProcess)
    WScript.Sleep(5000)
    Loop
    WScript.Quit 0
    ' Function to check if a process is running
    FUNCTION isProcessRunning(BYVAL strComputer,BYVAL strProcessName)
    DIM objWMIService, strWMIQuery
    strWMIQuery = "Select * from Win32_Process where name like '" & strProcessName & "'"
    SET objWMIService = GETOBJECT("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" _
    & strComputer & "\root\cimv2")
    IF objWMIService.ExecQuery(strWMIQuery).Count > 0 THEN
    isProcessRunning = TRUE
    ELSE
    isProcessRunning = FALSE
    END IF
    END FUNCTION

    Yes, the random number is the "Device GUID".
    In your Example there would already be a device called "corporate001" in your zone.
    The GUID is added since there cannot be two devices with the same name.
    There are reconciliation rules that determine "matches".
    Most likely, your rules rely upon MAC and/or SN and this changed instead of relying upon Workstation Name.
    No one way is "Correct".
    It really comes down to what works for you.
    Most likely a tweak of the rules to rely more upon "Workstation Name" may work best for you since I suspect your devices are in a domain if using MDT, which means the names are unique.

  • Acrobat adding random characters to file name

    Every so often Acrobat will add random characters to a file name while re-creating a pdf. This has caused an issue with InDesign not recognizing a link needs to be updated due to the file having a new name. Any ideas why this occurs and/or solutions to make sure it does not?

    Every so often Acrobat will add random characters to a file name while re-creating a pdf. This has caused an issue with InDesign not recognizing a link needs to be updated due to the file having a new name. Any ideas why this occurs and/or solutions to make sure it does not?

  • Oracle can not support upto 32 characters table name and field name ?

    hi
    oracle up limitation ?
    create table aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(a char);
    Error
    ORA-00972:identifier too long
    or
    create table a (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa char);
    Error
    ORA-00972:identifier too long
    Oracle can not support upto 32 characters table name and field name ?
    It is true?
    null

    Hello All
    It's been a year after those posts about the limit of identifiers in Oracle Database. Does anybody know what can be done to get rid of that primitive limit? We are developing using Application Servers, Java, generated Code and a very nice object model, in which we can't just use abreviations because of early database age memory shortcomings.
    We are currently using 8i in a very large organization. Is there any chance this version can be configured to allow larger identifiers? Is upgrading to 9i going to solve this problem? Is Oracle Databases really doomed forever because of a 20-year-ago limitation?
    Please, I do like Oracle Databases. I don't want to be flooded with quick answers like "just use 32 character identifiers". I would like to hear a serious solution. Is anybody there still locked in the 8.3 filename paradigm of MS/PC-DOS? Does anybody has to fit an entire Enterprise System in segmented 640Kb of memory? Does anybody has to use monochrome character mode interfaces? Of course not those in the mainstream.
    I also know that other hadrware and software products have lots os limitations. Take Windows 2000. Its command line has a limit of 255 characters! You can't have more than 4GB of memory in a PC! However, one can't expect one mistake to justify others.
    I wish I were very wrong in this respect, and all it should be necessary is to turn on some kind of configuration parameter in 8i to allow us to develop high quality code.
    Thanks for your attention.
    Please, feel free to contact me if you have a solution.
    [email protected]

  • Random Characters insterted into Crystal Reports string fields

    I'm having a problem where random characters are being inserted into string fields in my crystal reports, I talked to a representative and they are unable to fix the problem, so I'm asking here if someone has a workaround.  The characters are always outside of the normal set of characters, so I'd like to know if there is a way to only allow certain characters in a given field using formulas.  (for example, at a very simple level, i would input a list of "legal characters" and the field in crystal wouldn't display anything but those characters)
    thanks for your time and help

    Sorry, i think I've been a bit imprecise so far
    So these characters ONLY appear when printing the report and not when previewing the report in Crystal Reports?
    They appear when previewing, when actually printing, everything after the characters is cut off
    Are you printing directly from CR or from Enterprise/Infoview or another custom application?
    From CR (both to PDF and paper)
    When did you update your print driver last?
    Not sure, although this may be moot since it also shows up in the preview?
    Have you printed on another printer and does it too exhibit the same behavior?
    Same as above?
    Was the report created by you in CRXI? Are your regional settings set to English (language)?
    Yes I created the report in CRXI, and in terms of the regional settings, I'm not sure but would assume so, how do I check/change this?

  • "Login name" field randomly empty

    We have the Inventory Only client deployed. All is working well except that the "Login name" field is only filled in with about 10% of the scanned stations and those 10% change after every scan. It seems that this field is filled in and emptied randomly. ZCM Version is 10.2.1 (did not work in earlier version either). Workstations are W2K and XP, all with client 4.91sp2. Happens with both OS's. The scans on the workstations happen when users are logged in during the day. I have changed 'determining Primary User' but that does not seem to affect anything. Any idea where this field gets its value on the local workstation ?
    thank you
    peter

    PeterStruys,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://forums.novell.com/faq.php
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • Path and Name field in SPD 2010 Workflow for creating Doc Sets

    Hi Guys,
    Here's hoping you can help out and give a few pointers. I'm currently trying to implement what I thought was quite a simple workflow involving the creation of a Content Type (similar to Doc Set but with additional field) within an alternative library when
    a new item is added to the current library.
    Create Item in CaseFileLibrary (Output to Variable: CaseFile)
    When running the workflow, I keep getting the following error:
    "The workflow could not create the list item because the file name is either missing or invalid. "
    It seems to be related to the 'File and Path' field within the 'Create New List Item' field mappings. For this I have tried the CurrentItem:Title as some other forums suggest and have also tried entering the URL path e.g. /subsite_name/library_name/CurrentItem:Title.
    (as the name of the CaseFile (Doc Set) is going to be the same as the current item name)
    If anyone has any suggestions, I would be truely greatful.
    Luke

    Hi Luke,
    This error indicates there is an error in the workflow logic. Ensure that the file name entered in the Path and Name field is a valid file name. Common reasons for a file name to be invalid include a missing or incorrect file extension or a file/path string
    that is too long and exceeds the allowable number of characters.
    More information, please refer to :
    Common error messages in SharePoint workflow development
    For the URL that you used in the ‘Create New List Item’, whether the CurrentItem:Title is a lookup, not typed by yourself. If not, please type /subsite_name/library_name/, then lookup CurrentItem:Title, like the below, then save and publish the workflow,
    compare the result.
    In addition, please use another name for the name, compare the result.
    Best Regards,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • How to extract special characters from a field

    Hi there.
    I am a novice when it comes to Web Intelligence reports. I have been tasked with producing a final report that I can export to Excel which shows a project number and a project name. Very simple. Ultimately I need to import my final Excel file to a third party software. However, the issue is the project name field consists of special characters such as hyphens, parenthesis, asterisks, etc. I need to be able to create a formula which extracts all special characters and just leaves me with alpha-numeric characters and spaces. I also need to limit the character count to no more than 34 characters. I will not be able to import my final Excel file unless I can product those results. With the help of a very knowledgable person in the Crystal Reports forum, I was able to do that by using the following formula:
    stringvar a:=left({Projects.ProjectName},34);
    numbervar i;
    Local StringVar fin;
    for i:= 1 to len(a) do
        if a[i]in ["a" to "z"] then
            fin := fin & a[i]
        else if a[i] in ["1" to "9"] then
            fin := fin & a[i]
    else if a[i] = " " then
         fin := fin & a[i];
    fin;
    It worked amazingly well in Crystal Reports but this report now needs to move to Web Intelligence. Is there a way to do this in a Web Intelligence report? Itried but the formula is not recogizable. I tried creating a variable and using this formual but I couldn't get it to work.  I appreciate all helpful responses. The version of Web Intelligence I am using is SAP Business Enterprise XI. I am working in a PC environment using Windows 7 if that helps at all.
    Thank you!
    Lauren

    Hi Lauren, Please provide with some sample data...
    In SQL, by writing some Functions/Procedures you can eliminate special characters. Ask your database team to do that.
    or
    Create an object with the following syntax... It Works in SQL.
    = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE
    (REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE
    (REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE
    (REPLACE(REPLACE(REPLACE([String_Object],'&',' '),'*',' '),'(',' '),'^',' '),'%',' '),'!',' '),'@',' '),'#',' '),'$',' '),'~',' '),')',' '),'+',' '),'=',' ' ),'-',' '),'_',' '),'/',' '),':',' '),';',' '),',',' '),'<',' '),'.',' '),'>',' '),'?',' '),'"',' '),'''',' '),'[',' '),']',' '),'{',' '),'}',' '),'\',' '),'|',' ')
    Example: Input: '~!@#$%^&*()_+{}:"<>-=[]./\|/*-+ascdfv123'
                  Output: ascdfv123

  • LabVIEW 2011 file selection fails to fill in the file name into the "File name:" field

    In LV2011 I am selecting a text file while my code is running. The "file name:" field is not populated with the selected file name.
    This is inconvenient, especially if I want to modify a file name by one or some few characters.
    How do i make LV 2011 behave like the previous versions?
    Scientia est potentia!
    Attachments:
    File name is not filled in.PNG ‏72 KB

    Thank you fot your reply it causd  me to find the problem.
    I figured it out while I was trying to extract the applicable section of my code to send it to you.
    I had an asterisc wired to the "default name" input of the "File dialog" VI.
    Now I am not wiring anything to the "default name" input of the "File dialog" VI and it works just fine.
    I am sorry for your lost time.
    Scientia est potentia!
    Attachments:
    Corrected code.PNG ‏10 KB

  • Mail message address has random characters - Mountain Lion

    After opening a blank new message, I add an easily recognized last name.  Then I get dozens of random characters instead of the proper email address. Please help me Fix this problem.
    Thanks

    I'm having the same problem in a different part of Preferences.
    I keep unchecking "Logoff after X minutes of activity" in the Security and Privacy section. After restarting the setting is checked and enabled again.
    My user is a network user connected to a Mountain Lion Server. I've tried the same things with different users and computers with the same results.

  • Name Field Cleared - Enter as Guest

    Hi
    When guests are entering my rooms, they click on the radio button "Enter as Guest", type their name into the text box and click “Enter Room”.  Their name field is then cleared out to blank.
    No matter what content is entered, it gets erased and users remain at the log in screen.
    Internet Explorer is our default browser.  Users have their pop up blockers turned off.
    At first this was random.  However, it has become very consistent for the past few months.  I called  in December and was told to use Chrome. 
    Chrome’s not my preference as Citrix works better in IE, and having to open Chrome specifically only to log on to Adobe is rather frustrating.  
    Does anyone else have a real FIX  for me?
    Thanks soo much!!

    No...if they wrote guest as their name then that is what would appear. Also, once in the room anyone can right mouse on their name and change it for display purposes.

  • How to reject tab characters in EDIFACT (EDIEL) 10.1.2.3

    We get tab characters in alphanumeric fields in some EDIFACT (EDIEL) messages, which should not be supported. The messages are forwarded to an external partner who rejects them. We would like to reject them when we (B2B) receive them instead.
    Where do we control this? I have checked $ORACLE_HOME/ip/oem/edifecs/XEngine/config/actions-edifact.ecs, but I can't find tab as a legal character for any of the encodings (UNOA, UNOB, UNOC) that we use, so it should be rejected.

    Hi,
    Try Launching the FDM with url something like http://fdmservername/HyperionFDM---- which is in 9.3 version.
    You can also try something like logon to server where fdm is installed and open iis(inetmgr [command]) and expand websites and try browsing the FDM website by right clicking on FDM website and browse.
    it will try launching FDM login page with a url being displayed at the bottom on inetmgr window. ex:http://localhost/HyperionFDM.
    Thanks
    Amith

  • Can JFileChooser file name field return all entered chars

    In JFileChooser, if I want to get all entered characters from file name field, is there a method I can call?
    I used method chooserUI.getFileName() or chooser.getSelectedFile(). These two methods returned texts which missed back slash and forward slash. I want to get everything what I entered in file name field. I searched and read related JFileChooser topic, but there isn't a topic about this. Can any of you know what I can do?
    Thank you very much.

    JFileChooser isn't for entering text, it's for selecting files. If you put for example "abc/def" in the filename box, it's going to interpret that as "file def in directory abc" and your getFileName() will return "def". (You'll notice that getFileName() doesn't return the directory path, just the filename part of it, right?)

  • Removing punctuation in last name field

    Hi all,
    I have to write an API to an email system which does not accept punctuation as part of the mailbox. One of the fields I am using to build the mailbox is the persons last name. The problem I am experiencing is the use of punctutation in the last name field with individuals that have names for example like O'Leary, O'Shea, Baker-Newbie, etc... How would one write the syntax to remove punctuation from a column?
    Thanks,
    Mike

    I would consider the Oracle TRANSLATE function:
    How you do things depends on what you want to do with the punctuation characters. If you are going to omit then:
    TRANSLATE(last_name,
    'ABCDEFGHIJKLMNOPQRSTUVWXYZ!£$%',
    'ABCDEFGHIJKLMNOPQRSTUVWXYZ')
    or something like it (just add the characters to omit to the end of the 'from' string) take care to escape any quote symbols in your from string.

Maybe you are looking for

  • Ipod touch 3.1.1 free app open and close

    I upgraded ipod touch to the newest 3.1.1 and downloaded some free app for test such as skype, weather, yahoo financa,etc. But somehow when I touched to open apps, they will close very quickly, I reboot ipod a few times,also removed and re-installed,

  • [Sims 3] Brightness a bit dark

    Hi. I run on Arch x86_64 with bin32-wine 1.1.40 (because with the 1.1.41, I can't launch the installer) and I've a little problem with the sims3. When I launch it in fullscreen mode, the screen become dark, and it do that only with the sims 3, my oth

  • Compaq Presario c700 laptop RAM.....Blue screen!!!!

    Hello, I just recently removed vista and upgarded to Win7 32 bit. I tryed to add 4gb of RAM, due to the factory 1gb it came with.  However got a Blue screen Error.  After that I only installed 1 of/ 2gb stick of RAM and it worked.  My quetsion is, I

  • Would like to install Adobe reader on my kindle fire

    How do I install Adobe reader on my kindle fire?

  • Next "Find" result not in the centre of the window

    After upgraded to 14.0.1, I find the next search result (either by "alt + N" or "ctrl+G", no longer appear in the center of the window. This feature in version 13 was very helpful for me. It allows me to have my eyes concentrating on the center of th