473,385 Members | 1,372 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.

Update query not working and error msg is strange

I am trying to run an update query to take information in a field and remove
the last 4 chars. For example, the following piece of data: [CTF]DAA1.CTF,
should be converted to [CTF]DAA1 (without the ".CTF"). I have use the
"Update to" command:

"Left([test].[ticker],Len([test].[ticker]-4))

with criteria of Like "*.CTF"

I get a message saying Access cannot convert the data due to a type
conversion error. I am confused by this. The values are currently text and
stripping off the last 4 chars will not convert the data to another type.
So I have two questions,
1 - how do I fix this and
2 - why am I getting this strange error msg?
Thanks
Nov 12 '05 #1
2 1868
You have the Len close bracket in the wrong place.
should be :
Left([test].[ticker],Len([test].[ticker])-4)


"Colleyville Alan" <ae***********@nospam.comcast.net> wrote in message
news:R1zQb.112048$5V2.519194@attbi_s53...
I am trying to run an update query to take information in a field and remove the last 4 chars. For example, the following piece of data: [CTF]DAA1.CTF, should be converted to [CTF]DAA1 (without the ".CTF"). I have use the
"Update to" command:

"Left([test].[ticker],Len([test].[ticker]-4))

with criteria of Like "*.CTF"

I get a message saying Access cannot convert the data due to a type
conversion error. I am confused by this. The values are currently text and stripping off the last 4 chars will not convert the data to another type.
So I have two questions,
1 - how do I fix this and
2 - why am I getting this strange error msg?
Thanks

Nov 12 '05 #2

"Nigel tombs" <ic*****@tiscali.co.uk> wrote in message
news:40********@mk-nntp-2.news.uk.tiscali.com...
You have the Len close bracket in the wrong place.
should be :
Left([test].[ticker],Len([test].[ticker])-4)


Thanks, that works.
Nov 12 '05 #3

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

Similar topics

4
by: Surendra | last post by:
I have this query that I need to use in an Update statement to populate a field in the table by the value of Sq ---------------------------------------------------------------------------- Inline...
6
by: David Shorthouse | last post by:
Hello folks, I have a problem with an update query on an asp not updating the table in an Access db. The code runs, I have no errors, but when I examine the table, nothing was updated. The query...
17
by: kalamos | last post by:
This statement fails update ded_temp a set a.balance = (select sum(b.ln_amt) from ded_temp b where a.cust_no = b.cust_no and a.ded_type_cd = b.ded_type_cd and a.chk_no = b.chk_no group by...
7
by: aaron.kempf | last post by:
team so i have a nice little list in sharepoint.. about 15k items i've got the simplest little join statement in access; and im trying to UPDATE the sharepoint list via an access query. so...
3
by: Shapper | last post by:
Hello, I have created 3 functions to insert, update and delete an Access database record. The Insert and the Delete code are working fine. The update is not. I checked and my database has all...
3
by: Larry Woods | last post by:
I have a datagrid that is carrying all fields of a record...except one. Now I want to update the underlying database via a dataadapter. The update is working but the field that is "left out" is...
11
by: ZafT | last post by:
Hi all - thanks in advance for any help. I am trying to write a simple update script. In fact, I am re-using code that I've used before (successfully) but I can't figure out why it is not...
6
by: Nuzzi | last post by:
Hello All, I have two pages that are very similar. One is working, one is not. Here is the code for both: Page 1 (Working): protected void btn_update_Click(object sender, EventArgs e)...
8
by: Richard | last post by:
Hello! I have this piece of SQL code: UPDATE a SET Field1 = c.Field1 FROM a INNER JOIN b ON a.GUID1 = b.GUID1 INNER JOIN c ON b.GUID2 = c.GUID2 WHERE c.Type = 1
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...

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.