I have read in a bunch of files and saved the filename in the table
along with the idnumbers and names.
Thing is they sent us some files that have to be changed now
figures LOL
in the table I have filename field and name field
no problem with an update if filename = "ABC.F" name ="BOB"
but I have 30 of these.
Can a query under criteria and update too.
can this be one on multible criteria and update statements.
if filename = "ABC.Z" name ="BOB"
if filename = "DEF.Z" name ="FRED"
not sure how
thanks for any help
Jerry 3 1468
Probably the quickest way to do this is to use the VBA switch()
function. For example:
UPDATE the_table SET the_table.name =
Switch([filename]="ABC.C","BO B",[filename]="DEF.Z","FRED" ,True,[filename]);
You may have other criteria you want to add as well but remember to
include the "True,[filename]" criterion at the end as in the example so
those filenames that don't meet any of your criteria are left
unchanged.
HTH,
Bruce
Probably the quickest way to do this is to use the VBA switch()
function. For example:
UPDATE the_table SET the_table.name =
Switch([filename]="ABC.C","BO B",[filename]="DEF.Z","FRED" ,True,[filename]);
You may have other criteria you want to add as well but remember to
include the "True,[filename]" criterion at the end as in the example so
those filenames that don't meet any of your criteria are left
unchanged.
HTH,
Bruce
that did it thanks big time
Jerry
On 27 Feb 2006 11:00:34 -0800, br***@aristotle .net wrote: Probably the quickest way to do this is to use the VBA switch() function. For example:
UPDATE the_table SET the_table.name = Switch([filename]="ABC.C","BO B",[filename]="DEF.Z","FRED" ,True,[filename]);
You may have other criteria you want to add as well but remember to include the "True,[filename]" criterion at the end as in the example so those filenames that don't meet any of your criteria are left unchanged.
HTH, Bruce This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: PG |
last post by:
When deleting a row from the database, that id is now missing.
So what I'm trying to do is update in a loop (maybe an sql loop if
there is one) of all of the id numbers - sort of like renaming them.
It did partly work because all the id's were set to 22. Thats because
there was 22 rows.
Here's the code I used:
$result = mysql_query ("SELECT * FROM counter");
for($counting = 1; $row = mysql_fetch_row ($result); ++$counting)
|
by: kalamos |
last post by:
This statement fails
update ded_temp a
set a.balance = (select sum(b.ln_amt)
from ded_temp b
where a.cust_no = b.cust_no
and a.ded_type_cd = b.ded_type_cd
and a.chk_no = b.chk_no
group by cust_no, ded_type_cd, chk_no)
|
by: typingcat |
last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so
on. I've tried many PHP IDEs today, but almost non of them supported
Unicode (UTF-8) file.
I've found that the only Unicode support IDEs are DreamWeaver 8 and
Zend PHP Studio.
DreamWeaver provides full support for Unicode. However, DreamWeaver is
a web editor rather than a PHP IDE. It only supports basic IntelliSense
(or code completion) and doesn't have anything...
|
by: GL |
last post by:
Hi,
Is there a way to add a field to an existing table using a query of
some sort (without needing to manually add a field to the table). I
know how to do it with a make table query, but I have a specific need
to only add a new field to a table if possible. Here's a simplified
example of what I'm trying to do:
I get a file with the following two fields:
First Name
|
by: Shapper |
last post by:
Hello,
I have created 3 functions to insert, update and delete an Access
database record. The Insert and the Delete code are working fine.
The update is not. I checked and my database has all the necessary
records in it when testing it. I get the error "No value given for one
or more required parameters." when I try to update the database.
Can you tell me what am I doing wrong?
| |
by: James |
last post by:
I have a VB windows forms application that accesses a Microsoft Access
database that has been secured using user-level security. The
application is being deployed using No-Touch deployment. The objective
in utilizing this new deployment method is to reduce the maintenance
overhead as well as making it easier for my users to setup and run the
application initially. I have VS 2002, Windows XP, Access XP(2000
format).
He is my problem....
|
by: Peter Hallett |
last post by:
I would like to set up a string array as a class member, or field, and then
populate this array by reading in from a text file, but I cannot find the
appropriate syntax. The getter and setter are very unhappy with the idea and
the compiler refuses to play ball with any of the attempts I have made to
build such a structure. There is no problem when using a single string but a
two dimensional array of strings appears to be a very different...
|
by: racquetballer |
last post by:
I need to to an update query that involves three tables: table Dealer
needs to be updated with data from table Personnel and table Title.
Dealer is joined to Personnel where Dealer.Dealer_Code =
Personnel.so_cd
Personnel is linked to Title by Personnel.name_id = Title.name_id
I need to update fields Principal_First_Name, Principal_Last_Name, and
Company_Email in Dealer from FirstName, LastName, and
InternetEmailAddr in Personnel where...
|
by: KevinADC |
last post by:
Note: You may skip to the end of the article if all you want is the perl code.
Introduction
Uploading files from a local computer to a remote web server has many useful purposes, the most obvious of which is the sharing of files. For example, you upload images to a server to share them with other people over the Internet. Perl comes ready equipped for uploading files via the CGI.pm module, which has long been a core module and allows users...
|
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...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |