I did as advised but now because i have defined policyRef as an int, i am now getting the error message:
Cannot specify a column width on data type int. Parameter '@policyRef' has an invalid datatype.
Is there anyway around this ??
create procedure add_policy
@policyRef int (4),
@fileRef...
I'm new to sql and have the following stored procedure but when i check the syntax i keep getting the following error
Incorrect syntax near the keyword "begin".
Its probably something simple but i just can't see it.
create procedure add_policy
@policyRef int (4),
@fileRef nvarchar (50)...
Hi maswien,
i was wondering if you would be able to explain to me how to execute the procedure using asp.
I have done a search on the web but am still not sure, any help would be gratefully appreciated.
cheers dinivan
Hi Chris,
I suppose I should explain from the start what i'm trying to do.
I need to take the policyID from the main table and insert it into the policyID field in the sub table. I have achieved this by creating a trigger which is executed once info has been inserted into the main...
I hope someone will be able to help me with the problem I am having.
When the trigger i have attached to my main table is fired it is entering the policyID from the main table into the sub table but it is entering the information entered through the form into a separate row in the sub table...
Thanks SQLSister for all you help.
But I have one more problem I was hoping you would be able to help me with.
When the trigger is fired it is entering the policyID from the main table into the sub table but it is entering the information entered through the form into a separate row in the sub...
I have ammended the trigger below as suggested but I am now gettign the following error
Error 207:Invalid column name 'Field1')
what does field on refer to.
CREATE TRIGGER PolicyID ON [dbo].[tbl_policy_main_donna]
FOR INSERT, UPDATE, DELETE
AS
if @@rowcount = 0
return
Insert into...
Hi i have created this trigger but when i try to close it i get the following error
Error 213: Insert Error Column name or number of supplied values does not match table definition. Invalid column name 'Policy_ID'.
CREATE TRIGGER PolicyID ON [dbo].[tbl_policy_main_donna]
FOR INSERT, UPDATE...
Hi, I am new to sql databases and was wondering would anybody be able to help me with triggers.
I need to write a trigger which is fired when something is entered into the main table, it will then populate the sub table with the primary key from the main table.
Any help would greatly be...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.