July 26, 2012 at 2:01 am
Hi,
Please find the below query
INSERT INTO tbl_employee (EmpNo,CompanyID,MngrID,DateOfFiled,DateOfClosed,DateOfCreation
,LastModified,Active,flag)
VALUES(
'2011-1508' ,89827,null,null,null,GETDATE(),GETDATE(),1,'C')
In the table, column 'Active' is of type int
I am not able to insert a value 1 to the table. But keeping the other values same, I am able to insert values for active. Eg:
INSERT INTO tbl_employee (EmpNo,CompanyID,MngrID,DateOfFiled,DateOfClosed,DateOfCreation
,LastModified,Active,flag)
VALUES(
'2011-1508' ,89827,null,null,null,GETDATE(),GETDATE(),2,'C')
Please let me know what will be the cause which is not allowing me to insert value 1?
Thanks
July 26, 2012 at 2:03 am
Could be a constraint on the table.
July 26, 2012 at 2:12 am
deepzzzz (7/26/2012)
Hi,Please find the below query
INSERT INTO tbl_employee (EmpNo,CompanyID,MngrID,DateOfFiled,DateOfClosed,DateOfCreation
,LastModified,Active,flag)
VALUES(
'2011-1508' ,89827,null,null,null,GETDATE(),GETDATE(),1,'C')
In the table, column 'Active' is of type int
I am not able to insert a value 1 to the table. But keeping the other values same, I am able to insert values for active. Eg:
INSERT INTO tbl_employee (EmpNo,CompanyID,MngrID,DateOfFiled,DateOfClosed,DateOfCreation
,LastModified,Active,flag)
VALUES(
'2011-1508' ,89827,null,null,null,GETDATE(),GETDATE(),2,'C')
Please let me know what will be the cause which is not allowing me to insert value 1?
What error message is generated when you attempt to enter 1 into [Active]?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
July 26, 2012 at 4:48 am
deepzzzz (7/26/2012)
Hi,Please find the below query
INSERT INTO tbl_employee (EmpNo,CompanyID,MngrID,DateOfFiled,DateOfClosed,DateOfCreation
,LastModified,Active,flag)
VALUES(
'2011-1508' ,89827,null,null,null,GETDATE(),GETDATE(),1,'C')
In the table, column 'Active' is of type int
I am not able to insert a value 1 to the table. But keeping the other values same, I am able to insert values for active. Eg:
INSERT INTO tbl_employee (EmpNo,CompanyID,MngrID,DateOfFiled,DateOfClosed,DateOfCreation
,LastModified,Active,flag)
VALUES(
'2011-1508' ,89827,null,null,null,GETDATE(),GETDATE(),2,'C')
Please let me know what will be the cause which is not allowing me to insert value 1?
Kindly post the table definition along with the error message that you are getting.
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
August 8, 2012 at 5:26 am
I got the answer. It is because am checking this condition for status in one of the triggers..
Thanks to All
Thanks
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply