Insert not inserting the correct value

onaled777 used Ask the Experts™
I have a working knowledge of SQL Server, but I am not an expert.  I wonder if you could give me reasons for a strange observed behavior.

I do a simple insert on a table as shown in the codebase below.  Notice the Archived is to be set to one. When I run the query however, and then do a select to see the result, the Archived is set to 0 in the database.

What are some possbile reasons for this?
						, pgstatusid
						, websiteid
						, description
						, url
						, landingpgflag
						, formsubmissionflag
						, luby
						, lu
						, disabled_ind
						, Archived
						, 5
						, 18
						, 'Description'
						, 'PageName'
						, 1
						, 1
						, 'Team'
						, GetDate()
						, 0
						, 1

Open in new window

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I don't see anything wrong in your INSERT statement. somebody might have update the value or/else you might have trigger which is changing the value.


Thanks RiteshShah


I am pretty sure no one modified, since I am the only one working in this database at the moment, but is a trigger the only thing that could trigger it?  Could there be a configuration on the table, or a constraint that could be set that only allows a certain value? Just asking, I will award the points regardless.
you can see whether any trigger defined on that table or not with the help of following link from my blog.

all the dependent object of the table you will get from the two ways defined on above link

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial