Click here to Skip to main content
15,891,204 members

Comments by savedlema (Top 25 by date)

savedlema 1-Aug-14 5:34am View    
Kschuler,
Thank you very much for your input. I managed to do it from your help.

However, I was forced to do some modifications to your code. I'm posting the solution hoping it may also be useful to someone else.
Thank you so much.
savedlema 19-Jun-13 13:23pm View    
Hi Amol_B, are you there please?
savedlema 18-Jun-13 14:07pm View    
Thank you Amol! I think your solution is taking me somewhere good.
I have few questions from your solution:

- You said if there're two orders (Declare @Order INT -– for 2 orders
DECLARE @Menu INT – for Salads ), What will these codes do, I missed the point here.

-Is your code for VB.NET? I think not? Eg. in "Declare @tab AS TABLE", I think VB.NET use Dim instead of "Declare" to declare a variable. Also in "AS TABLE", VB reports an error in "TABLE". What did you want this to do? Are you creating a table called "tab"? (the we could just use the normal CREATE TABLE command?)

-For the "INSERT INTO @Tab", it seems we're inserting these values to a table "Tab"? which is created in the previous lines?

Please help me understand this before I start looping. Please forgive my being a novice.

savedlema 18-Jun-13 8:23am View    
My tables are:
1.Inventory (item,amount)
2. Menu (menu_name)
3. Salad (recipe, amount)
Other tables will be added for each menu, just like I did for salad.
Now, when I click Salad, since it has two values (recipe for it and amount), how then can I subtract these (recipe & amount) from the (amount) in the inventory table?

I find it challenging.
savedlema 18-Jun-13 8:13am View    
Thank you Amol_B!
I have three tables (similar to your solution, except to the third table), can you please tell me more on table 3 of your solution? How is it gonna look like?

Thanks.