Click here to Skip to main content
15,894,896 members
Home / Discussions / Database
   

Database

 
QuestionSQL Server Command Line Compile Pin
Kevin Marois29-Mar-12 11:28
professionalKevin Marois29-Mar-12 11:28 
AnswerRe: SQL Server Command Line Compile Pin
PIEBALDconsult29-Mar-12 12:12
mvePIEBALDconsult29-Mar-12 12:12 
GeneralRe: SQL Server Command Line Compile Pin
Kevin Marois29-Mar-12 12:17
professionalKevin Marois29-Mar-12 12:17 
GeneralRe: SQL Server Command Line Compile Pin
PIEBALDconsult29-Mar-12 14:53
mvePIEBALDconsult29-Mar-12 14:53 
AnswerRe: SQL Server Command Line Compile Pin
Bernhard Hiller29-Mar-12 22:36
Bernhard Hiller29-Mar-12 22:36 
GeneralRe: SQL Server Command Line Compile Pin
PIEBALDconsult30-Mar-12 3:08
mvePIEBALDconsult30-Mar-12 3:08 
QuestionHow do you lock records in Access 2007 Pin
Richard.Berry10029-Mar-12 9:34
Richard.Berry10029-Mar-12 9:34 
AnswerRe: How do you lock records in Access 2007 Pin
David Mujica29-Mar-12 9:51
David Mujica29-Mar-12 9:51 
Could you post a code snipet of how you are updating the table ?

For example, a statement like the following would be kind of hard to corrupt.

update Inventory
set qty_on_hand = qty_on_hand - qty_sold
where item_code = "ABC123"

Is it possible that you have two operators who say, "Oh yeah, we have 3 on hand"
and each one tries to confirm an order for 2 items? This would leave you with a
qty_on_hand = -1.

The way around this would be to build a transaction that makes a request for 2 items to be sold and if it can't then rollback the request. (or create a back order).

Something like:

begin transaction

update Inventory
set qty_on_hand = qty_on_hand - qty_sold
where item_code = "ABC123"

if (select qty_on_hand from Inventory where item_code = "ABC123") < 0 then
rollback
Message to user: "Unable to complete transaction. Not enough qty on hand."
else
commit
End if
GeneralRe: How do you lock records in Access 2007 Pin
Richard.Berry10029-Mar-12 10:18
Richard.Berry10029-Mar-12 10:18 
AnswerRe: How do you lock records in Access 2007 Pin
Mycroft Holmes29-Mar-12 13:09
professionalMycroft Holmes29-Mar-12 13:09 
QuestionXML data import to SQL Pin
milenalukic29-Mar-12 6:21
milenalukic29-Mar-12 6:21 
AnswerRe: XML data import to SQL Pin
jschell29-Mar-12 8:08
jschell29-Mar-12 8:08 
AnswerRe: XML data import to SQL Pin
PIEBALDconsult29-Mar-12 12:24
mvePIEBALDconsult29-Mar-12 12:24 
GeneralRe: XML data import to SQL Pin
milenalukic30-Mar-12 11:46
milenalukic30-Mar-12 11:46 
QuestionNew User. Pin
Abhishek kumar12129-Mar-12 4:24
Abhishek kumar12129-Mar-12 4:24 
AnswerRe: New User. Pin
Simon_Whale29-Mar-12 4:46
Simon_Whale29-Mar-12 4:46 
QuestionWhere .. IN ... Pin
eyalle27-Mar-12 20:47
eyalle27-Mar-12 20:47 
AnswerRe: Where .. IN ... Pin
Vipin_Arora27-Mar-12 20:57
Vipin_Arora27-Mar-12 20:57 
AnswerRe: Where .. IN ... Pin
Mycroft Holmes27-Mar-12 23:14
professionalMycroft Holmes27-Mar-12 23:14 
AnswerRe: Where .. IN ... Pin
Blue_Boy27-Mar-12 23:24
Blue_Boy27-Mar-12 23:24 
AnswerRe: Where .. IN ... Pin
Eddy Vluggen28-Mar-12 7:29
professionalEddy Vluggen28-Mar-12 7:29 
QuestionSQL query with multiples values(same column) Pin
OsiKosi27-Mar-12 15:47
professionalOsiKosi27-Mar-12 15:47 
AnswerRe: SQL query with multiples values(same column) Pin
Luc Pattyn27-Mar-12 16:18
sitebuilderLuc Pattyn27-Mar-12 16:18 
AnswerRe: SQL query with multiples values(same column) Pin
OsiKosi27-Mar-12 16:34
professionalOsiKosi27-Mar-12 16:34 
AnswerRe: SQL query with multiples values(same column) Pin
Luc Pattyn27-Mar-12 17:37
sitebuilderLuc Pattyn27-Mar-12 17:37 

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.