Custom Query (1134 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (7 - 9 of 1134)

1 2 3 4 5 6 7 8 9 10 11 12 13
Ticket Resolution Summary Owner Reporter
#1169 не будем делать Нужно изменить обе процедуры для и-а "Несоответствия" san Denis_N
Description

Нужно изменить обе процедуры для и-а "Несоответствия" для того, чтобы выводились записи с типом записи "record" по тикету #1158

1-ая

drop procedure mismatchQuery;

DELIMITER }

CREATE PROCEDURE mismatchQuery(min int, max int, searchName varchar (100), searchSerial varchar (100), searchComment varchar (10000)) READS SQL DATA 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 (type_write = "mismatch" or type_write = 'record' or type_write = "repair" or (type_write = "otk" and status = "fail") or (type_write = "testing" and status = "fail")) and comment is not null 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 (type_write = "mismatch" or type_write = 'record' or type_write = "repair" or (type_write = "otk" and status = "fail") or (type_write = "testing" and status = "fail" )) and comment is not null 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 ;

2-ая

drop procedure mismatchQueryWithoutOtkRows;

DELIMITER }

CREATE PROCEDURE mismatchQueryWithoutOtkRows(min int, max int, searchName varchar (100), searchSerial varchar (100), searchComment varchar (10000)) READS SQL DATA 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 (type_write = "mismatch" or type_write = 'record' or type_write = "repair" or (type_write = "testing" and status = "fail")) and comment is not null 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 (type_write = "mismatch" or type_write = 'record' or type_write = "repair" or (type_write = "testing" and status = "fail") or history.type_write = 'record') and comment is not null 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 ;

#1172 дубликат Необходимо изменить процедуры для работы ревизии r242/base Denis_N Denis_N
Description

Необходимо изменить процедуры для работы ревизии r242/base, где был исправлен баг: несоответствия должны выводить только непустые комментарии типа Запись, а выводят и пустые тоже

drop procedure mismatchQuery;

DELIMITER }

CREATE PROCEDURE mismatchQuery(min int, max int, searchName varchar (100), searchSerial varchar (100), searchComment varchar (10000)) READS SQL DATA 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 (type_write = "mismatch" or type_write = 'record' or type_write = "repair" or (type_write = "otk" and status = "fail") or (type_write = "testing" and status = "fail")) 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 (type_write = "mismatch" or type_write = 'record' or type_write = "repair" or (type_write = "otk" and status = "fail") or (type_write = "testing" and status = "fail" )) 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 ;


drop procedure mismatchQueryWithoutOtkRows;

DELIMITER }

CREATE PROCEDURE mismatchQueryWithoutOtkRows(min int, max int, searchName varchar (100), searchSerial varchar (100), searchComment varchar (10000)) READS SQL DATA 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 (type_write = "mismatch" or type_write = 'record' or type_write = "repair" or (type_write = "testing" and status = "fail")) 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 (type_write = "mismatch" or type_write = 'record' or type_write = "repair" or (type_write = "testing" and status = "fail") or history.type_write = 'record') 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 ;

#1175 fixed Для ревизии 252 необходимо обновить код процедур для страницы "Несоответствия" san Denis_N
Description

r252/base

drop procedure mismatchQuery;

DELIMITER }

CREATE PROCEDURE mismatchQuery(min int, max int, searchName varchar (100), searchSerial varchar (100), searchComment varchar (10000)) READS SQL DATA
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 (type_write = "mismatch" or type_write = 'record' or type_write = "repair" or
(type_write = "otk" and status = "fail") or (type_write = "testing" and status = "fail")) 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 (type_write = "mismatch" or type_write = 'record' or type_write = "repair" or
(type_write = "otk" and status = "fail") or (type_write = "testing" and status = "fail" )) 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 ;

drop procedure mismatchQueryWithoutOtkRows;

DELIMITER }

CREATE PROCEDURE mismatchQueryWithoutOtkRows(min int, max int, searchName varchar (100), searchSerial varchar (100), searchComment varchar (10000)) READS SQL DATA
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 (type_write = "mismatch" or type_write = 'record' 
or type_write = "repair" or (type_write = "testing" and status = "fail")) 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 (type_write = "mismatch" or type_write = 'record' or type_write = "repair" or
(type_write = "testing" and status = "fail") or `history`.type_write = 'record') 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 ;
1 2 3 4 5 6 7 8 9 10 11 12 13
Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.