LINUX.ORG.RU

История изменений

Исправление admucher, (текущая версия) :

Вот, накидал примерно. Можете поправить, если что не так?

задание: https://drive.google.com/file/d/1eJ800idvYROA-Dcat6oAlY0Mp3u-3u7S/view

1
select folder_id, name, code
from tovars_tbl 
where folder_id = '1003'
order by code

2
select tovar_id, name.tovar_tbl as name, name.tovar_units as name1
from tovar_tbl, tovar_units
where folder_id = '1008'
where unit_id = id
order by tovar_id

3
select name.tovar_tbl as name, name.tovar_units as name1
from tovar_tbl, tovar_units
where name1 LIKE 'шт'

4
update tovar_tbl set folder_id='1008'
where folder_id = '1003'

Исходная версия admucher, :

Вот, накидал примерно. Можете поправить, если что не так?

1
select folder_id, name, code
from tovars_tbl 
where folder_id = '1003'
order by code

2
select tovar_id, name.tovar_tbl as name, name.tovar_units as name1
from tovar_tbl, tovar_units
where folder_id = '1008'
where unit_id = id
order by tovar_id

3
select name.tovar_tbl as name, name.tovar_units as name1
from tovar_tbl, tovar_units
where name1 LIKE 'шт'

4
update tovar_tbl set folder_id='1008'
where folder_id = '1003'