Click here to Skip to main content
       

Database

 
AnswerRe: char(255) vs varchar(255) vs varchar(MAX) PinmemberPIEBALDconsult2-Feb-13 6:22 
GeneralRe: char(255) vs varchar(255) vs varchar(MAX) Pinmemberdevvvy3-Feb-13 0:30 
GeneralRe: char(255) vs varchar(255) vs varchar(MAX) Pinmemberjschell3-Feb-13 7:36 
QuestionSP Unexpected Behavior Pinmembereddieangel1-Feb-13 8:19 
QuestionEncrypt a field in the database. Pinmembervanikanc1-Feb-13 6:31 
AnswerRe: Encrypt a field in the database. PinmvpEddy Vluggen1-Feb-13 8:02 
Questioncheck before insert Pinmembervanikanc31-Jan-13 5:55 
AnswerRe: check before insert PinmvpEddy Vluggen31-Jan-13 6:00 
vanikanc wrote:
Is there a way to check, before an insert if that particular order already exists in the table?

Yes; the primary key. That's the one that uniquely identifies a tupel/record. Hence, that's what you'd need to check. Most databases will do this automatic and throw an error if the record already exists.
 
vanikanc wrote:
if the process fails in the middle, and i want to start it again, if there are already some rows in the table, not to insert those.

Select a list of all primary key-values in the table, and skip those inserts.
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]
They hate us for our freedom![^]

GeneralRe: check before insert PinmvpEddy Vluggen31-Jan-13 11:35 
AnswerRe: check before insert Pinmembermark merrens31-Jan-13 9:10 
GeneralRe: check before insert Pinmembervanikanc31-Jan-13 9:21 
GeneralRe: check before insert Pinmembermark merrens31-Jan-13 11:09 
GeneralRe: check before insert PinmemberChris Meech31-Jan-13 11:24 
GeneralRe: check before insert Pinmembermark merrens31-Jan-13 11:25 
AnswerRe: check before insert Pinmemberdjj551-Feb-13 8:50 
GeneralRe: check before insert Pinmembervanikanc1-Feb-13 8:55 
GeneralRe: check before insert Pinmemberdjj551-Feb-13 9:25 
QuestionIdentify DML changes between two databases PinmemberMember 313707830-Jan-13 21:56 
AnswerRe: Identify DML changes between two databases PinmemberMycroft Holmes30-Jan-13 22:11 
GeneralRe: Identify DML changes between two databases PinmemberMember 313707830-Jan-13 22:26 
QuestionUpdate a flag based on portion of data avialble in other column Pinmemberyuvachandra30-Jan-13 11:20 
AnswerRe: Update a flag based on portion of data avialble in other column PinmemberMycroft Holmes30-Jan-13 12:56 
GeneralRe: Update a flag based on portion of data avialble in other column Pinmemberyuvachandra31-Jan-13 7:08 
GeneralRe: Update a flag based on portion of data avialble in other column PinmemberMycroft Holmes31-Jan-13 12:32 
GeneralRe: Update a flag based on portion of data avialble in other column Pinmemberyuvachandra31-Jan-13 12:45 

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

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


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 25 Nov 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid