Re: [Koha] Renew Report

2018-04-23 Thread Arshad Iqbal
SELECT b.title, b.author, i.itemcallnumber, i.barcode, c.renewaldate
FROM (SELECT iss.renewaldate, iss.itemnumber FROM issues iss,
(SELECT @StartDate:=<>,@EndDate:=<>) AS var
WHERE date(iss.returndate) BETWEEN @StartDate AND @EndDate UNION ALL
SELECT oi.renewaldate, oi.itemnumber FROM old_issues oi WHERE
date(oi.renewaldate)
BETWEEN @StartDate AND @EndDate) AS c
LEFT JOIN items i USING (itemnumber)
LEFT JOIN biblio b USING (biblionumber)
WHERE i.homebranch=<>

On Mon, Apr 23, 2018 at 8:12 PM, Jonathan Druart <
jonathan.dru...@bugs.koha-community.org> wrote:

> How look like the new version of the query?
>
>
> On Mon, 23 Apr 2018 at 12:02 Arshad Iqbal  wrote:
>
>> I have added reneweddate and renwal as well in sql report but working
>> not good
>> On Mon, Apr 23, 2018 at 7:38 PM, Jonathan Druart <
>> jonathan.dru...@bugs.koha-community.org> wrote:
>>
>>> Hello Arshad,
>>>
>>> The renew information is in the same tables issues/old_issues, there are
>>> lastreneweddate and renewals.
>>>
>>> Note that asking the question only once is enough :)
>>>
>>> Regards,
>>> Jonathan
>>>
>>> On Mon, 23 Apr 2018 at 10:47 Arshad Iqbal 
>>> wrote:
>>>
 Hi,
 I want to convert this checked in sql report into renew sql report. How
 i
 can convert this report. guide me.

 SELECT b.title, b.author, i.itemcallnumber, i.barcode, c.returndate
 FROM (SELECT iss.returndate, iss.itemnumber FROM issues iss,
 (SELECT @StartDate:=<>,@EndDate:=<>>> (-mm-dd)|date>>) AS var
 WHERE date(iss.returndate) BETWEEN @StartDate AND @EndDate UNION ALL
 SELECT oi.returndate, oi.itemnumber FROM old_issues oi WHERE
 date(oi.returndate)
 BETWEEN @StartDate AND @EndDate) AS c
 LEFT JOIN items i USING (itemnumber)
 LEFT JOIN biblio b USING (biblionumber)
 WHERE i.homebranch=<>

 --


 *Muhammad Arshad Iqbal*
 Assistant Librarian at Publishing and Student Affairs Directorate,
 National University of Science and Technology (NUST) Islamabad.
 ___
 Koha mailing list  http://koha-community.org
 Koha@lists.katipo.co.nz
 https://lists.katipo.co.nz/mailman/listinfo/koha

>>>
>>
>>
>> --
>>
>>
>> *Muhammad Arshad Iqbal*
>> Assistant Librarian at Publishing and Student Affairs Directorate,
>> National University of Science and Technology (NUST) Islamabad.
>> Phone number:051-90851371
>> Cell no.+923444900809 <+92%20344%204900809>
>>
>


-- 


*Muhammad Arshad Iqbal*
Assistant Librarian at Publishing and Student Affairs Directorate,
National University of Science and Technology (NUST) Islamabad.
Phone number:051-90851371
Cell no.+923444900809
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] Renew Report

2018-04-23 Thread Jonathan Druart
How look like the new version of the query?

On Mon, 23 Apr 2018 at 12:02 Arshad Iqbal  wrote:

