473,387 Members | 1,700 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.

sql update to a substring

Can I use SQL (in an AS400 environment) to update a substring of a field?

In this example, the update to the substring is conditional.

Follows is the SQL syntax I used and the error message I received:


update a04bsydtaa/bsyglgp set substr (lggl#,5,4) = '0010' where lghsp# = 999


Token ( was not valid. Valid tokens: =.
Jul 26 '07 #1
1 8586
mwasif
802 Expert 512MB
Moved the thread to relevant forum.
Jul 26 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: sqlgoogle | last post by:
Hi I'm trying to update a db based on the select statement which has ORDER BY in it. And due to that I'm getting error which states that Server: Msg 1033, Level 15, State 1, Line 13 The ORDER...
3
by: Munno | last post by:
Hi All, I am not so proficient in SQL and seek your help. I have a column by the name of Mask in a table, which has text eg. (YYYYYYYNNNNYYYYYYYYYNNYYYY). I wanted to update one particular...
1
by: db55 | last post by:
This script doesn't work. Why? UPDATE SET = LTRIM(SUBSTRING(, 1, convert(bigint, CHARINDEX(',', Comments)-1))) WHERE NOT( IS NULL) AND LEN() > 8 Basically, I'm trying to...
2
by: Al Willis | last post by:
Hello, I've written an insert trigger to fill in data on 5 columns based on the key field column after a record is added to a table. The trigger works fine. But what I also want to do is to...
1
by: Brad Isaacs | last post by:
Using ASP.NET 2.0 with SQL Server 2000 Inside my dropdown list box I am using an SQL DataSource to select the following data SELECT RTRIM(c.Name_First) + ' ' + RTRIM(c.Name_Last) AS Contact,...
1
by: Dmitri | last post by:
Hi! I have a stored procedure that takes 22 minutes to run in one environment, that only takes 1 sec or so to run in another environment. Here is the exact situation: Database 1 on Server 1...
7
by: jknaty | last post by:
I'm trying to create a function that splits up a column by spaces, and I thought creating a function that finds the spaces with CHARINDEX and then SUBSTRING on those values would an approach. I...
0
by: mwenz | last post by:
I am trying to update an Access table using OLEDB in VB.Net 2005. I can add rows but I cannot update them. Code to instantiate the Access database and table... Dim conn As New...
0
by: GEETHA LAKSHMI | last post by:
I want to use where conditions in both update and select query cmd1.CommandText = "Update AttRegister set Present= (Select count(Working) from Attendance where Attendance.Working='P' and...
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:
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
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?
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...
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...

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.