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

Moving the end of one field to another

Hello,

I have a table with 2 columns called catcode and prodcode and an example
would be like this:

catcode | prodcode

home-frag-cd | H-ACP1003
lighting-cd | H-AR1009
bed-candles-ys | H-BSC1005
What I need to do is take whatever comes after the last "-" in catcode and
add it and the "-" to the end of prodcode. So the result on the above
would be:

catcode | prodcode

home-frag-cd | H-ACP1003-cd
lighting-cd | H-AR1009-cd
bed-candles-ys | H-BSC1005-ys

If it helps, the last 3 characters of catcode are always the "-" plus the
suffix that needs to be moved.

How can I do this?

Thank you.
Nov 12 '05 #1
1 1305
Phil,
I'll take you at your word that the last 3 characters are always -XX.

You can make an update query to permanently add the last 3 characters of one
field to the other field.

Update YourTable Set YourTable.ProdCode = ProdCode & Right([CatCode],3);

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.
"Phil" <ph**@hoobermedia.com> wrote in message
news:0GQub.190152$9E1.1011826@attbi_s52...
Hello,

I have a table with 2 columns called catcode and prodcode and an example
would be like this:

catcode | prodcode

home-frag-cd | H-ACP1003
lighting-cd | H-AR1009
bed-candles-ys | H-BSC1005
What I need to do is take whatever comes after the last "-" in catcode and
add it and the "-" to the end of prodcode. So the result on the above
would be:

catcode | prodcode

home-frag-cd | H-ACP1003-cd
lighting-cd | H-AR1009-cd
bed-candles-ys | H-BSC1005-ys

If it helps, the last 3 characters of catcode are always the "-" plus the
suffix that needs to be moved.

How can I do this?

Thank you.

Nov 12 '05 #2

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

Similar topics

2
by: Wayne Aprato | last post by:
I've read most, if not all, of the posts on moving average and still can't find a simple solution to my problem (if a simple solution exists!) I have a table with 2 fields: Hours and Injuries. I...
1
by: Alienz | last post by:
I'm sure this is easy so if you have a sec pls help me out thx. Let say I have an inventory table and at the end of the month I want to move the info in 1 field (total end of month 1) into...
2
by: Ted | last post by:
Hello all. Its been a few years since I've been here. I hope everyone is well. I am working on a report that has several sub reports in the detail section. I have sized the sub reports to have...
6
by: Matt | last post by:
I'm not entirely sure how to describe this issue. I have a number of ComboBoxes in my application which have their text properties bound to a field in a data set. The items loaded in the ComboBox...
15
by: mcjason | last post by:
I saw something interesting about a grid pair puzzle problem that it looks like a machine when you find each that work out the way it does and say with all the others that work out the way they...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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
jinu1996
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...

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.