Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2006
    Posts
    13

    Unanswered: shorten long text query

    Hello everyone,

    im having a difficult time trying to shorten text in a field.

    I have a field called CompanyName and within that field i have hundrends of rows of companies with names over 200 characters easily, all i want to do is run a query that will only show me the first 10 characters and "hide" the rest of the name. seems easy but i still cant do it

    thanks in advance,

    John

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    it is easy.
    SELECT Left$([someField], 10) As Something FROM myTable

    ...but worry about the repercussions of
    'ALLIED INTERNATIONAL CHICKEN FEED INC'
    'ALLIED INTERNAL AUDITING PARTNERSHIP'

    izy
    currently using SS 2008R2

  3. #3
    Join Date
    Nov 2006
    Posts
    13
    ah yes, thank you very much izy


    btw, is there anything i can do about those repercussions.. this is the whole reason im doing this shorten-text query, so i can compare companies when i combined old database with new database..

    thanks again ..

    john

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    assuming that
    DELETE * FROM crapData;
    is not acceptable to your lords and masters, then you are stuffed.

    in an attempt to reduce the number of manual reviews you could
    --eliminate all perfect matches from your enquiries
    --play with duplicates from the left$() exercise
    --play with unmatched entries in old/new - both ways and maybe also with left$()
    (the query wizard thingie will talk you thru unmatched/dupes)

    there is no auto-solution to mangled data.

    izy
    currently using SS 2008R2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •