26

(3 replies, posted in Script)

Just if someone need answer

Insert INTO TABLE1 (column1, column2, column3)
SELECT DISTINCT 
         column1 as column1,
         column2 as column2,
         max(case when column4 = 20 then column5 else 0 end) as column3,
 
from TABLE2

GROUP BY column1, column2, column3

27

(3 replies, posted in Script)

Ty CDB,

I believe grouping is not an option because i want to track deliveries later. Simple order, deliver sistem but only this i get trouble with...and also I'm total newbie with databases :'(

I learned so far insert, delete, update, simple queries...

Something what I'am looking for is something like
INSERT into OrderFiltered (OrderNO, Item, 22, 24, 26) VALUES ($value1, $value2, $value3, $value4, $value5)
But before that I need something to define values
1 to value5

value3 = if OrderNO.Size = 22 copy AMOUNT into OrderFiltered.22 else insert 0

TY

28

(3 replies, posted in Script)

Hi MVD,

Right now I have table like this:

Orders;
OrderNO.          Item                  Size       Quantity
1111111             ITEM22                 28            3
2222222            ITEM18                 22            4
333333              ITEM22                 26            3
1111111              ITEM22                 22            1
1111111              ITEM22                 26            2


I would like to copy these orders to other table that look like this:
OrderFiltered:
OrderNO:           Item                  22           26        28         
1111111             ITEM22               1             2         3
2222222            ITEM18              4             0         0
3333333           ITEM22               0             3         0

Thank You for all Your help

29

(3 replies, posted in General)

Thank You CDB
Almost what I needed but I can see where to go next

It would be perfect if I could add more than one product per sale

30

(3 replies, posted in General)

Just to clarify little more

I have database with all info on stock of "RawGoods" (name, supplier, price....)

Work order document would have to decrease size of stock of raw goods for amount entered in work order document and to give new product in new database "Products"

31

(3 replies, posted in General)

Hi to all,
I was wondering if I'am able to create some simple inventory with production report,
So I would build database with all info I need (name, code, supplier....) but I want to add work order for example coffee...

Here is sample:
1. Database with coffee brand, coffe price, coffee supplier, sugar supplier, price.... milk supplier, price

For one coffee I need 0.01kg of coffe, 0.01kg of sugar, and milkm cookies and some more items are optional

I want to create document work order for 100 coffees with all data of price, brand, extras to print

Thank You in advance