Results 1 to 4 of 4
  1. #1
    sandlucky is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Mar 2011
    Posts
    35

    Cool Display orginal text insted of Abrriviate using SQL queries in MS Access

    Hi all,

    I insert data in to my Plant database in Abbriviate format like,

    Habitat - column of MainCharacteristics-Table
    Shrub=SR
    Tree=TR
    Climber=CM

    Canopy Shape - column of MainCharacteristics-Table
    Round=R
    Oval=O
    Irregular=I


    When I do a select query to retrive plant information, I get only abbriviated info
    SELECT ID, Habitat, Canopy Shape FROM MainCharacteristics;

    Output;
    ID Habitat Canopy Shape
    01 TR R


    02 SR I
    03 SR O
    04 TR I

    But I need to get an output like this

    ID Habitat Canopy Shape
    01 Tree Round
    02 Shrub Irregular
    03 Shrub Oval
    04 Tree Irregular

    Can any1 suggest me the ri8 Query? Or Do i need to use VB to do this.
    I have over 40 columns with 100's of abbriviates. I need to display orginal words insted of abbriviates in my Query results. Thanxalot!

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    What exactly does this mean?
    Habitat - column of MainCharacteristics-Table
    Shrub=SR
    Tree=TR
    Climber=CM
    Where/How did the ID column get added?

    This query sql
    Code:
    SELECT ID, Habitat, Canopy Shape FROM MainCharacteristics;
    will not run as you have shown it. You have a space in the field/column name
    Canopy Shape.

    Please provide more detail if we are to help you.

  3. #3
    sandlucky is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Mar 2011
    Posts
    35
    Thanx 4 reply,

    Ok , it's unclear. Forget abt ID and Habitat column, just consider the Canopy Shape column,

    In column canopy shape if canopy shape of a perticular tree is Round, i enter it as R. for other shapes
    Oval=O
    Irregular=I
    Last edited by sandlucky; 03-23-2011 at 09:49 PM. Reason: Wrong spellings

  4. #4
    sandlucky is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Mar 2011
    Posts
    35
    Thank you very much for quick reply,

    In my database I insert data in Abbriviated format. In column canopy shape if canopy shape of a perticular tree is Round, i enter it as R. for other shapes
    Round=R
    Oval=O

    Irregular=I

    When I do, select queries I will retrive these abbriviates in my query results.

    Ex: SELECT canopy shape from MainCharacteristics

    will give a result/output like this;
    Canopy Shape
    R

    I
    O
    I

    But I need to get orginal names insted of Abbriviates like below;
    Canopy Shape
    Round

    Irregular
    Oval
    Irregular

    I need word "Round" appear every time "R" is present in the canopy shape column, also I for Irregular, O for Oval


    I think this can be done using switch , choose SQL functions , but dont know how to write the query. This is a simple SELECT query i think. Pls help,



Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 11-16-2010, 10:55 AM
  2. Replies: 6
    Last Post: 10-14-2010, 08:33 AM
  3. Display field as text box
    By thekruser in forum Forms
    Replies: 5
    Last Post: 08-31-2010, 10:37 AM
  4. Replies: 2
    Last Post: 10-09-2009, 07:34 AM
  5. Replies: 1
    Last Post: 03-02-2006, 06:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums