/*Check to see if there are any triggers on the table you are trying to execute
queries against. They can sometimes throw this error as they are trying to
run the update/select/insert trigger that is on the table.
You can modify your query to disable then enable the trigger if the trigger
DOES NOT
need to be executed for whatever query you are trying to run.*/
ALTER TABLE your_table DISABLE TRIGGER [the_trigger_name]
UPDATE your_table
SET Gender = 'Female'
WHERE (Gender = 'Male')
ALTER TABLE your_table ENABLE TRIGGER [the_trigger_name]
select * from dbo.books where isbn IN (select isbn from dbo.lending where (act between @fdate and @tdate) and (stat ='close'))
(select TOP 1 [FileName] from [dbo].[APP_FinishProductCompleteForm_Attachment] where [finishProductID]=@FinishProductId and FileType='3' ) FileName3,
(select TOP 1 [FileName] from [dbo].[APP_FinishProductCompleteForm_Attachment] where [finishProductID]=@FinishProductId and FileType='4' ) FileName4,
(select TOP 1 [FileName] from [dbo].[APP_FinishProductCompleteForm_Attachment] where [finishProductID]=@FinishProductId and FileType='5' ) FileName5,
(select TOP 1 [FileName] from [dbo].[APP_FinishProductCompleteForm_Attachment] where [finishProductID]=@FinishProductId and FileType='6' ) FileName6,
(select TOP 1 [FileName] from [dbo].[APP_FinishProductCompleteForm_Attachment] where [finishProductID]=@FinishProductId and FileType='7' ) FileName7,
(select TOP 1 finishProductID from [dbo].APP_Raw_Material where [finishProductID]=@FinishProductId ) FinishProductIDRM