PC Review


Reply
Thread Tools Rate Thread

deleting leading apostophe in a column

 
 
Tom
Guest
Posts: n/a
 
      3rd Jan 2010
Is their a way to delete leading Apostophe on some records in the same column?
--
Tom
 
Reply With Quote
 
 
 
 
XPS350
Guest
Posts: n/a
 
      3rd Jan 2010
On 3 jan, 16:51, Tom <T...@discussions.microsoft.com> wrote:
> Is their a way to delete leading Apostophe on some records in the same column?
> --
> Tom


You can use an update query like this one:

UPDATE YourTable SET YourField = Mid([YourField],2)
WHERE Left([YourField],1="'";


Groeten,

Peter
http://access.xps350.com
 
Reply With Quote
 
XPS350
Guest
Posts: n/a
 
      3rd Jan 2010
On 3 jan, 16:51, Tom <T...@discussions.microsoft.com> wrote:
> Is their a way to delete leading Apostophe on some records in the same column?
> --
> Tom


Sorry, must be:

UPDATE YourTable SET YourField = Mid([YourField],2)
WHERE Left([YourField],1)="'";


Groeten,

Peter
http://access.xps350.com
 
Reply With Quote
 
Tom
Guest
Posts: n/a
 
      4th Jan 2010
I tried the second part of formula in a update query and it put zero in all
fields. Can you be a little more specific? What does or where is UPDATE
"YourTable SET"?
--
Tom


"XPS350" wrote:

> On 3 jan, 16:51, Tom <T...@discussions.microsoft.com> wrote:
> > Is their a way to delete leading Apostophe on some records in the same column?
> > --
> > Tom

>
> Sorry, must be:
>
> UPDATE YourTable SET YourField = Mid([YourField],2)
> WHERE Left([YourField],1)="'";
>
>
> Groeten,
>
> Peter
> http://access.xps350.com
> .
>

 
Reply With Quote
 
XPS350
Guest
Posts: n/a
 
      4th Jan 2010
On 4 jan, 19:19, Tom <T...@discussions.microsoft.com> wrote:
> I tried the second part of formula in a update query and it put zero in all
> fields. *Can you be a little more specific? *What does or where is UPDATE
> "YourTable SET"?
> --
> Tom
>
> "XPS350" wrote:
> > On 3 jan, 16:51, Tom <T...@discussions.microsoft.com> wrote:
> > > Is their a way to delete leading Apostophe on some records in the same column?
> > > --
> > > Tom

>
> > Sorry, must be:

>
> > UPDATE YourTable SET YourField = Mid([YourField],2)
> > WHERE Left([YourField],1)="'";

>
> > Groeten,

>
> > Peter
> >http://access.xps350.com
> > .


You make a new query and do not select a table. In desig mode change
the view of the query to "SQL" and enter the given code, replacing
YourTable/YourField with the correct names.

Groeten,

Peter
http://access.xps350.com
 
Reply With Quote
 
Tom
Guest
Posts: n/a
 
      4th Jan 2010
This is what I put in the SQL view query--My table name is 2009-1 and column
is Shipment ID #---The below will not work to only eliminate ' on some
records. You may think I know more than I do and I can not get it to work.
Sorry and thanks for your time

UPDATE 2009-1 SET Shipment ID # = Mid([Shipment ID #],2)
WHERE Left([Shipment ID #],1)="'";
--
Tom


"XPS350" wrote:

> On 4 jan, 19:19, Tom <T...@discussions.microsoft.com> wrote:
> > I tried the second part of formula in a update query and it put zero in all
> > fields. Can you be a little more specific? What does or where is UPDATE
> > "YourTable SET"?
> > --
> > Tom
> >
> > "XPS350" wrote:
> > > On 3 jan, 16:51, Tom <T...@discussions.microsoft.com> wrote:
> > > > Is their a way to delete leading Apostophe on some records in the same column?
> > > > --
> > > > Tom

> >
> > > Sorry, must be:

> >
> > > UPDATE YourTable SET YourField = Mid([YourField],2)
> > > WHERE Left([YourField],1)="'";

> >
> > > Groeten,

> >
> > > Peter
> > >http://access.xps350.com
> > > .

>
> You make a new query and do not select a table. In desig mode change
> the view of the query to "SQL" and enter the given code, replacing
> YourTable/YourField with the correct names.
>
> Groeten,
>
> Peter
> http://access.xps350.com
> .
>

 
Reply With Quote
 
Duane Hookom
Guest
Posts: n/a
 
      4th Jan 2010
You are paying the penalty for including spaces and symbols in table and
field names. In the future consider using a naming convention that doesn't
allow this. Try:

UPDATE [2009-1] SET [Shipment ID #] = Mid([Shipment ID #],2)
WHERE Left([Shipment ID #],1)="'";

--
Duane Hookom
Microsoft Access MVP


"Tom" wrote:

> This is what I put in the SQL view query--My table name is 2009-1 and column
> is Shipment ID #---The below will not work to only eliminate ' on some
> records. You may think I know more than I do and I can not get it to work.
> Sorry and thanks for your time
>
> UPDATE 2009-1 SET Shipment ID # = Mid([Shipment ID #],2)
> WHERE Left([Shipment ID #],1)="'";
> --
> Tom
>
>
> "XPS350" wrote:
>
> > On 4 jan, 19:19, Tom <T...@discussions.microsoft.com> wrote:
> > > I tried the second part of formula in a update query and it put zero in all
> > > fields. Can you be a little more specific? What does or where is UPDATE
> > > "YourTable SET"?
> > > --
> > > Tom
> > >
> > > "XPS350" wrote:
> > > > On 3 jan, 16:51, Tom <T...@discussions.microsoft.com> wrote:
> > > > > Is their a way to delete leading Apostophe on some records in the same column?
> > > > > --
> > > > > Tom
> > >
> > > > Sorry, must be:
> > >
> > > > UPDATE YourTable SET YourField = Mid([YourField],2)
> > > > WHERE Left([YourField],1)="'";
> > >
> > > > Groeten,
> > >
> > > > Peter
> > > >http://access.xps350.com
> > > > .

> >
> > You make a new query and do not select a table. In desig mode change
> > the view of the query to "SQL" and enter the given code, replacing
> > YourTable/YourField with the correct names.
> >
> > Groeten,
> >
> > Peter
> > http://access.xps350.com
> > .
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting leading spaces in a cell Dunc Fowler Microsoft Excel Misc 4 4th May 2007 08:19 AM
remove apostophe from numbers =?Utf-8?B?VG9t?= Microsoft Access Queries 4 4th Mar 2005 06:45 AM
deleting leading zeros =?Utf-8?B?SmVubg==?= Microsoft Excel Misc 2 17th Nov 2004 12:13 PM
Deleting Leading Characters intheway Microsoft Excel Misc 3 14th Oct 2004 07:38 PM
Errors caused by apostophe Ed Richter Microsoft Frontpage 1 14th Sep 2004 02:39 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:14 AM.