473,472 Members | 2,155 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

anyone know how to remove a character in one column..?

this is a question for someone smarter than me:

how would i go about removing just the first character in a column?

i.e: if i wanted to remove the 'A' in the ItemSKU column

ItemID ItemSKU ItemName
1 A09807969 Red T-Shirt
2 A09807970 Green T-Shirt
3 A09807975 Blue Skirt
4 A09807935 Grey Skivy
5 A09804567 Red Cap
6 A09803866 Blue Y-Fronts

--
Regards,

Carmoda
iamcarmoda[remove-spam]@hotmail.com
====================================



Jul 19 '05 #1
8 6248
Hey,

using php function http://ru.php.net/manual/nl/function.substr.php
try substr("A09807969",1)
that's it

Dima

"carmoda" <ia********@hotmail.com> wrote in message
news:3f***********************@news.optusnet.com.a u...
this is a question for someone smarter than me:

how would i go about removing just the first character in a column?

i.e: if i wanted to remove the 'A' in the ItemSKU column

ItemID ItemSKU ItemName
1 A09807969 Red T-Shirt
2 A09807970 Green T-Shirt
3 A09807975 Blue Skirt
4 A09807935 Grey Skivy
5 A09804567 Red Cap
6 A09803866 Blue Y-Fronts

--
Regards,

Carmoda
iamcarmoda[remove-spam]@hotmail.com
====================================




Jul 19 '05 #2
Hey,

using php function http://ru.php.net/manual/nl/function.substr.php
try substr("A09807969",1)
that's it

Dima

"carmoda" <ia********@hotmail.com> wrote in message
news:3f***********************@news.optusnet.com.a u...
this is a question for someone smarter than me:

how would i go about removing just the first character in a column?

i.e: if i wanted to remove the 'A' in the ItemSKU column

ItemID ItemSKU ItemName
1 A09807969 Red T-Shirt
2 A09807970 Green T-Shirt
3 A09807975 Blue Skirt
4 A09807935 Grey Skivy
5 A09804567 Red Cap
6 A09803866 Blue Y-Fronts

--
Regards,

Carmoda
iamcarmoda[remove-spam]@hotmail.com
====================================




Jul 19 '05 #3
Actually, I want to remove it from all entries in a column in the the target
database permanently. [in a query or script of some kind].
"Dmitry Ruban" <di**@region35.ru> wrote in message
news:bk***********@gavrilo.mtu.ru...
Hey,

using php function http://ru.php.net/manual/nl/function.substr.php
try substr("A09807969",1)
that's it

Dima

"carmoda" <ia********@hotmail.com> wrote in message
news:3f***********************@news.optusnet.com.a u...
this is a question for someone smarter than me:

how would i go about removing just the first character in a column?

i.e: if i wanted to remove the 'A' in the ItemSKU column

ItemID ItemSKU ItemName
1 A09807969 Red T-Shirt
2 A09807970 Green T-Shirt
3 A09807975 Blue Skirt
4 A09807935 Grey Skivy
5 A09804567 Red Cap
6 A09803866 Blue Y-Fronts

--
Regards,

Carmoda
iamcarmoda[remove-spam]@hotmail.com
====================================





Jul 19 '05 #4
Actually, I want to remove it from all entries in a column in the the target
database permanently. [in a query or script of some kind].
"Dmitry Ruban" <di**@region35.ru> wrote in message
news:bk***********@gavrilo.mtu.ru...
Hey,

using php function http://ru.php.net/manual/nl/function.substr.php
try substr("A09807969",1)
that's it

Dima

"carmoda" <ia********@hotmail.com> wrote in message
news:3f***********************@news.optusnet.com.a u...
this is a question for someone smarter than me:

how would i go about removing just the first character in a column?

i.e: if i wanted to remove the 'A' in the ItemSKU column

ItemID ItemSKU ItemName
1 A09807969 Red T-Shirt
2 A09807970 Green T-Shirt
3 A09807975 Blue Skirt
4 A09807935 Grey Skivy
5 A09804567 Red Cap
6 A09803866 Blue Y-Fronts

--
Regards,

Carmoda
iamcarmoda[remove-spam]@hotmail.com
====================================





Jul 19 '05 #5
OK, how about:

<?php
mysql_connect(host,user,pass);
mysql_select_db(db);
$query = "SELECT ItemID, ItemSKU, ItemName FROM tbl";
$result = mysql_query($query);
while($row = mysql_fetch_array($result,MYSQL_ASSOC)) {
$ItemID = $row["ItemID"];
$ItemSKU = $row["ItemSKU"];
$ItemName = $row["ItemName"];
$NewItemSKU = str_replace("A","",$ItemName);
echo "<table>";
echo "<tr>";
echo "<td>$ItemID</td>";
echo "<td>$ItemSKU</td>";
echo "<td>$ItemName</td>";
echo "</tr>";
echo "</table>";
}
?>

Probably not the most accurate way of dealing with this but for the letter
A, it works. Hope this helps.

"carmoda" <ia********@hotmail.com> wrote in message
news:3f***********************@news.optusnet.com.a u...
Actually, I want to remove it from all entries in a column in the the target database permanently. [in a query or script of some kind].
"Dmitry Ruban" <di**@region35.ru> wrote in message
news:bk***********@gavrilo.mtu.ru...
Hey,

using php function http://ru.php.net/manual/nl/function.substr.php
try substr("A09807969",1)
that's it

Dima

"carmoda" <ia********@hotmail.com> wrote in message
news:3f***********************@news.optusnet.com.a u...
this is a question for someone smarter than me:

how would i go about removing just the first character in a column?

i.e: if i wanted to remove the 'A' in the ItemSKU column

