Click here to Skip to main content
15,879,096 members
Home / Discussions / Database
   

Database

 
AnswerRe: CLOB Convert to String Pin
Krish - KP16-Apr-07 21:36
Krish - KP16-Apr-07 21:36 
QuestionHow do I protect Access database (MDB file)? Pin
testmail_12316-Apr-07 2:44
testmail_12316-Apr-07 2:44 
AnswerRe: How do I protect Access database (MDB file)? Pin
Dave Kreskowiak16-Apr-07 4:18
mveDave Kreskowiak16-Apr-07 4:18 
GeneralRe: How do I protect Access database (MDB file)? Pin
testmail_12317-Apr-07 1:06
testmail_12317-Apr-07 1:06 
AnswerRe: How do I protect Access database (MDB file)? Pin
Mark J. Miller16-Apr-07 12:26
Mark J. Miller16-Apr-07 12:26 
QuestionHelp with cursor Pin
allende16-Apr-07 1:54
allende16-Apr-07 1:54 
AnswerRe: Help with cursor Pin
Pete O'Hanlon16-Apr-07 2:02
mvePete O'Hanlon16-Apr-07 2:02 
GeneralRe: Help with cursor Pin
allende16-Apr-07 2:53
allende16-Apr-07 2:53 
Thanks Pete,

I will be more specific, I tried your suggestion but still doesn't work...I'm not an SQL expert Blush | :O )
I will rite here the involved tables and their main fields:

Orders(OrderId)
OrderDetail(OrderId, ProductSubCode, Quantity)
Products(ProductSubCode, Quantity)

When an order is canceled I want to get all the items on it and re-insert them in the Product table (summarizing with the amount already in that table)

If I do a select of all the items in a given order as you told me I will get something like this:

"SELECT * INTO #TMP FROM ORDERDETAIL WHERE ORDERID=30"

OrderId ProductSubCode Quantity
30 BD0002 10
30 BD0004 4

Now I need to re-insert those quantities into the Products table.

I can't figure out how I ca do that without a cursor since I need to iterate through the records in the temporary table.

Of course I can still be missing alternatives

Thanks a lot.
GeneralRe: Help with cursor Pin
Pete O'Hanlon16-Apr-07 5:12
mvePete O'Hanlon16-Apr-07 5:12 
GeneralRe: Help with cursor Pin
allende16-Apr-07 5:43
allende16-Apr-07 5:43 
GeneralRe: Help with cursor Pin
Pete O'Hanlon16-Apr-07 22:50
mvePete O'Hanlon16-Apr-07 22:50 
Questionsql query Pin
Shuaib wasif khan16-Apr-07 1:25
Shuaib wasif khan16-Apr-07 1:25 
AnswerRe: sql query Pin
Christian Graus16-Apr-07 1:43
protectorChristian Graus16-Apr-07 1:43 
QuestionJoin table Pin
AnhTin15-Apr-07 20:33
AnhTin15-Apr-07 20:33 
AnswerRe: Join table Pin
Colin Angus Mackay15-Apr-07 21:08
Colin Angus Mackay15-Apr-07 21:08 
QuestionSQL Cursor Pin
playout15-Apr-07 20:09
playout15-Apr-07 20:09 
AnswerRe: SQL Cursor Pin
Christian Graus15-Apr-07 20:32
protectorChristian Graus15-Apr-07 20:32 
QuestionHelp Me Pin
Mkanchha15-Apr-07 20:00
Mkanchha15-Apr-07 20:00 
AnswerRe: Help Me Pin
_mubashir15-Apr-07 20:10
_mubashir15-Apr-07 20:10 
GeneralRe: Help Me Pin
Mkanchha15-Apr-07 20:25
Mkanchha15-Apr-07 20:25 
QuestionHelp Me soon Pin
Mkanchha15-Apr-07 19:41
Mkanchha15-Apr-07 19:41 
AnswerRe: Help Me soon Pin
_mubashir15-Apr-07 19:59
_mubashir15-Apr-07 19:59 
GeneralRe: Help Me soon Pin
Mkanchha15-Apr-07 20:02
Mkanchha15-Apr-07 20:02 
Questionwhat is the differenece these two statements Pin
shabonaa15-Apr-07 10:58
shabonaa15-Apr-07 10:58 
AnswerRe: what is the differenece these two statements Pin
kubben15-Apr-07 14:51
kubben15-Apr-07 14:51 

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.