By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,255 Members | 2,773 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,255 IT Pros & Developers. It's quick & easy.

Move from one table to another one value is wrong

P: n/a
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.
AccountNum Text 100
Value: 07836-105575-02
Input Mask: CCCCCC\-CC

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,

")) 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

FROM tblCustomers;

Aug 13 '06 #1
Share this Question
Share on Google+
1 Reply

P: n/a

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
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,

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

Aug 13 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.