Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Search and Replace Numeric Data in Tables

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Search and Replace Numeric Data in Tables

    Can anyone help me with trying to search for a specific number strings in numeric fields with an alternative number?

    The Operations section only seems to address text fields and not numeric ones!

    #2
    Re: Search and Replace Numeric Data in Tables

    I think you need to check out the operations a little close. Hint: Update operation!!

    There are many options in the genie that also deals with numbers. However, I may not be understanding exactly what

    a specific number strings in numeric fields with an alternative number
    How about an example or two.

    Comment


      #3
      Re: Search and Replace Numeric Data in Tables

      I think Doug has pointed you in the right direction with the update operation but I'll add a comment or two anyway.

      If you have a numeric field that you want to "Search and Replace Numeric Data" then it is probably not really numeric data. It probably is a string of digits like a part "number" or a zipcode. Since you indicate that you have it stored in a numeric field it is true that you can't search and replace digits in a such a field.

      You can "read" the number into a string, manipulate the digits, and convert the result into another number. If you have a number

      123456

      then alltrim(str(123456))

      is "123456".

      Now you can use any of the character functions to modify that string like

      left(alltrim(str(123456)),3) yields "123" and

      val(left(alltrim(str(123456)),3)) yields the number 123.

      You just have to be creative in building the conversion expression. Write down a sample starting number and the end result and try to figure out what steps it will take to make the conversion.
      There can be only one.

      Comment


        #4
        Re: Search and Replace Numeric Data in Tables

        Thanks Doug & Stan, I will do some experimentinng

        What basically is my problem is that I have an application which has a number for each person. I am now trying to cross relate my people in my application with the same people in someone else's application which is not in Alpha but it is using a different ID numbering sequence to me.

        I thought it would be a simple matter of using the Operation genie to say look up number (say) 1128 and change it to 8001 but the search and replace operation is not seeing my field Id as it is not a text field but a number field

        I did look at the update record operation under the number tab but did not see any routine that would fo what I was looking for but I will, as I said earlier, to back and try some more experimenting

        Thanks again

        Comment


          #5
          Re: Search and Replace Numeric Data in Tables

          In what form does the translation file exist?

          If you have a table where each person's id number is listed for both systems, then you could use a post operation from that table to your main table.

          The safest way would be to add a field to your table for the new "number", post to the new field, verify the translation, then update your field with the new field.
          There can be only one.

          Comment


            #6
            Re: Search and Replace Numeric Data in Tables

            Thanks Stan

            Further clarification.

            The new application is not owned by us and is on a secure network to I cannot link dynamically to it. Eventually it is envisaged the new system will take over from the one I did but until the new one can give us everything we currently have I am having to run two systems. It is envisaged this could take at least three years and no guarantee is given on the timescales. That is why I am having to change mine to tie in with the new one - so that the personnel will have the same id numbers

            I also have a dumber of sets and tables all using the id no as the linking field so I have a number of tables containing id numbers that need to be changed hence I thought it would be a relatively simple task of search and replace the current number with another.

            Does this help clarify things?

            Comment


              #7
              Re: Search and Replace Numeric Data in Tables

              Originally posted by Tedacria View Post
              Does this help clarify things?
              That explains the situation, not how you will know what id number in your table gets replaced by what id number in the other system.


              It will be fairly tedious but you can construct an update operation like the screenshot attached (for each table). Edit the expression column and the condition column for each id you want to change.

              This will replace the contents of the id field with the value in the expression column (8001 here) for each id where the condition is met, ignoring all others, effectively "searching" for 1128 and "replacing" it with 8001.

              Now if you want a much easier way.....

              Build a table with two fields. One field for your id number and one field for the other id number. Populate the table with all the id numbers in your existing table(s) - maybe an append operation and then delete duplicates? Fill in all the corresponding id numbers from the other system.

              Then create a post operation with your table(s) as the master and this new table as the transaction, linked on your id number.
              Last edited by Stan Mathews; 01-25-2008, 10:41 AM.
              There can be only one.

              Comment


                #8
                Re: Search and Replace Numeric Data in Tables

                Jim,

                I think Stan's question is very important:
                That explains the situation, not how you will know what id number in your table gets replaced by what id number in the other system?
                Is there another unique identifier field(s)? Is this something that will have to be done one-at-a-time manually? Can you get the other system to download an electronic version of the ID in a csv,txt, or other friendly format? How many records are we talking about?
                Mike W
                __________________________
                "I rebel in at least small things to express to the world that I have not completely surrendered"

                Comment


                  #9
                  Re: Search and Replace Numeric Data in Tables

                  Thanks everyone - the task is now completed and working just fine

                  I used the post records operation and it went really smoothly

                  Where would people like me be if it was not for people on the forum?

                  Thanks again

                  Comment

                  Working...
                  X