i want to combine two fields and have used the the following query - UPDATE SudentInfo SET
-
image1name = CONCAT(imagepath,UserName,'1');
this works but the thing is when a new record is added the query is not applied and i have to manually execute the query again.
Is there a way to automate this so that the query is applied to all subsequent records?
Cheers
5 2036 Atli 5,058
Recognized Expert Expert
Hi.
Why do you want to duplicate your data like that?
It would make much more sense to combine the fields when the data is read, rather then storing duplicates of data that already exists.
However, if you want to do it this way, you could look into Triggers.
Ya, u can use trigers for updating columns or the other way is to concatenate columns while fetching records.
I needed to combine two fields into one, so i executed this query
UPDATE Students SET
image1 = CONCAT(imagepat h, image1name);
This worked, but the problem is that whenever a new record is added i have to manually re-enter and execute the query, is there any way to achieve the same outcome (image1 = imagepath+image 1name) for all subsequent records that would be entered, without me having to do it manually?
ak1dnar 1,584
Recognized Expert Top Contributor
are you using this query in a application or how you going to get those two values to that query? is it a user input? be more specific with your question.
Atli 5,058
Recognized Expert Expert
lmeeson.
Do NOT double post your questions!
This only serves to cause confusion and is highly disrespectful of those of us that have taken the time to answer your first post.
Please read and follow the Posting Guidelines when posting in these forums, or risk getting your account banned.
I have merged your new thread into this one.
If the answers we provided do not work for you, explain why and we may be able to provide alternate solutions.
Also, please use [code] tags when posting code examples.
This makes them easier to read and thus, makes it easier for us to help you.
Thank you Moderator Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Ilan |
last post by:
Hi all
I need to add data from two Excel sheets (both on the same workbook)
to an existing table in my SQL DB.
The problem is that each sheet holds different fields for the same
record, though the records are sorted by row numbers.
(I had to split the fields to different sheets because Excel has a
limit of 256 fields in each sheet)
My sheets are quite large (~55,000 rows and 200 columns each) and I'll
have to repeat this action many...
|
by: Kristian |
last post by:
Hey,
I have some problems combining 2 fields in a query.
For example: the first field is "1050-04" and the second field is
"02".
However, when i try to combine these two the zero in the second field
disappears. So it reads "1050-042" but i want it to be "1050-0402".
The number 02 increases, so when it reaches 10+ it should be like
"1050-0410".
|
by: M.Stanley |
last post by:
Hi,
I'm attempting to create a query that will combine 2 columns of
numbers into one. The followng comes from 1 table with 4 fields
(A,B,C,D)
A B RESULT
700 000 700000
700 001 700001
700 002 700002
..
|
by: Scott |
last post by:
This is probably something really easy, Well I hope anyhow.
I have three fields used for barcoding, in one table F1, F2 and F3. I want
the three fields to be able to be combined to complete an EAN13 barcode.
(F1=2 digits, F2 and F3 = 5 digits each. Totaling 12 digits. EAN13 assigns
the 13th digit)
From there, I need to then be able to scan that barcode into a single field
and have the first two digits be sent to F1 and the next 5 to F2...
|
by: Omey Samaroo |
last post by:
Dear Access Gurus,
Can anyone provide me with some much needed assistance.
I would like to combine the contents of 3 text fields into one field. Can
someone provide some code or a method to do so.
Please and Thanks
Omey
| |
by: Will |
last post by:
I have a table, tblManinstructions with fields Code & InstructionID, one
Code can have many InstructionID. I also have tblinstructions (fields
instructionID & instruction). What I want to do is create a table with the
fields Code and Instruction - a combination of all instructions from the
instruction IDs in tblManinstructions). E.g. Code 1234 currently has 4
fields in tblManinstructions, instructionIDs 28, 43 & 76. The new table I...
|
by: justin tyme |
last post by:
Hello Experts!
I would like to combine (which may not be the correct technical term) two
text fields from the same table in a query. Specifically, text field A and
text field B are both lists of names. My goal is to have one long list of
all the names, not A next to B like one gets when you use the & operator.
The eventual goal is to be able to print labels of all the individuals. I
have no problem creating a label-Report from the Query....
|
by: rpeacock |
last post by:
I have a function that takes a field with values separated by commas within the field and splits them to multiple rows.
Example:
Field - Interior
Value - abc,def,efg,ghi
Output:
ID Item
1 abc
2 def
|
by: H |
last post by:
Hi,
I have the following address fields in a table:
flat_number
house_name_or_number
street
village
postal_town
county
postcode
|
by: Ken Fine |
last post by:
This is a question that someone familiar with ASP.NET and ADO.NET DataSets
and DataTables should be able to answer fairly easily. The basic question is
how I can efficiently match data from one dataset to data in a second
dataset, using a common key. I will first describe the problem in words and
then I will show my code, which has most of the solution done already.
I have built an ASP.NET that queries an Index Server and returns a...
|
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: 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: 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...
|
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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.
|
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...
| |