Skip to main content

All Questions

0 votes
1 answer
52 views

check if fields of a sqlserver table are empty/full in a computed field

i need to add a computed field in a sqlserver table that shows me if the other fields of the table are empty or full (all, some of them, none) the field should contain: 0=all the fields are empty(...
pinale's user avatar
  • 2,184
0 votes
1 answer
402 views

SQL Server trigger performance

I am using SQL Server 2005. I have this table of task files: and a table of tasks: When all the task of a file are all in a state 3 (completed), the state of the relative file has to be 4 (completed)...
overcomer's user avatar
  • 2,324
0 votes
0 answers
121 views

Problems processing child and parent records via trigger in SQL Server 2005

I have an SQL database that contains a Sales (dbo.Ventas) and SalesDetails (dbo.VentasDetalle) tables in a one to many relationship. I needed to process newly created and newly updated sales by an ...
Augusto Samamé Barrientos's user avatar
-1 votes
1 answer
821 views

Trigger to insert into a table a "SELECT SUM" from another table

I have these 2 tables: The data in the table a AUX has duplicated dates, and the table a, must have the dates with no duplicates, BUT adding the total of the duplicated dates. ej. 05/01/2017 = 123 + ...
gokufast's user avatar
1 vote
0 answers
19 views

trigger performance over different cases

I have a table that collects logs of every check_in. I want to pick 4 columns to later process them. I have placed a trigger on every insert and columns are copied. I am confused over which way to do ...
Usman Ali Siddiqui Sabzwari's user avatar
1 vote
2 answers
464 views

In Trigger getting error as error converting data type varchar to numeric

I have a trigger which was working earlier perfectly. But later on, as required I added some more lines into that which is below declare @imkey numeric(10,0);declare @xmkey numeric(10,0); declare @...
hud's user avatar
  • 4,701
0 votes
0 answers
21 views

After Trigger effect in SQL Server 2005 transactional publication

On publisher table P1 we have after trigger on last_update_time column which is fired when any data is updated. On subscriber table S1 we have an insert trigger to audit all the data changes into ...
Sqldev's user avatar
  • 53
0 votes
2 answers
1k views

Update a column of each and every newly inserted (same row) record on a table depends on another column value without Trigger and default constraint

I have a table with an identity column (say Column1) and an integer column Column2 (nullable) While inserting a row into this table, if the value passed to the Column2 is null, copy the Column1 value....
Baskaran B's user avatar
0 votes
0 answers
50 views

Is it wise to use triggers as part of an import routine

Hi all I have a requirement to create a web based application using SQL server 2005. The data is coming from a third party source in a text format. This is my idea so far. I have a file system ...
altaaf.hussein's user avatar
1 vote
0 answers
339 views

LOG system using SQL Server Trigger

i'm trying to create a trigger for log any change in many tables. but now, i'm testing in just one table called "MAN_OS_TIPO". The objective: I need to detect which column has been changed and put ...
Anpix's user avatar
  • 170
0 votes
2 answers
1k views

SQL Server 2005 - writing an insert and update trigger for validation

I'm pretty bad at SQL, so I need someone to check my trigger query and tell me if it solves the problem and how acceptable it is. The requirements are a bit convoluted, so please bear with me. ...
sdds's user avatar
  • 2,051
0 votes
2 answers
954 views

SQL Server 2005 'INSTEAD OF' DELETE Trigger - Not deleting Source Records

I created a trigger in SQL Server 2005 that inserts records into a history table whenever a deletion occurs in the source table. The records are getting inserted, but they are not getting deleted from ...
hmakled's user avatar
  • 353
0 votes
2 answers
2k views

How to check the log when Trigger is turned On and Off

I want to check when my trigger is turned on and off in SQL Server 2005 database. I have created a trigger which inserts entry into new table whenever there is change in specific column. But I ...
Rahul's user avatar
  • 21
0 votes
3 answers
50 views

Error in Trigger Update - SQL Server 2005

I am trying to define a trigger on the Employee table, so that if the Salary column of an Employee is updated, the TaxDeduction column in TaxDetails table should be updated. Here is the trigger ...
SanjayDVG's user avatar
  • 375
0 votes
2 answers
104 views

Sql Server On Update Cascade With Multiple Constraints On Multiple Tables

I've seen questions similar to mine, but none exactly the same. Suppose, I have the following (simplified) tables: Table A aID int PRIMARY KEY 10 11 Table B bID int PRIMARY KEY, aID int FOREIGN ...
dseiple's user avatar
  • 628

15 30 50 per page
1
2 3 4 5
14