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

Space at the end of the field

Roy
I use a A2K application.When downloading froma source,my data appears
like this:
Problem Id Product(s)
16957 TickettingApplication;
22620 TicketingApplication;
13021 TicketingServices;
11470 TicketingServices;
16886 TicketingServices ;
16990 TicketingServices ;
16512 EDTSOrderAdaptercomponent ;
22633 TRADINGSERVICES ;

I need the data where there is no space between the text and the semi
colon.(the semi colon follows the text).How to identify the space after
the text and have the semi colon immediately after the text?
To summarize,i want the data like,TicketingApplication; and not as
TicketingApplication ;

Thanks,
Roy

Nov 13 '05 #1
11 1729
You could do this by running an update query on the table after importing
it, something like this:

UPDATE tblTest SET tblTest.Field1 = Left([Field1],Len([Field1])-2) & ';'
WHERE (((tblTest.Field1) Like '* ;'));

"Roy" <pr********@yahoo.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
I use a A2K application.When downloading froma source,my data appears
like this:
Problem Id Product(s)
16957 TickettingApplication;
22620 TicketingApplication;
13021 TicketingServices;
11470 TicketingServices;
16886 TicketingServices ;
16990 TicketingServices ;
16512 EDTSOrderAdaptercomponent ;
22633 TRADINGSERVICES ;

I need the data where there is no space between the text and the semi
colon.(the semi colon follows the text).How to identify the space after
the text and have the semi colon immediately after the text?
To summarize,i want the data like,TicketingApplication; and not as
TicketingApplication ;

Thanks,
Roy

Nov 13 '05 #2
Roy
Bruce,
It comes with a message saying 0 records updated.Meaning it
did not identify the space?

Thanks much,

Roy

Nov 13 '05 #3
Are you asking how to prevent this situation from happening? If so, we'd
need more details about where this data is coming from.
If you are wanting to know how to clean up the data, you could use the
replace() function in visual basic and do something like
replace(strThisData, " ;" , ";"), perhaps looping through the data with a
recordset.

hope that helps
-John

"Roy" <pr********@yahoo.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
I use a A2K application.When downloading froma source,my data appears
like this:
Problem Id Product(s)
16957 TickettingApplication;
22620 TicketingApplication;
13021 TicketingServices;
11470 TicketingServices;
16886 TicketingServices ;
16990 TicketingServices ;
16512 EDTSOrderAdaptercomponent ;
22633 TRADINGSERVICES ;

I need the data where there is no space between the text and the semi
colon.(the semi colon follows the text).How to identify the space after
the text and have the semi colon immediately after the text?
To summarize,i want the data like,TicketingApplication; and not as
TicketingApplication ;

Thanks,
Roy

Nov 13 '05 #4
Roy wrote:
I use a A2K application.When downloading froma source,my data appears
like this:
Problem Id Product(s)
16957 TickettingApplication;
22620 TicketingApplication;
13021 TicketingServices;
11470 TicketingServices;
16886 TicketingServices ;
16990 TicketingServices ;
16512 EDTSOrderAdaptercomponent ;
22633 TRADINGSERVICES ;

I need the data where there is no space between the text and the semi
colon.(the semi colon follows the text).How to identify the space after
the text and have the semi colon immediately after the text?
To summarize,i want the data like,TicketingApplication; and not as
TicketingApplication ;

Thanks,
Roy


Why not reverse the string and replace any spaces within the first two
or three characters with "" before reversing again? Air Code:
RevStr(Replace(Left(RevStr([Product(s)]), 3), " ", "") &
Right(RevStr([Product(s)], Len([Product(s)]) -
Len(Left(RevStr([Product(s)]), 3))))

If the Product(s) field can have a Null value you'll have to take care
of that also.

James A. Fortune

Nov 13 '05 #5
> It comes with a message saying 0 records updated.Meaning it
did not identify the space?


Sounds that way.

You could check by running a select query:

SELECT * FROM tblTest WHERE tblTest.Field1 LIKE '* ;'

See how many records that returns (filling in your own table/field names, of
course). If doesn't return any records, there's something else going on --
perhaps invisible characters? Or what looks like a space is a tab?

You could also try:

UPDATE tblTest SET tblTest.Field1 = Left([Field1],Len([Field1])-2) & ";"
WHERE (Right(tblTest.Field1,2) = " ;");

Nov 13 '05 #6
Roy
Looks like some invisible character.Tried all the solutions ,your's as
well as the other two,with no luck.

Thanks,

Roy

Nov 13 '05 #7
Roy
Looks like some invisible character.Tried all the solutions ,your's as
well as the other two,with no luck.

Thanks,

Roy

Nov 13 '05 #8
Roy wrote:
Looks like some invisible character.Tried all the solutions ,your's as
well as the other two,with no luck.

Thanks,

Roy


See:

http://groups-beta.google.com/group/...0f165ea?hl=en&

Perhaps this is what is happening.

James A. Fortune

Nov 13 '05 #9
Roy wrote:
Looks like some invisible character.Tried all the solutions ,your's as
well as the other two,with no luck.

Thanks,

Roy


See:

http://groups-beta.google.com/group/...0f165ea?hl=en&

Perhaps this is what is happening.

James A. Fortune

Nov 13 '05 #10
Roy
James,

That link worked like a charm!!!!Thanks a lot.you saved me lots of
time and labor.

Nov 13 '05 #11
Roy
James,

That link worked like a charm!!!!Thanks a lot.you saved me lots of
time and labor.

Nov 13 '05 #12

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

Similar topics

6
by: Grumble | last post by:
Hello all, I want to read lines from a text file, where each line has the following syntax: token1:token2:token3 There could be white space between tokens and ':'
5
by: Alan | last post by:
Hi, I'm getting as bit confused with my queries. I simply (!) want to insert a space into a postcode field the 4th character from the right, so, for example, ML201TQ becomes ML20 1TQ, which is...
2
by: Sound | last post by:
Enter space bar for field names and save the field.The field shoud not get saved and an alert should be there as"Space bars are not allowed" Add a field without giving any name and save the...
4
by: tcfin | last post by:
Hi, i have a problem to make a transtype from field XX varchar(20), example : 19 200 340,56 to field YY integer, required : 19200340
3
by: kvnsmnsn | last post by:
I've written the following Javascript file that includes an input text field and an output text field, the latter of which is initialized to zero. Each time the user enters a number in the input...
1
by: seahorse298 | last post by:
I am using MS Access 2000 on a Windows XP machine. I have a list form, listing the number of companies a business is dealing with. I have a filter field on the form which is used to filter the...
10
by: Phil Stanton | last post by:
I have a table of SpaceAreas eg Food Store, Garden Shed etc with the first and last bin for each Space Area defined. eg Food Store First Space 1, last space 26 and Gargen Shed First space 1, last...
4
by: visu | last post by:
I want to know following memory space related question. 1 . How can i get a Database Size by means of a SQL query? 2. How can i Get a field size (not allocated space) .. ie. i am storing...
8
by: dancer | last post by:
Using ASP.net 1.1 to create user input form. When I put a RequiredFieldValidator I have extra space at the bottom of the cell, as if I had put a <br>. When I comment out the...
2
by: progvar | last post by:
Hi i have not any idea how to remove white space in vb actualy i am accessing value from table some time the column is null and some time it contain space means user press space bar to remove data...
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: 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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.