Click here to Skip to main content
15,889,335 members
Home / Discussions / Database
   

Database

 
AnswerRe: how to avoid this error? Pin
loyal ginger9-Nov-11 5:41
loyal ginger9-Nov-11 5:41 
AnswerRe: how to avoid this error? Pin
jschell9-Nov-11 11:25
jschell9-Nov-11 11:25 
QuestionCannot connect a remote SQL server 2005... Pin
Jun Du9-Nov-11 3:35
Jun Du9-Nov-11 3:35 
AnswerRe: Cannot connect a remote SQL server 2005... Pin
Luc Pattyn9-Nov-11 4:01
sitebuilderLuc Pattyn9-Nov-11 4:01 
GeneralRe: Cannot connect a remote SQL server 2005... Pin
Jun Du9-Nov-11 4:49
Jun Du9-Nov-11 4:49 
AnswerRe: Cannot connect a remote SQL server 2005... Pin
Luc Pattyn9-Nov-11 4:54
sitebuilderLuc Pattyn9-Nov-11 4:54 
GeneralRe: Cannot connect a remote SQL server 2005... Pin
Jun Du9-Nov-11 5:09
Jun Du9-Nov-11 5:09 
QuestionMS SQL Server Trigger help Pin
eddjusted9-Nov-11 3:18
eddjusted9-Nov-11 3:18 
Hi,
I have a sql server table with fields EmployeeID, Date, TimeIN, TimeOut, Remarks.
Now there is a unique constraint on both EmployeeID and Date such that only one record exists for a particular Employee on a particular date.
Now the main application can insert and update records. I need a trigger to track changes such that on insert or update, the values are copied onto a data_log table. Here is the problem, I need the trigger to check if the row exists in data_log for that EmployeeID and Date, then update, else insert. So there should be only one record of each employee per date in the data_log table as well. I just want the most current change and need to overwrite previous log entry.


thanks
AnswerRe: MS SQL Server Trigger help Pin
R. Giskard Reventlov9-Nov-11 3:49
R. Giskard Reventlov9-Nov-11 3:49 
GeneralRe: MS SQL Server Trigger help Pin
eddjusted9-Nov-11 3:56
eddjusted9-Nov-11 3:56 
AnswerRe: MS SQL Server Trigger help Pin
Corporal Agarn9-Nov-11 6:26
professionalCorporal Agarn9-Nov-11 6:26 
QuestionMySQL query help Pin
eddjusted9-Nov-11 3:02
eddjusted9-Nov-11 3:02 
AnswerRe: MySQL query help Pin
Blue_Boy9-Nov-11 3:18
Blue_Boy9-Nov-11 3:18 
GeneralRe: MySQL query help Pin
eddjusted9-Nov-11 3:20
eddjusted9-Nov-11 3:20 
AnswerRe: MySQL query help Pin
Bernhard Hiller9-Nov-11 20:56
Bernhard Hiller9-Nov-11 20:56 
QuestionProblem in query Pin
uspatel8-Nov-11 18:52
professionaluspatel8-Nov-11 18:52 
AnswerRe: Problem in query Pin
_Damian S_8-Nov-11 18:59
professional_Damian S_8-Nov-11 18:59 
GeneralRe: Problem in query Pin
uspatel8-Nov-11 19:28
professionaluspatel8-Nov-11 19:28 
AnswerRe: Problem in query Pin
Blue_Boy8-Nov-11 21:36
Blue_Boy8-Nov-11 21:36 
GeneralRe: Problem in query Pin
uspatel9-Nov-11 1:31
professionaluspatel9-Nov-11 1:31 
Questionsaving changes to sqlserver2008 Pin
MalarGayu8-Nov-11 15:41
MalarGayu8-Nov-11 15:41 
AnswerRe: saving changes to sqlserver2008 Pin
_Damian S_8-Nov-11 17:54
professional_Damian S_8-Nov-11 17:54 
AnswerRe: saving changes to sqlserver2008 Pin
uspatel8-Nov-11 19:33
professionaluspatel8-Nov-11 19:33 
AnswerNot Allow Null ? Pin
David Mujica9-Nov-11 3:16
David Mujica9-Nov-11 3:16 
QuestionLesserOf function Pin
PIEBALDconsult8-Nov-11 15:05
mvePIEBALDconsult8-Nov-11 15:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.