Data type in Union query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • siech
    New Member
    • Oct 2007
    • 7

    Data type in Union query

    Hi,

    Helped by some genius programmers here on the forum I have used a UNION query to create a report that is ready to be exported to excel.

    The problem now is that I have a column "descriptio n" that uses a rich text data type so the information is stored in MYSQL with <div> tags etc..

    As I set this field to "memo" in the access table, the output is fine when represented in forms or even in queries, but now with the UNION query, all the divs are shown. Thus making it impossible to simply export it to excel.

    Questions:
    1. Can I define the data type in the Union query?
    2. OR, if this is not possible, how could I change the format when exporting to excel?


    Many thanks for all the help you could give me,

    siech
  • Jim Doherty
    Recognized Expert Contributor
    • Aug 2007
    • 897

    #2
    Originally posted by siech
    Hi,

    Helped by some genius programmers here on the forum I have used a UNION query to create a report that is ready to be exported to excel.

    The problem now is that I have a column "descriptio n" that uses a rich text data type so the information is stored in MYSQL with <div> tags etc..

    As I set this field to "memo" in the access table, the output is fine when represented in forms or even in queries, but now with the UNION query, all the divs are shown. Thus making it impossible to simply export it to excel.

    Questions:
    1. Can I define the data type in the Union query?
    2. OR, if this is not possible, how could I change the format when exporting to excel?


    Many thanks for all the help you could give me,

    siech
    You could add a column to your query for output purposes and reference your 'offending' column in a function to strip out replace HTML formatting thus returning only the text.

    You'd be defining what characters to replace and keep the characters you'd want to retain. When I say 'retain' this actually means the functional 'extra' column in your query could be used for output only whilst your actual data column remains unaffected. The 'data' column still keeps the html formatting stored in your database. (you simply don't show the data column in the output...take the tick off in query design basically)

    Have a look at this thread to give you an idea



    Jim :)

    Comment

    • siech
      New Member
      • Oct 2007
      • 7

      #3
      Originally posted by Jim Doherty
      You could add a column to your query for output purposes and reference your 'offending' column in a function to strip out replace HTML formatting thus returning only the text.

      You'd be defining what characters to replace and keep the characters you'd want to retain. When I say 'retain' this actually means the functional 'extra' column in your query could be used for output only whilst your actual data column remains unaffected. The 'data' column still keeps the html formatting stored in your database. (you simply don't show the data column in the output...take the tick off in query design basically)

      Have a look at this thread to give you an idea



      Jim :)
      Thanks for the info Jim. If it's so complicated I think I will just drop the rich text functionality :)

      siech

      Comment

      Working...