Viewing 15 posts - 31 through 45 (of 345 total)
We know from your other post that tblTransactions.Transaction_Number is an IDENTITY field. You are attempting to insert an Transaction_Number back into the IDENTITY field that was just created. It doesn't...
December 6, 2012 at 6:51 am
briancampbellmcad (12/5/2012)
December 5, 2012 at 1:58 pm
I'm thinking now that tblTransactions.@@IDENTITY should actually be tblTransactions.OriginalTransactionNumber?
You can't have @@IDENTITY in the insert list and you also can't insert into Transaction_Number since it's an IDENTITY. (For the...
December 5, 2012 at 12:33 pm
What is the logic in inserting a new record into tblTransactions when a record in tblTransactions is updated? Shouldn't this be logged to a different table?
December 5, 2012 at 12:20 pm
Change to
declare @q varchar(max)
SELECT @q = ISNULL(@q, '') + 'DELETE FROM ' + tablename + ' where tid =' + convert(char,rowid) + '; ' from #incoming where action...
December 5, 2012 at 10:40 am
Alan.B (12/5/2012)
Your Name Here (12/5/2012)
December 5, 2012 at 7:10 am
UPDATE takes only one column. There is no similar 'INSERT' function; UPDATE checks for both.
Your line would change to
IF (UPDATE(Col1) OR UPDATE(Col2) OR UPDATE(Col3))
You could also use COLUMNS_UPDATED, but...
December 5, 2012 at 7:06 am
To fix the syntax error, you need one more END. The BEGIN block for the trigger is not closed.
December 4, 2012 at 4:14 pm
As nonsensical as this requirement is, sounds like you want
CREATE trigger Del_records on Active_Table
AFTER insert
as
delete from Active_Table a WHERE a.ID NOT IN (SELECT ID FROM INSERTED)
Of course, use your...
October 11, 2012 at 7:32 am
PFlorenzano-641896 (9/11/2012)
I'm wondering if I could use just one trigger to handle both the UPDATE and INSERT within the Mag_PortalUser table, and conditional logic like an IF or CASE...
September 11, 2012 at 3:05 pm
The last line in the dynamic sql is highly suspect.
'where act.uniqueincluster between select min('+@uniqueincluster+') from #temp1 and select max('+@uniqueincluster+') from #temp1'
It doesn't make sense to have the variable in there....
September 4, 2012 at 3:28 pm
MissTippsInOz (8/24/2012)
August 24, 2012 at 8:40 am
iwaldner (6/13/2012)
June 13, 2012 at 11:32 am
Anyone here move to a standing workstation or give it a try? It's supposed to be much healthier for blood flow and muscle use (as Brandie states.) It's been...
June 7, 2012 at 8:53 am
Viewing 15 posts - 31 through 45 (of 345 total)