> I have added reneweddate and renwal as well in sql report but working not
> good
> On Mon, Apr 23, 2018 at 7:38 PM, Jonathan Druart <
> jonathan.dru...@bugs.koha-community.org> wrote:
>
>> Hello Arshad,
>>
>> The renew information is in the same tables issues/old_issues, there are
>> lastreneweddate and renewals.
>>
>> Note that asking the question only once is enough :)
>>
>> Regards,
>> Jonathan
>>
>> On Mon, 23 Apr 2018 at 10:47 Arshad Iqbal  wrote:
>>
>>> Hi,
>>> I want to convert this checked in sql report into renew sql report. How i
>>> can convert this report. guide me.
>>>
>>> SELECT b.title, b.author, i.itemcallnumber, i.barcode, c.returndate
>>> FROM (SELECT iss.returndate, iss.itemnumber FROM issues iss,
>>> (SELECT @StartDate:=<>,@EndDate:=<>> (-mm-dd)|date>>) AS var
>>> WHERE date(iss.returndate) BETWEEN @StartDate AND @EndDate UNION ALL
>>> SELECT oi.returndate, oi.itemnumber FROM old_issues oi WHERE
>>> date(oi.returndate)
>>> BETWEEN @StartDate AND @EndDate) AS c
>>> LEFT JOIN items i USING (itemnumber)
>>> LEFT JOIN biblio b USING (biblionumber)
>>> WHERE i.homebranch=<>
>>>
>>> --
>>>
>>>
>>> *Muhammad Arshad Iqbal*
>>> Assistant Librarian at Publishing and Student Affairs Directorate,
>>> National University of Science and Technology (NUST) Islamabad.
>>> ___
>>> Koha mailing list  http://koha-community.org
>>> Koha@lists.katipo.co.nz
>>> https://lists.katipo.co.nz/mailman/listinfo/koha
>>>
>>
>
>
> --
>
>
> *Muhammad Arshad Iqbal*
> Assistant Librarian at Publishing and Student Affairs Directorate,
> National University of Science and Technology (NUST) Islamabad.
> Phone number:051-90851371
> Cell no.+923444900809 <+92%20344%204900809>
>
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] Renew Report

2018-04-23 Thread Arshad Iqbal
 I have added reneweddate and renwal as well in sql report but working not
good

On Mon, Apr 23, 2018 at 7:38 PM, Jonathan Druart <
jonathan.dru...@bugs.koha-community.org> wrote:

> Hello Arshad,
>
> The renew information is in the same tables issues/old_issues, there are
> lastreneweddate and renewals.
>
> Note that asking the question only once is enough :)
>
> Regards,
> Jonathan
>
> On Mon, 23 Apr 2018 at 10:47 Arshad Iqbal  wrote:
>
>> Hi,
>> I want to convert this checked in sql report into renew sql report. How i
>> can convert this report. guide me.
>>
>> SELECT b.title, b.author, i.itemcallnumber, i.barcode, c.returndate
>> FROM (SELECT iss.returndate, iss.itemnumber FROM issues iss,
>> (SELECT @StartDate:=<>,@EndDate:=<> (-mm-dd)|date>>) AS var
>> WHERE date(iss.returndate) BETWEEN @StartDate AND @EndDate UNION ALL
>> SELECT oi.returndate, oi.itemnumber FROM old_issues oi WHERE
>> date(oi.returndate)
>> BETWEEN @StartDate AND @EndDate) AS c
>> LEFT JOIN items i USING (itemnumber)
>> LEFT JOIN biblio b USING (biblionumber)
>> WHERE i.homebranch=<>
>>
>> --
>>
>>
>> *Muhammad Arshad Iqbal*
>> Assistant Librarian at Publishing and Student Affairs Directorate,
>> National University of Science and Technology (NUST) Islamabad.
>> ___
>> Koha mailing list  http://koha-community.org
>> Koha@lists.katipo.co.nz
>> https://lists.katipo.co.nz/mailman/listinfo/koha
>>
>


-- 


*Muhammad Arshad Iqbal*
Assistant Librarian at Publishing and Student Affairs Directorate,
National University of Science and Technology (NUST) Islamabad.
Phone number:051-90851371
Cell no.+923444900809
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] Renew Report

2018-04-23 Thread Jonathan Druart
Hello Arshad,

The renew information is in the same tables issues/old_issues, there are
lastreneweddate and renewals.

Note that asking the question only once is enough :)

Regards,
Jonathan

On Mon, 23 Apr 2018 at 10:47 Arshad Iqbal  wrote:

> Hi,
> I want to convert this checked in sql report into renew sql report. How i
> can convert this report. guide me.
>
> SELECT b.title, b.author, i.itemcallnumber, i.barcode, c.returndate
> FROM (SELECT iss.returndate, iss.itemnumber FROM issues iss,
> (SELECT @StartDate:=<>,@EndDate:=< (-mm-dd)|date>>) AS var
> WHERE date(iss.returndate) BETWEEN @StartDate AND @EndDate UNION ALL
> SELECT oi.returndate, oi.itemnumber FROM old_issues oi WHERE
> date(oi.returndate)
> BETWEEN @StartDate AND @EndDate) AS c
> LEFT JOIN items i USING (itemnumber)
> LEFT JOIN biblio b USING (biblionumber)
> WHERE i.homebranch=<>
>
> --
>
>
> *Muhammad Arshad Iqbal*
> Assistant Librarian at Publishing and Student Affairs Directorate,
> National University of Science and Technology (NUST) Islamabad.
> ___
> Koha mailing list  http://koha-community.org
> Koha@lists.katipo.co.nz
> https://lists.katipo.co.nz/mailman/listinfo/koha
>
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha