Custom Query (1133 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (10 - 12 of 1133)

1 2 3 4 5 6 7 8 9 10 11 12 13 14
Ticket Resolution Summary Owner Reporter
#1254 fixed Необходимо создать процедуру в MYSQL для работы и-са Несоответствия в ревизии 340 Denis_N Denis_N
Description
DELIMITER $$

CREATE PROCEDURE `mismatchQueryOnlyMismatch` (`min` INT, `max` INT, `searchName` VARCHAR(100), `searchSerial` VARCHAR(100), `searchComment` VARCHAR(10000))
BEGIN
set @prevtotal := 0;
set @mintotal := 0;
select * from (select *, @mintotal as mintotal, @prevtotal := @mintotal - total as prevtotal from
(select products.serial, history.uid, history.date, hist1.total from history inner join
(select uid, count(uid) as total from history where ((`history`.type_write = 'mismatch' and (`history`.`status` is null or `history`.`status` = 'fail'))
    or (`history`.type_write = 'mismatch' and `history`.`status` = 'ok' and `history`.bond is null)) and comment is not null and  comment != '' group by uid) as hist1 on history.uid = hist1.uid
inner join products on products.uid = history.uid where (products.name like searchName
and products.serial like searchSerial and history.comment like searchComment) and (history.uid, history.date) in
(select uid, max(date) from history where ((`history`.type_write = 'mismatch' and (`history`.`status` is null or `history`.`status` = 'fail'))
    or (`history`.type_write = 'mismatch' and `history`.`status` = 'ok' and `history`.bond is null)) and history.comment like searchComment and comment is not null and comment != '' group by uid )
group by products.serial, history.uid, history.date, hist1.total order by history.date desc) as hist2
where (@mintotal := @minTotal + total)) as hust2 where hust2.mintotal > min and hust2.prevtotal < max;
END$$

DELIMITER ;

Необходимо изменить adcproducts_tables.sql Также этот тикет связан с тикетом: https://trac.adc-line.ru/mc-04/ticket/1255#ticket.

#1253 дубликат Нужно изменить код процедуры в файле products_tables.sql san Denis_N
Description

Нужно изменить код процедуры в файле products_tables.sql, потому что он не соответствует действительности Код в тикете: https://trac.adc-line.ru/mc-04/ticket/1207

#1252 fixed Нужно добавить в таблице История, к столбцу bond внешний ключ san Denis_N
Description

Нужно добавить в таблице История, к столбцу bond, внешний ключ. Предложение от alx, в https://trac.adc-line.ru/mc-04/ticket/1207#comment:8

alter table history add foreign key (bond) references history (`N`)
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.