473,387 Members | 1,561 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Data type in Union query

7
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 "description" 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
Nov 3 '07 #1
2 3548
Jim Doherty
897 Expert 512MB
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 "description" 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

http://www.thescripts.com/forum/thread451486.html

Jim :)
Nov 3 '07 #2
siech
7
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

http://www.thescripts.com/forum/thread451486.html

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

siech
Nov 4 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Nomen Nescio | last post by:
can anyone be so kind as to look at http://www.mysolution.ws/HYPOCRITE.php and let me know why it isn't passing the form data to http://www.mysolution.ws/insertHYPOCRITES.php for the most...
2
by: News | last post by:
Folks, I need help with this task. I have a set of data that needs to be plotted on timeline chart. Example: Unit ProcStart ProcEnd Machine U1 5/5/03 6:01 5/5/03 6:04 M1 U2 ...
2
by: Chris Becker | last post by:
I have the following query: SELECT Month, Sum(Hits) AS Hits FROM tblHits GROUP BY Month ORDER BY Month Unfortunately it only returns rows for months that have data assigned to them. How...
2
by: Jeff Blee | last post by:
I am hoping someone can help me. I am making a Access 97 app for a person and have run up against a problem to do with MS Graph. There is a table that has a number of data elements and a date field...
0
by: s_gregory | last post by:
The mdb is considerable size 70 +- mb. A complex union query was working well, but when an additional union select... was added into the query, selecting identical fields from a different source,...
0
by: John Smith | last post by:
Hi I am getting the above error when I try to run the union query shown below select all as , as , as , as , ,, ,, , , as , as , as , as , as from
0
by: Jason | last post by:
I have a primary form which is used to enter/edit data in a table named Test_Results. On this primary form there is a subform which displays site addresses. This subform is linked to the primary...
1
by: Terencetrent | last post by:
I have created a query that examines qarterly sales for 5 regions in the country. The query contains data for the past 6 quarters for each region and calculates the perecentage of total sales for...
1
by: PATGMorris | last post by:
I've got a Union Query that pulls data from two different tables for chemistry and micro testing. The tables containing very similar data but for reasons not necessary here, cannot be put into one...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.