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

Database

 
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 
AnswerRe: MS SQL Server Trigger help Pin
R. Giskard Reventlov9-Nov-11 3:49
R. Giskard Reventlov9-Nov-11 3:49 
Just a thought... why are you bothering if all you are doing is copying the values into another table? An audit or log table should contain complete history, I've always thought and no unique keys from the parent table - duplicates are fine - create a compound index or a surrogate key if you need one. Prepared to be called out on this - just seems a bit pointless.

In the meantime you could check with:

SQL
if exists(select top 1 1 from [table] where [key] = [parameter])
begin
    -- insert
end
else
begin
    -- update
end


or similar: adjust to suit.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum

me, me, me

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 
AnswerRe: LesserOf function Pin
Andy_L_J8-Nov-11 21:28
Andy_L_J8-Nov-11 21:28 

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.