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

replace one value with another in query result

I have inherited an MS Access 2003 database which is currently using multiple Yes/No fields to track specific categories of incidents. For example, the table currently has 9 separate category fields called Cat 1, Cat 2, Cat 3, .... Cat 9 that are Yes/No fields.

I want to replace these Yes/No fields with a more descriptive single field in order to more effectively manage the database.

For example, if a record currently has the CAT 1 field set to yes, I want to the new "Category" field to populate with "CAT 1 - Unauthorized Access". If the record has Cat 3 set to Yes, I want the "Category field to populate with "CAT 3 - Malware" etc.

Any assistance would be appreciated.
Jun 2 '15 #1
2 1591
ck9663
2,878 Expert 2GB
--- Sorry...I thought this was a SQL Server question...The following answer is what I would suggest if the back-end is MSSQL ---

Create a new columns for your need so you don't disturb other processes that access the existing columns then just do a simple update statement. Once you are sure that no one is accessing the existing columns you may rename the existing columns into something else and rename the new ones. You might need to change your existing SP, front-end, functions, etc as needed.

Or...you can just create a non-persistent calculated columns that directly use these existing columns to return whatever value you need. Not much storage required, no update needed, you keep all existing process and you can refer to the new columns for your new processes.

Good Luck!!!


~~ CK
Jun 2 '15 #2
Rabbit
12,516 Expert Mod 8TB
Your thread has been moved to the Access forum.

And what happens if multiple columns are set to yes?
Jun 2 '15 #3

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

Similar topics

2
by: Joe Gazda | last post by:
I'm a relative newbie to PHP, but have been able to put together some PHP code to generate a CSV/XLS file from a Query result. Now, I would like to include custom column names instead of the MySQL...
3
by: Jack | last post by:
Hi, I have a form when loaded, retrieves record from an access table. Among other fields there is a check box called FinalUpdate. This is tied to a field in Access of type Yes/No. The form...
5
by: Daniel Tan | last post by:
Are there anyway to copy rows of records from one query to another query and then hide the records in source query ? Pls advise. Thanks. Regards, Daniel
8
by: skinnybloke | last post by:
Hi - I am a newbie to Access & SQL and I would appreciate some help on this if at all possible. I have a query that contains the following code. SELECT DISTINCT Product. AS , Product. AS ; ...
3
by: milam | last post by:
Greetings, I would like to use a query result as a column name in another query, I can't seem to get this to work using Subqueries. Is there a good way to do this? Example: Table...
3
by: Gil D. | last post by:
Hello, I have a query with 2 sub queries. Each query returns one value. My query should sum these values and display the sum. For example: sub query 1 returns 5 sub query 2 returns 10 my...
7
by: Triple7 | last post by:
Hi there, basically what I am trying to do (without using code as I don’t know how to do that with a code) is to retrieve the previous 5 days & the next 5 days (date wise)against a query1 that...
30
by: Noob | last post by:
ftp://ukcassassin:winston@www.ukcassassin.pwp.blueyonder.co.uk/htdocs/Diary%20Form.bmp Hi all I will appologise in advance for my lack of knowledge of access and its working as i am quite new to...
3
by: robin1983 | last post by:
HI all, how are you ? i need help from you people. This time my problem is that i m running a query inside another query. But, the result that i got is something not exactly what i want. and one...
5
by: ndeeley | last post by:
Hi, This is driving me mad - can someone guide me in the right direction please? I am outputting the results of a query to a webpage - in this case drawings in a database. The user selects the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.