473,401 Members | 2,127 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,401 software developers and data experts.

Update the existing amout by adding more

106 100+
Hi
I have a field JPAllowed of table tblSchools. I want to update the field such that the number of jobs user purchases are added to the jobs he purchase before.
I want to use query like this

Expand|Select|Wrap|Line Numbers
  1. cmd.executenonquery("Update tblSchools set JPAllowed = existing + new where empid=1")
  2.  
Help Please
Thanks to all
Sep 10 '08 #1
2 957
r035198x
13,262 8TB
I don't see the problem here. If I wanted to increase JPAllowed say by 6 then I would simply do
Expand|Select|Wrap|Line Numbers
  1. Update tblSchools set JPAllowed = JPAllowed + 6
You just need to repace the 6 there with whatever value you want to increment it by.

P.S This is more an SQL question than a .NET question?
Sep 10 '08 #2
Hamayun Khan
106 100+
I don't see the problem here. If I wanted to increase JPAllowed say by 6 then I would simply do
Expand|Select|Wrap|Line Numbers
  1. Update tblSchools set JPAllowed = JPAllowed + 6
You just need to repace the 6 there with whatever value you want to increment it by.

P.S This is more an SQL question than a .NET question?
Thanks for reply. I will check this and hope this will solve my problem.
Thanks once again.
Sep 11 '08 #3

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

Similar topics

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...
2
by: Richard Cornford | last post by:
Anyone who has taken a look at the online FAQ today may have noticed that I have updated it. The majority of the changes are the updating of broken links and the implementation of that extensive...
7
by: Andy Bates | last post by:
I have hopefully a simple problem in C#. I designed a form with a listview on left, vert splitter against that, then the remainder of the form from top to bottom: a listview, horiz splitter and...
4
by: CaptRR | last post by:
I think this is the right group to post to, so here goes. My problem is this, I cannot update the datarow to save my life. Been on this for 2 days now, and still am no closer to figuring it out...
3
by: DraguVaso | last post by:
Hi, I have to update Some records in a DataSet, I now use this functions: Dim NewDataRow As DataRow 'dtsXmldFormSettings = the DataSet NewDataRow =...
7
by: Matt Silberstein | last post by:
I have a data intensive web app I am developing. The core of the app will do a db query and build a page. I plan on getting the data as xml and feeding that and a xslt stylesheet to the browser....
13
by: dennis | last post by:
Hello, I'm having trouble solving the following problem with DB2 UDB 8.2. I need to create a trigger that performs certain extra constraint validations (temporal uniqueness). One of the tables...
3
by: Hao | last post by:
I have an existing ASMX web service produced WSDL. I am trying to upgrade the ASMX to WCF. The client side applications are already deployed on customers sites. We are definitely not able to change...
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: 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
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.