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

Move from one table to another one value is wrong

After parsing i move the values form tblcustomer to tblRequest. There
are too many spaces in all the field of tblcustomer

but they all move good accept field Account number. Below is the query
which i use to move values but it still give me last

4 digit from tblcustomers.
tblcustomers
AccountNum Text 100
Value: 07836-105575-02
Input Mask: CCCCCC\-CC

tblRequest
AcctCustNum Text 15
Value: 75-02

INSERT INTO tblRequest ( AcctCustNum, CableDataDate, CreditRequested,
ZipCode, CorpNum, BoxType, Comments, CustFName,

CustLName, NewRequest, BoxQty, ReturnMethod, DateLoaded, ConverterNum,
RequestRecd, RequestRecdDtl, RequestDate,

RequestStatus, ErrorType, RequestType, SenderInitials, SenderCorp,
CableDataID )
SELECT Right(Trim([AccountNum]),9) AS AccountNo,
tblCustomers.ReturnDate, tblCustomers.CreditAmount,

Right(Trim([CityStateZip]),Len(Trim([CityStateZip]))-InStr(1,[CityStateZip],",
")) AS Zip, Left([AccountNum],5) AS Corp,

tblCustomers.BoxType, tblCustomers.Comments,
Left([Name],InStr(1,[Name]," ")-1) AS Expr,

Right(Trim([Name]),Len(Trim([Name]))-InStr(1,[Name]," ")) AS Expr2,
"Yes" AS NewWork, tblCustomers.BoxQty,

tblCustomers.ReturnMethod, tblCustomers.ImportDate,
tblCustomers.ConverterNumbers, "E Mail" AS RecdHow, "KDB" AS

RecdDetail, Left([RequestDate],10) AS ReqDate, "Open" AS ReqStat,
"Open" AS ErrTyp, tblCustomers.Subject,

Left([Sender],InStr(1,[Sender]," (")-1) AS SenderInits,
Right([Sender],4) AS SenderCorp, Left((Right([Sender],8)),3) AS

CDID
FROM tblCustomers;

Aug 13 '06 #1
1 1088

Eric wrote:
After parsing i move the values form tblcustomer to tblRequest. There
are too many spaces in all the field of tblcustomer
Okay, now how large is the field in tblCustomer that's causing the
error?
or are you getting something like this " some value " instead of
"some value"?
If that's the case, just wrap the expression in a Trim() statement,
e.g.

SELECT Trim([MyField]) AS TrimmedField
FROM MyTable;

Aug 13 '06 #2

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

Similar topics

2
by: Paolo | last post by:
Friends, I have created a form named FRMNEWCLIENTS whose record source is a table named NEWCLIENTS. This table has a field named FILENUMBER. I have added on the form a combobox using the third...
7
by: tshad | last post by:
Is there a way to move a row in a Datalist up or down without having to re-read the data? I have a datalist which has embedded Datagrids in it. I want to allow the user to move a row up or down...
5
by: Tim | last post by:
Hi, I am trying to move a datacolumn in a datatable. What I have tried so far is to create a new datacolumn set it equal to the one I want to remove and then remove it, add another column and...
10
by: Robert | last post by:
I have an app that was originally 1.1, now migrated to 2.0 and have run into some sporadic viewstate errors...usually saying the viewstate is invalid, eventvalidation failed or mac error. My web...
9
by: Joshua.Buss | last post by:
I am trying to move a record from one linked table to another within access, but I'm a complete beginner to VBA and don't know exactly where to begin. I have an access file that has the two...
3
by: Eric | last post by:
When i run my query it transfer last 4 digits of account number from one table to another and its wrong. There are two tables one i use for parsing. Second thru query i use to move data from temp...
7
by: | last post by:
I have what's probably a simple page lifecycle question related to dynamically evaluating values that are placed by a repeater and dynmically placing user controls that use those values. I'm...
139
by: ravi | last post by:
Hi can anybody tell me that which ds will be best suited to implement a hash table in C/C++ thanx. in advanced
8
by: jmarcrum | last post by:
I have a table with about 100 records. The user has the ability to click a button on the main form that will open up a "move to the next year" form. A query displays all 100 records on the...
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
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
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.