473,396 Members | 1,726 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,396 software developers and data experts.

How to run macro that removes xml tags from csv file

Why doesn't this query works when trying as OpenQuery in a macro:
UPDATE All_files_, filter1 SET All_files_.Field1 = Replace([All_files_].[Field1],[filter1].[Tag],"")
WHERE (((All_files_.Field1) Like "*" & [filter1].[Tag] & "*"));

The table All_files_ contains of a column Field1 which contains tags that I want to filtering/remove. I've defined all these and added them into a separate table filter1 and the column Tag.

The query works perfectly well when running it manually.
But when then trying to get it work through a macro, the query only success to remove some tags while others remains. The ones which the macro doesn't success to remove are: <> and </>

As mentioned, when running the query manually he removes these as well. So it's only when running the query through the macro it fails.

How to make the macro successfully execute the query through the macro and remove all the tags as I wish.
Feb 23 '14 #1
1 1126
I solved it. As is I just have to run the query twice.
Another method, and perhaps better (depending on) is to change the tags in the filter-table. I will try this other method as well. So, it seem like it was no wrong with the macro...rather the query/filter.
Feb 23 '14 #2

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

Similar topics

1
by: Daniel Lidström | last post by:
Hi, is there a good plugin or macro that creates new files from templates? I wish to have a predefined template for .h and .cpp files. -- Daniel
4
by: tmountjr | last post by:
I've got a user who's trying to export a text file with unicode formatting. When he exports it as straight ascii, some of the foreign characters (mostly just accent marks and the like - no...
8
by: David | last post by:
Hi, I am using header file for driver so Can I define macro to call Kernel function ? What are the generatl rules for defining macro. - David
0
by: Rich Wallace | last post by:
Hi all, I have a large number of Excel files on my file server that stores schedule data from several different divisions. They use embedded macros inside the worksheets that do some date...
1
by: smitap | last post by:
Hi , I have to print the name of the file and the function into a log file. I am using "writeToLog" function for that in all the files and all the functions in that file. Can anyone let me know...
7
by: aaragon | last post by:
Hi everyone, I have a simple question. I'm trying to make a macro in one file so I can use it in main.cpp. The idea is that I the user of my code has simple to type the macro definition to replace...
1
by: EugeneBennett | last post by:
Hi I have an application where I need to manipulate data in a Dbf file(File1), search a second file (File2) for a tagname and scale the value before populating a third file (File3) with the...
2
by: zswong | last post by:
Hi, I am new in Perl and need abit of help on the usage of file handler. I was trying to write a line into a file with file handler ID "oFile2_$macro", but it does NOT work with the following...
19
by: Tor Rustad | last post by:
I'm implementing a parser, where there is a lot of different data elements defined. Now instead of hand-coding X defines, and the massive number of lines needed for table initialization, I decided...
2
by: deve8ore | last post by:
Hello, I have built a macro to automatically go to a specific directory and a specific folder, however the names of the files I need to automatically locate change names every month. I.e. - I...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.