
We have a similar need from time to time. Especially when we have a T1 or power outage in an office. Here is the sql statement I use (you'll need to edit it for your queues and ID numbers) . . . UPDATE ticket SET ticket_state_id = 2 WHERE queue_id = 7 AND ticket_state_id = 1 AND customer_id = 'blahblahblah@jhlaw.net' HTH, Bakari Allen ballen@jhlaw.net -----Original Message----- From: otrs-bounces@otrs.org [mailto:otrs-bounces@otrs.org] On Behalf Of Henry Combrinck Sent: Tuesday, October 19, 2004 11:37 AM To: otrs@otrs.org Subject: [otrs] Raw SQL question: closing hundreds of tickets Hello I recall (I think) this being mentioned somewhere on the mailing list, but cannot for the life of me find it (obviously using incorrect search criteria). I need to close a whole bunch of tickets, and would like to use raw sql to achieve this. I've been grepping/searching around without success. For example: to close all tickets with queue_id=11, and which are in ticket_state 1||4. Obviously a couple of tables need to be updated, but without a more specific knowledge of the table relationships, I'm plonking around uselessly. update ticket set ticket_state_id=2 where queue_id=11 and... update some_other tables... Any help would be appreciated. Thanks Henry -------------------------------------------------------- This message was sent using MetroWEB's AirMail service. http://www.metroweb.co.za/ - full access for only R73. Free Web Accelerator, WebMail, Calendar, Anti-Virus, Anti-Spam, 10 emails, 100MB personal webspace, and more! Phone Now! 086 11 11 440 _______________________________________________ OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs Support oder Consulting für Ihr OTRS System? => http://www.otrs.de/ NOTICE: This communication may contain privileged or other confidential information. If you are not the intended recipient, or believe you have received this communication in error, please do not print, copy retransmit, disseminate or otherwise use the information. Also, please indicate to the sender that you received this communication in error and delete the copy you received. Thank you.