473,498 Members | 1,744 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[SQL statment ]update table problem

Table's invinfo got a field markseqno whose default value is 0 and "not
allow null"
Now I want to put the count no in that table.
If there is no record in "invchg" table, I think It should put "zero" in
"markseqno" but not null
SQL analyzer warn me that there is null value put in that field , why ?

update invinfo set markseqno = (select count(invno) from invchg where invno
= invinfo.invno group by invno)

--
..
Nov 21 '05 #1
1 938
Sorry, I should post in another Newsgroup ~~

--
..
"Agnes" <ag***@dynamictech.com.hk> ¦b¶l¥ó
news:uf**************@TK2MSFTNGP10.phx.gbl ¤¤¼¶¼g...
Table's invinfo got a field markseqno whose default value is 0 and "not
allow null"
Now I want to put the count no in that table.
If there is no record in "invchg" table, I think It should put "zero" in
"markseqno" but not null
SQL analyzer warn me that there is null value put in that field , why ?

update invinfo set markseqno = (select count(invno) from invchg where invno = invinfo.invno group by invno)

--
.

Nov 21 '05 #2

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

Similar topics

2
31109
by: Rima | last post by:
I have the following two tables : table a (commit_id, capital_market_id, chg_lst_date ) table b (b_seq_id,
8
3262
by: Cherrish Vaidiyan | last post by:
hello googles, I have a small sqlplus problem. i have created a table with date field along with other varchar2,number etc. But unfortunately i made a mistake in entering the date. for some date...
7
2215
by: Philip Mette | last post by:
Does anyone have any good references they could recommend on Cursor based SQL writing? I have to create SQL that can loop though records simular to VB loops and I have been told that this is the...
10
2189
by: R Camarda | last post by:
I have the following statement that takes quite a long time. Longest of any of my SQL statment updates. UPDATE F_REGISTRATION_STD_SESSION SET PREVIOUS_YEAR_SESSION_ID = ( SELECT...
3
1711
by: EMW | last post by:
How can I put everything that is in a datagrid into a SQL server database (which should be readable by an PocketPC program)? There is probably a simple solution for it, but as always it is...
9
15699
by: Appel | last post by:
Hallo i have a problem to add to string with a SQL statement. My Table : Tablename NAMES: | Name1 | Name2 | Name3 | John Meyer I search for a SQL statment that update Name3.
4
1954
by: J Reed | last post by:
I am working on a project where I will be selecting an n'th number of records for 700 reps based on zip codes. My question is the below sql statement worked on an access table... sSQL =...
138
59063
by: Ian Boyd | last post by:
i've been thrown into a pit with DB2 and have to start writing things such as tables, indexes, stored procedures, triggers, etc. The online reference is only so helpful. The two pdf manuals are...
3
3401
by: TD | last post by:
I have an unbound form that adds and updates records to one table. I use an INSERT sql statment to add a new record and a UPDATE statement to update a record. I created a function named C2F to...
0
7125
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
7002
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
7165
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
7205
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...
1
6887
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
7379
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...
1
4910
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3093
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
291
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.