Click here to Skip to main content
15,917,795 members
Home / Discussions / Database
   

Database

 
GeneralRe: string truncation Pin
_Damian S_9-Nov-11 16:32
professional_Damian S_9-Nov-11 16:32 
GeneralRe: string truncation Pin
Luc Pattyn9-Nov-11 16:59
sitebuilderLuc Pattyn9-Nov-11 16:59 
GeneralRe: string truncation Pin
jschell10-Nov-11 8:21
jschell10-Nov-11 8:21 
GeneralRe: string truncation Pin
Luc Pattyn10-Nov-11 8:35
sitebuilderLuc Pattyn10-Nov-11 8:35 
AnswerRe: string truncation Pin
PIEBALDconsult9-Nov-11 15:28
mvePIEBALDconsult9-Nov-11 15:28 
AnswerRe: string truncation Pin
Wayne Gaylard9-Nov-11 17:09
professionalWayne Gaylard9-Nov-11 17:09 
AnswerRe: string truncation Pin
Luc Pattyn9-Nov-11 17:28
sitebuilderLuc Pattyn9-Nov-11 17:28 
GeneralRe: string truncation Pin
Wayne Gaylard9-Nov-11 17:42
professionalWayne Gaylard9-Nov-11 17:42 
GeneralRe: string truncation Pin
Luc Pattyn9-Nov-11 17:48
sitebuilderLuc Pattyn9-Nov-11 17:48 
GeneralRe: string truncation Pin
Mycroft Holmes13-Nov-11 6:13
professionalMycroft Holmes13-Nov-11 6:13 
GeneralRe: string truncation Pin
Luc Pattyn13-Nov-11 6:35
sitebuilderLuc Pattyn13-Nov-11 6:35 
QuestionTrying to get Pivot Table working in MS SQL 2005 Pin
VREntropy9-Nov-11 8:56
VREntropy9-Nov-11 8:56 
AnswerRe: Trying to get Pivot Table working in MS SQL 2005 Pin
Mycroft Holmes13-Nov-11 6:06
professionalMycroft Holmes13-Nov-11 6:06 
GeneralRe: Trying to get Pivot Table working in MS SQL 2005 Pin
VREntropy14-Nov-11 3:13
VREntropy14-Nov-11 3:13 
Questionhow to avoid this error? Pin
Jassim Rahma9-Nov-11 5:22
Jassim Rahma9-Nov-11 5:22 
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 
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 

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.