ItemID ItemSKU ItemName
1 A09807969 Red T-Shirt
2 A09807970 Green T-Shirt
3 A09807975 Blue Skirt
4 A09807935 Grey Skivy
5 A09804567 Red Cap
6 A09803866 Blue Y-Fronts

--
Regards,

Carmoda
iamcarmoda[remove-spam]@hotmail.com
====================================






Jul 19 '05 #6
OK, how about:

<?php
mysql_connect(host,user,pass);
mysql_select_db(db);
$query = "SELECT ItemID, ItemSKU, ItemName FROM tbl";
$result = mysql_query($query);
while($row = mysql_fetch_array($result,MYSQL_ASSOC)) {
$ItemID = $row["ItemID"];
$ItemSKU = $row["ItemSKU"];
$ItemName = $row["ItemName"];
$NewItemSKU = str_replace("A","",$ItemName);
echo "<table>";
echo "<tr>";
echo "<td>$ItemID</td>";
echo "<td>$ItemSKU</td>";
echo "<td>$ItemName</td>";
echo "</tr>";
echo "</table>";
}
?>

Probably not the most accurate way of dealing with this but for the letter
A, it works. Hope this helps.

"carmoda" <ia********@hotmail.com> wrote in message
news:3f***********************@news.optusnet.com.a u...
Actually, I want to remove it from all entries in a column in the the target database permanently. [in a query or script of some kind].
"Dmitry Ruban" <di**@region35.ru> wrote in message
news:bk***********@gavrilo.mtu.ru...
Hey,

using php function http://ru.php.net/manual/nl/function.substr.php
try substr("A09807969",1)
that's it

Dima

"carmoda" <ia********@hotmail.com> wrote in message
news:3f***********************@news.optusnet.com.a u...
this is a question for someone smarter than me:

how would i go about removing just the first character in a column?

i.e: if i wanted to remove the 'A' in the ItemSKU column

ItemID ItemSKU ItemName
1 A09807969 Red T-Shirt
2 A09807970 Green T-Shirt
3 A09807975 Blue Skirt
4 A09807935 Grey Skivy
5 A09804567 Red Cap
6 A09803866 Blue Y-Fronts

--
Regards,

Carmoda
iamcarmoda[remove-spam]@hotmail.com
====================================






Jul 19 '05 #7
On Thu, 25 Sep 2003 17:59:40 +1000, "carmoda" <ia********@hotmail.com> wrote:
this is a question for someone smarter than me:

how would i go about removing just the first character in a column?

i.e: if i wanted to remove the 'A' in the ItemSKU column

ItemID ItemSKU ItemName
1 A09807969 Red T-Shirt
2 A09807970 Green T-Shirt
3 A09807975 Blue Skirt
4 A09807935 Grey Skivy
5 A09804567 Red Cap
6 A09803866 Blue Y-Fronts


UPDATE whatevertable
SET ItemSKU = SUBSTRING(ItemSKU, 2)

--
Andy Hassall (an**@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)
Jul 19 '05 #8
On Thu, 25 Sep 2003 17:59:40 +1000, "carmoda" <ia********@hotmail.com> wrote:
this is a question for someone smarter than me:

how would i go about removing just the first character in a column?

i.e: if i wanted to remove the 'A' in the ItemSKU column

ItemID ItemSKU ItemName
1 A09807969 Red T-Shirt
2 A09807970 Green T-Shirt
3 A09807975 Blue Skirt
4 A09807935 Grey Skivy
5 A09804567 Red Cap
6 A09803866 Blue Y-Fronts


UPDATE whatevertable
SET ItemSKU = SUBSTRING(ItemSKU, 2)

--
Andy Hassall (an**@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)
Jul 19 '05 #9

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

Similar topics

0
by: carmoda | last post by:
this is a question for someone smarter than me: how would i go about removing just the first character in a column? i.e: if i wanted to remove the 'A' in the ItemSKU column ItemID ItemSKU ...
5
by: Lucky | last post by:
OK, spent 5 days searching for info on this one. Seems like it would be pretty common. Here's the deal: I have a vb.net windows app that connects to an access database. I'm using an...
4
by: Raquel | last post by:
Could someone explain to me what the reason is for having a character delimiter (which is double quotes by default) for performing Loads/Imports on UDB? I would think that column delimiter along...
1
by: ssubbarayan | last post by:
Gurus, One of my friend mailed me this sample piece of code: #include <stdio.h> main() { int a,b,c; int count = 1; for (b=c=10;a="- FIGURE?, UMKC,XYZHello Folks,\ TFy!QJu ROo TNn(ROo)SLq SLq...
1
by: TaeHo Yoo | last post by:
I have a table that has more than 1 milion rows so practically it is impossible to remove all duplicate rows by hand. Could you help me to remove those duplicate rows at all? This table doesn't...
10
by: Extremest | last post by:
I know there are ways to make this a lot faster. Any newsreader does this in seconds. I don't know how they do it and I am very new to c#. If anyone knows a faster way please let me know. All...
4
by: thiago_bagua | last post by:
Hi all, I have a csv file exported from excel. On cells where there was a comma in the text, it wraps the character with double quotes. For example: Column 1,"column two, and some more...
15
by: Pucca | last post by:
I'm getting an error when I tried to use this BerConverter class in my C# code. Even though the Interent doc says that it runs on Win2000 sp4, I just thgouth I'll double check. Does anyone know...
4
by: feucos | last post by:
Hi all, I am new to these so plz never mind if this is funny. here is my problem : Table : moody Column : Title
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
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,...
1
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...
0
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,...
1
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...
0
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...
0
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...
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.