SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
DROP VIEW IF EXISTS ‘вирт_Работа с документами’; CREATE VIEW ‘вирт_Работа с документами’ AS SELECT ‘’.’’ AS ‘Регномер работы’, ‘’.’’ AS ‘Дата/время начала’, ‘’.’’ AS ‘Дата/время окончания’, ‘’.’’ AS ‘Код вида работы’, ‘’.’’ AS ‘Название вида работы’, ‘’.’’ AS ‘Код пользователя’, ‘’.’’ AS ‘ФИО пользователя’, ‘’.’’ AS ‘Код должности пользователя’, ‘’.’’ AS ‘Название должности пользователя’, ‘’.’’ AS ‘Код допуска пользователя’, ‘’.’’ AS ‘Название допуска пользователя’, ‘’.’’ AS ‘Ид\Работа с документами’ FROM ‘’ AS ‘’ LEFT JOIN ‘’ AS ‘’ ON ‘’.’’ = ‘’.’’; SELECT*FROM ‘вирт_Работа с документами’; DROP PROCEDURE IF EXISTS ‘проц_Документ в работе’; CREATE PROCEDURE ‘проц_Документ в работе’ (IN ‘@Ид\Работа с документами’ INT) SELECT ‘’.’’ AS ‘Основание для выдачи’, ‘’.’’ AS ‘Дата/время выдачи’, ‘’.’’ AS ‘Дата/время возврата’, ‘’.’’ AS ‘Регномер документа’, ‘’.’’ AS ‘Название документа’, ‘’.’’ AS ‘Код грифа секретности’, ‘’.’’ AS ‘Код вида документа’, ‘’.’’ AS ‘Название вида документа’, ‘’.’’ AS ‘Код ответственного’, ‘’.’’ AS ‘ФИО ответственного’, ‘’.’’ AS ‘Код хранителя’, ‘’.’’ AS ‘ФИО хранителя’ FROM ‘’ AS ‘’ LEFT JOIN ‘’ AS ‘’ ON ‘’.’’ = ‘’.’’ WHERE ‘’.’’ = ‘@Ид\Работа с документами’; SELECT*FROM ‘вирт_Работа с документами’; CALL ‘проц_Документ в работе’ (1); DROP PROCEDURE IF EXISTS ‘проц_Поручение’; CREATE PROCEDURE ‘проц_Поручение’ (IN ‘@Ид\Работа с документами’ INT) SELECT ‘’.’’ AS ‘Регномер поручения’, ‘’.’’ AS ‘Содержание поручения’, ‘’.’’ AS ‘Код вида поручения’, ‘’.’’ AS ‘Название вида поручения’, ‘’.’’ AS ‘Код пользователя’, ‘’.’’ AS ‘ФИО пользователя’, ‘’.’’ AS ‘Код техника’, ‘’.’’ AS ‘ФИО техника’ FROM ‘’ AS’’ LEFT JOIN ‘’ AS ‘’ ON ‘’.’’ = ‘’.’’ WHERE ‘’.’’ = ‘@Ид\Работа с документами’; SELECT*FROM ‘вирт_Работа с документами’; CALL ‘проц_Поручение’ (1); DROP VIEW IF EXISTS ‘вирт_Работа%Документ’; CREATE VIEW ‘вирт_Работа%Документ’ AS SELECT ‘’.’’ AS ‘Регномер работы’, ‘’.’’ AS ‘Дата/время начала’, ‘’.’’ AS ‘Дата/время окончания’, ‘’.’’ AS ‘Код вида работы’, ‘’.’’ AS ‘Название вида работы’, ‘’.’’ AS ‘Код пользователя’, ‘’.’’ AS ‘ФИО пользователя’, ‘’.’’ AS ‘Код должности пользователя’, ‘’.’’ AS ‘Название должности пользователя’, ‘’.’’ AS ‘Код допуска пользователя’, ‘’.’’ AS ‘Название допуска пользователя’, ‘’.’’ AS ‘Ид\Работа с документами’, ‘’.’’ AS ‘Основание для выдачи’, ‘’.’’ AS ‘Дата/время выдачи’, ‘’.’’ AS ‘Дата/время возврата’, ‘’.’’ AS ‘Регномер документа’, ‘’.’’ AS ‘Название документа’, ‘’.’’ AS ‘Код грифа секретности’, ‘’.’’ AS ‘Код вида документа’, ‘’.’’ AS ‘Название вида документа’, ‘’.’’ AS ‘Код ответственного’, ‘’.’’ AS ‘ФИО ответственного’, ‘’.’’ AS ‘Код хранителя’, ‘’.’’ AS ‘ФИО хранителя’ FROM ‘’ AS ‘’ LEFT JOIN ‘’ AS ‘’ ON ‘’.’’ = ‘’.’’; SELECT*FROM ‘вирт_Работа%Документ’; DROP VIEW IF EXISTS ‘вирт_Исполненное поручение’; CREATE VIEW ‘вирт_Исполненное поручение’ AS SELECT ‘’.’’ AS ‘Регномер акта’, ‘’.’’ AS ‘Дата составления’, ‘’.’’ AS ‘Код техника’, ‘’.’’ AS ‘ФИО техника’, ‘’.’’ AS ‘Код пользователя’, ‘’.’’ AS ‘ФИО пользователя’, ‘’.’’ AS ‘Код допуска пользователя’, ‘’.’’ AS ‘Код ответственного’, ‘’.’’ AS ‘ФИО ответственного’, COUNT (*) AS ‘Число выполненных поручений’ FROM ‘’ AS ‘’ LEFT JOIN ‘’ AS ‘’ ON ‘’.’’ = ‘’.’’ GROUP BY ‘’.’’; SELECT*FROM ‘вирт_Исполненное поручение’;

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear