473,657 Members | 2,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Comparisons

JA
Hi,

Can someone tell me if this is possible? I have 2 fields in an Access 2000
db - one is the product name, the other is the product description. If the
product name is contained in the product description, I put bold tags around
it (<b> </b>). Would it be possible to do that with a query or some kind of
expression or something else? So that it could be done automatically. I have
to go through several 100 or 1000 new products per month!

Thanx!
Apr 20 '06 #1
4 1186
JA wrote:
Hi,

Can someone tell me if this is possible? I have 2 fields in an Access
2000 db - one is the product name, the other is the product
description. If the product name is contained in the product
description, I put bold tags around it (<b> </b>). Would it be
possible to do that with a query or some kind of expression or
something else? So that it could be done automatically. I have to go
through several 100 or 1000 new products per month!
Thanx!

Quick attempt tested on three entries with the ProductName appearing at the
beginning, middle, and end of the ProductDescript ion. The WHERE clause it just
to filter out rows where this has already been done before.

UPDATE Products
SET Products.Produc tDescription =
Mid([ProductDescript ion],1,InStr(1,[ProductDescript ion],[ProductName])-1) &
"<b>" &
Mid([ProductDescript ion],InStr(1,[ProductDescript ion],[ProductName]),Len([ProductName]))
& "</b>" &
Mid([ProductDescript ion],InStr(1,[ProductDescript ion],[ProductName])+Len([ProductName]))
WHERE (((Products.Pro ductDescription ) Not Like "*<b>*"));

(Please try first on a test copy of your table)

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Apr 20 '06 #2

Update Product Set ProductDesc = "<br>" & ProductDesc & "</br>" where
ProductID in (SELECT ProductID FROM Student where ProductID =
ProductDesc)

Apr 20 '06 #3
Check out the Instr function in the Help file. It will do what you want.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
Over 1175 users have come to me from the newsgroups requesting help
re******@pcdata sheet.com
"JA" <ja*****@kc.rr. com> wrote in message
news:pA******** *******@tornado .rdc-kc.rr.com...
Hi,

Can someone tell me if this is possible? I have 2 fields in an Access 2000
db - one is the product name, the other is the product description. If the
product name is contained in the product description, I put bold tags
around it (<b> </b>). Would it be possible to do that with a query or some
kind of expression or something else? So that it could be done
automatically. I have to go through several 100 or 1000 new products per
month!

Thanx!

Apr 20 '06 #4
"PC Datasheet" <fa***@email.co m> wrote in message
news:nd******** *********@newsr ead2.news.atl.e arthlink.net...
Check out the Instr function in the Help file. It will do what you want.


No. No it won't.

To anyone reading this thread:

It is commonly accepted that these newsgroups are for free
exchange of information. Please be aware that PC Datasheet
is a notorious job hunter. If you are considering doing
business with him then I suggest that you take a look at
the link below first.

http://home.tiscali.nl/arracom/whoissteve.html
Apr 20 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
1583
by: A.M. Kuchling | last post by:
python.org has a page of "Python vs. X" language comparisons at <http://www.python.org/doc/Comparisons.html>. They're all pretty outdated, and often unfair because they're written by a person who knows Python well but has only a nodding acquaintance with language X. I'm planning to drop this page from python.org because it's so outdated and no one is around to maintain it. If anyone wants to grab the contents and turn them into a Wiki...
0
1185
by: Mike Rovner | last post by:
Mike Rovner wrote: > A.M. Kuchling wrote: >> python.org has a page of "Python vs. X" language comparisons at >> <http://www.python.org/doc/Comparisons.html>. They're all pretty >> outdated, and often unfair because they're written by a person who >> knows Python well but has only a nodding acquaintance with language >> X. >> >> I'm planning to drop this page from python.org because it's so >> outdated and no one is around to maintain...
11
1508
by: Dietrich Epp | last post by:
Without invoking double-underscore black magic, it is possible to choose a, b, and c in Python such that: a < b b < c c < a This could cause sorting functions to malfunction. >>> class t(object):
5
3410
by: Pratyush | last post by:
Hi, Suppose there is a vector of objects of class A, i.e., std::vector<A> vec_A(N); The class A satisifies all the STL vector requirements. Now I wish to add some attributes for each of the objects in the vector vec_A. Suppose there are K attributes to be added. For each of the attributes I define K vectors of appropriate types. Say, the attributes have types type1, type2, ..., typeK. So I define std::vector<type1> attr1(vec_A.size());
3
4598
by: Kevin King | last post by:
I have a question about an assignment I have. I need to count the number of comparisons in my merge sort. I know that the function is roughly nlog(n), but I am definately coming up with too many comparisons. It seems to me like I should just use a single counter in the merge function's 'if' statement, but this can't be right because an array of 50 takes about 100 comparisons this way. If anyone has any suggestions I would greatly...
10
1560
by: Peter Ammon | last post by:
I'm fuzzy on exactly what I can depend on when doing floating point comparisons. I know that calculated values can differ, e.g. I'm not guaranteed that 1. + 2. == 3. What about comparisons with literals? float f=3.; int v = f==3.; is v guaranteed to be one? What about situations involving conversions
4
1533
by: Aamir Mahmood | last post by:
Hi I am on framework version 1.1 (SP1). Consider the following code. public static void Main() { int i=1; int j=1;
7
1394
by: Jim Michaels | last post by:
This is a simple coding tip I learned to prevent comparisons from becoming assignments (and this becoming a hair-pulling session during debugging): in comparisons, try to put your constants on the left hand side of the operator and variables on the right hand side. example if (3==$x) { //do something }
1
1815
by: Quimbly | last post by:
I'm having some problems comparing delegates. In all sample projects I create, I can't get the problem to occur, but there is definitely a problem with my production code. I can't give all the code, as there's simply too much, but here's the general gist: I have a connection object which connects to a custom back-end server of one type or another. Clients of this connection object send requests via a method (e.g....
2
1660
by: Nishad | last post by:
Is anybody know how to write xpath for string Value Comparisons thank you
0
8421
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8844
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8621
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7354
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6177
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5643
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2743
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1734
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.