A query for barrow books

Hi,
I have a table that shows the people who have barrowed a book :
book_id     user_id     date_barrowed     date_returned
16     340     01/05/1998     05/05/1998
16     340     20/02/2007     25/02/2007
17     340     01/05/1998     05/10/1998
17     450     04/12/1998     
23     500     20/02/2007     25/02/2007
65     510     18/03/2008     
76     7540     05/07/2008     10/07/2008How can I query those who have presently barrowed a book that they have already barrowed before ?
Thank you.

Pls., re-post your SQL and PL/SQL doubts in PL/SQL
Regards,
Sabdar Syed.

Similar Messages

  • Finding std query for Time booking report in BW

    Hello,
      Time booking for service engineers are done in CRM Service. Need to furnish report on this time booking in BI portal.Can anyone help me in finding std. query built in BI on time booking.
    Regards
    Devika.S

    Hi gabbeta,
    not sure, but I try:
    1) you want in single columns values <4 or <8...:
    You can use Formula with boolean operator '<'. It gives you as feed-back 1 or 0 if corresponding to the operator.
    2) you want single columns for single values of Priority:
    You create a set of Restricted Key Figures with the corresponding value of Priority.
    3) you can combine previous settings if you need both situation: Restricted Key Figure and values greater or less then 4, 8, 12.
    Ciao.
    Riccardo.

  • Query for orders booked in last 30 minutes

    Hi all
    Can you please help me with query. I need info about all orders booked in last 30 minutes.
    Thanks

    Can you give me the query
    i know if it orders booked in last one day booked_date>sysdate-1. But how about minutes.

  • Erro while running query for a Scheduled work book

    The following error found while running query for a schedule workbook:
    ORA-12801: Error signaled in parallel query server P000
    ORA-01652: uable to extend temp segment by 14720 in tablespace SYSTEM
    ORA-27068: skgfdisp: buffer is not aligned properly
    OSD-04005: SetFilePointer() failure, unable to read it from file
    We are using discoverer 4.1.
    Any help is highly appreciated.
    null

    Candi,
    Have your DBA check for trace file and contact Oracle Support: RDBMS group to track these errors down...
    Chris
    null

  • Multiple authors for a Book

    In the below example, the book titled 'Collapse of the Dollar' has multiple authors.
    create table books
    (surrId number(5),
    book_id number(7),
    isbn number (10),
    title varchar2(100) ,
    Author varchar2(100)
    insert into books values (1, 457, 8478, 'Perilous Power' , 'Noam Chomsky');
    insert into books values (2, 458, 2345, 'Macbeth' , 'Shakespeare');
    insert into books values (3, 459, 6789, 'Collapse of the Dollar' , 'James Turk');
    insert into books values (4, 459, 6789, 'Collapse of the Dollar' , 'John Rubino');
    col title format a35
    col author format a15
    col title format a15
    set lines 200
    SQL> select * from books;
        SURRID    BOOK_ID       ISBN TITLE                               AUTHOR
             1        457       8478 Perilous Power                      Noam Chomsky
             2        458       2345 Macbeth                             Shakespeare
             3        459       6789 Collapse of the Dollar              James Turk
             4        459       6789 Collapse of the Dollar              John RubinoI need to write a query whiich returns book details but it should identify records (ie. Titles) with multiple authors and return the record with Authors separated with pipe ('|') like (no need of SURRID column )
    expected output
          -- no need to retrieve surrogate ID
      BOOK_ID       ISBN TITLE                               AUTHOR
          457       8478 Perilous Power                      Noam Chomsky
          458       2345 Macbeth                             Shakespeare
          459       6789 Collapse of the Dollar              James Turk|John Rubino
          Related question on the above Table design (Create table DDL shown above):
    A table storing book details can only be designed like above. Right ? I mean, the duplication of records for one book because of multiple authors cannot be avoided. Right ?
    One wonders how Amazon has desined its books table :)

    Hi,
    Pete_Sg1 wrote:
    I need to write a query whiich returns book details but it should identify records (ie. Titles) with multiple authors and return the record with Authors separated with pipe ('|') like (no need of SURRID column )Get there : {message:id=9360005}
    and scroll down to "string aggregation"
    Pete_Sg1 wrote:
    A table storing book details can only be designed like above. Right ? I mean, the duplication of records for one book because of multiple authors cannot be avoided. Right ? I would have had a table for books, and a separate one for authors, and a 3rd one for their relations :
    create table books
    book_id integer,
    title varchar2(100),
    etc...
    create table authors
    author_id integer,
    name varchar2(100),
    etc...
    create table book_authors
    book_id integer,
    author_id integer
    );You could also have only 2 tables book and authors (with authors table having a fk column to book_id).
    It would depends if the author is supposed to remain unique throught different books.
    - The 3 tables model would allow a single update on author information to be automatically "propagated" to all book he participed in.
    - The 2 tables model would allow to have different information for each participation of the author to different books (but would certainly "duplicate" part of the data about the author)
    One can also have even more tables to totally avoid data "duplication".

  • How to set product Id for event booking order?

    We take paid bookings for a number of events through the year. Since the event booking information is identical for every event (only the event details change), we have implemented this by embedding the HTML from a standardised web form into each event's details section.
    However, when the event booking is submitted by the customer, Business Catalyst creates a product whose name is constructed as {form name}/{event name} to correspond to this event. This product is referenced in the CRM order for this event that is linked to the customer. This means we get a separate product for each event type.
    The problem is that the product code that is assigned to the event booking product is the ID of the web form that was used to process the event (ie. the form embedded in the event detail). Since we use the same web form for multiple events we are now seeing duplicate product codes.
    I would like to create a common product for all event bookings and pass this product ID when posting the form on submit of the event booking. The reason for a single booking product is to simplify the synchronisation to our accounting system - otherwise we need to create a new product in the accounting system every time we add a new event.
    Is there a query parameter I can include on the form's action URL or as an input field to the form that controls the product ID and / or the product name that will be used for the booking order?
    The only other solution I can think of to solve this challenge is to create a unique web form - event combination for every single event. This is not a great solution due to the unnecessary duplication that this will involve - I would rather re-use a common piece of code.
    Thanks for any help and advice.

    Hello
    If I'm not mistaken, the 'text range' in PowerPoint does not have 'language id' property whereas the 'text range' in Word does.
    Check the terminology dictionary of PowerPoint.
    cf.
    http://www.microsoft.com/mac/developers/default.mspx
    Sorry for the bad news...
    H

  • SQL Query for insertion

    hi
    I got two tables
    BOOK (DDC,TITLE,ISBN,AUTH_NAME)
    AUTHOR (DDC,AUTH_NAME)
    Table "BOOK" contains about 50000 records but its
    AUTH_NAME column contains NULL for all 50000 records.
    I want insert AUTH_NAME column's values from AUTHOR table
    into BOOK's AUTH_NAME column where DDC number match.
    Please write me the query for it.
    thanks

    hi,
    AUTH_NAME column contains NULL for all 50000 records.
    I want insert AUTH_NAME column's values from AUTHOR table
    into BOOK's AUTH_NAME column where DDC number match.As u mentioned above auth_name contains null value, so instead of updatring u can directly insert the records from book table.
    And what are you updating as it contains no data(i.e null value)
    Regards
    Jafar

  • SQL Query for update

    hi experts
    I got two tables
    BOOK (DDC,TITLE,ISBN,AUTH_NAME)
    AUTHOR (ID,DDC,AUTH_NAME)
    AUTH_NAME column in BOOK's table contains NULL for all records.
    I want update table BOOK's column AUTH_NAME from AUTHOR's column in AUTHOR table where DDC numbers match. DDC is not unique in AUTHOR's table. I want to update BOOK table with the first matching AUTH_NAME. Rest should be ignored.
    Please write me the query for it.
    thanks

    Please write me the query for it.This fellow has no questions.
    Please, DO NOT ANNOY HIM with hints and tips, he just wants his answer. ; )
    I suspect it's homework, just another cheating student, earning his OCP.
    He is very anxious to get somebody to do his work, as he has spammed this same questtion on several other Oracle forums:
    http://dba.ipbhost.com/index.php?showtopic=10441
    http://www.dba-village.com/village/dvp_forum.OpenThread?ThreadIdA=32264

  • How to place nulls has last rows.Find query for below problem

    I have a table..MyTable(value number(10))
    select * from Mytable;
    value
    12
    null
    13
    null
    11
    null
    This is the table i have and the records i have...... and i need output like this
    value
    12
    13
    11
    null
    null
    null ..............>ike this i need output for this i use this query i.e
    Query-->select value from mytable where value is not null
    union all
    select value from mytable where value is null
    ------------>and this query gives only one column result i need multiple results like below: i have table with 2 columns like below
    MyTable2(value1 number(10),value2 number(10))
    select * fromMyTable2
    value1 value2
    111 null
    null 201
    112 null
    null 200
    110 null
    this is the table i have......... and i need output like below
    value1 value2
    111 201
    112 200
    110 null
    null null
    null null
    NOTE:: If we use ORDER BY table records order must change, i don't want to change any order....please what is the query for that

    I'm not able to find any sense in your request but it can be done:
    select value1, value2
    from (select value1, rownum rn from
             (select value1 from mytable where value1 is not null
               union all
              select value1 from mytable where value1 is null)
            ) a,
           (select value2, rownum rn from
             (select value2 from mytable where value2 is not null
               union all
              select value2 from mytable where value2 is null)
            ) b
    where a.rn = b.rn;You should study some book about relational databases to understand frst of all what a record is, and then that records in a table are not ordered.
    Max

  • Query for local admins

    What is the query for finding out who all has local admin access on there workstations?

    Here are some examples:
    http://portal.sivarajan.com/2011/09/search-ad-and-list-local-administrator.html
    http://portal.sivarajan.com/2011/10/search-ad-collect-local-admin-group.html
    http://portal.sivarajan.com/2011/04/list-local-administrator-group-members.html
    Santhosh Sivarajan | Houston, TX | www.sivarajan.com
    ITIL,MCITP,MCTS,MCSE (W2K3/W2K/NT4),MCSA(W2K3/W2K/MSG),Network+,CCNA
    Windows Server 2012 Book - Migrating from 2008 to Windows Server 2012
    Blogs: Blogs
    Twitter: Twitter
    LinkedIn: LinkedIn
    Facebook: Facebook
    Microsoft Virtual Academy:
    Microsoft Virtual Academy
    This posting is provided AS IS with no warranties, and confers no rights.

  • Query for void circle

    Hello everyone,
    I am new to oracle spatial. I am working hard to figure out query for void circle. Here is what I want to do. Create first circle with radius using buffer then create another circle with different radius then find void area between these two circles. My best guess (after searching lots of sites and book) I need to use SDO_GEOM.SDO_XOR but it did not work for me for some reasons. Any help will be appreciated.
    Oracle 9.2
    Query definition:
    select p.data from mytable p
    where mdsys.sdo_relate(p.geom,( select SDO_GEOM.SDO_XOR(a.geom,m.diminfo,b.geom,m.diminfo) from ( select sdo_geom.sdo_buffer(p.geom,m.diminfo,2640) from mytable p,user_sdo_geom_metadata m
    where p.data = '3123'and m.table_name = 'mytable_name' ) a, (select sdo_geom.sdo_buffer(p.geom,m.diminfo,5000) from mytable p,user_sdo_geom_metadata m where p.data = '3123'and m.table_name = 'mytable_name') b,user_sdo_geom_metadata m ),'mask = anyinteract querytype=window')='TRUE';
    a - respresents first circle
    b - represents second circle
    Thanks

    About Oracle:
    Oracle9i Enterprise Edition Release 9.2.0.3.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.3.0 - Production
    About SQL/PLUS:
    SQL*Plus: Release 9.2.0.1.0 - Production
    Result from 1st query:
    no rows selected
    Result from 2nd query:
    no rows selected
    I was surprised and sure you also when you saw no results for these sub queries.
    But when I run main queries (which I sent you before) it gave me results but not correct.
    In case you want to see here it is:
    Note: this time I used 100 as a radius for smaller number of results.
    From query1(26 results)
    radius 100
    TAXKEY
    3591428000
    3591412000
    3591427000
    3591411000
    3591437000
    3591436000
    3591420000
    3591435000
    3591419000
    3591434000
    3591418000
    3591433000
    3591417000
    3591432000
    3591416000
    3591431000
    3591415000
    3591430000
    3591414000
    3591429000
    3591413000
    3591438000
    3591422000
    3591421000
    3591439000
    3591423000
    from 2nd query (7 results)
    radius 1, 100
    TAXKEY
    3590265000
    3590266000
    3590267000
    3591426000
    3591425000
    3591440000
    3590268000
    FYI, I am using upper case for user_sdo_metadata entry.
    Thank you for your quick response and looking into it.
    Pratik

  • Multiple sources for address book

    Is there a way to keep different sources for addresses separate and discrete in Address Book? For instance, we have our own addresses from iCloud, but I also have addresses coming from Google Mail. We've worked hard to keep the iCloud ones updated and "clean", whereas the Google Mail ones are a bit messier. Is there a way to keep them distinct when importing/subscribing from Address Book? Or, does all the information end up getting merged?
    Thanks,
    John

    Hi,
    Pete_Sg1 wrote:
    I need to write a query whiich returns book details but it should identify records (ie. Titles) with multiple authors and return the record with Authors separated with pipe ('|') like (no need of SURRID column )Get there : {message:id=9360005}
    and scroll down to "string aggregation"
    Pete_Sg1 wrote:
    A table storing book details can only be designed like above. Right ? I mean, the duplication of records for one book because of multiple authors cannot be avoided. Right ? I would have had a table for books, and a separate one for authors, and a 3rd one for their relations :
    create table books
    book_id integer,
    title varchar2(100),
    etc...
    create table authors
    author_id integer,
    name varchar2(100),
    etc...
    create table book_authors
    book_id integer,
    author_id integer
    );You could also have only 2 tables book and authors (with authors table having a fk column to book_id).
    It would depends if the author is supposed to remain unique throught different books.
    - The 3 tables model would allow a single update on author information to be automatically "propagated" to all book he participed in.
    - The 2 tables model would allow to have different information for each participation of the author to different books (but would certainly "duplicate" part of the data about the author)
    One can also have even more tables to totally avoid data "duplication".

  • Query for fa asset deprication

    HI 2 ALL
    Anybody have query which calculate asset reserve deprication in specific period.
    regards,
    zulqarnain

    Hi zulqarnain,
    from all of your recent queries, i understand that you are not aware of the table names in FA schema and also not sure as to which information is available at what table ....
    You can generate an asset trace from asset module for a particular asset, the output contains all table names with column details that helps all report developers if they are designing an asset related report ...
    Please perform the below steps and review the output ....
    Switch Responsibility to System Administrator
    Navigate to Security > Responsibility > Request
    Select/Query the request group for your Fixed Asset Responsibility (Standard group name is "All Reports and Programs")
    Insert new record/row in the Requests region and select the program name "Generate Asset Trace"
    Save your changes ..
    Switch responsibility to your Fixed Asset Responsibility
    Run the concurrent program "Generate Asset Trace" with the parameter value for Asset book and Asset number
    Check the output (it would generate two ..1st one will contain asset details 2nd one will have SLA/accounting details of the Asset)
    Regards,
    Ivruksha

  • How to use the same POWL query for multiple users

    Hello,
    I have defined a POWL query which executes properly. But if I map the same POWL query to 2 portal users and the 2 portal users try to access the same page simultaneously then it gives an error message to one of the users that
    "Query 'ABC' is already open in another session."
    where 'ABC' is the query name.
    Can you please tell me how to use the same POWL query for multiple users ?
    A fast reply would be highly appreciated.
    Thanks and Regards,
    Sandhya

    Batch processing usually involves using actions you have recorded.  In Action you can insert Path that can be used during processing documents.  Path have some size so you may want to only process document that have the same size.  Look in the Actions Palette fly-out menu for insert path.  It inserts|records the current document work path into the action being worked on and when the action is played it inserts the path into the document as the current work path..

  • How do I add a widget to give a review or star rating for a book at the end of a book in iBooks Author?

    How do I add a widget to give a review or star rating for a book at the end of a book in iBooks Author? You know, how you buy books on iBooks and when you're finished reading it, there's a place where you can give a rating or review right there on the very last page?

    Just supply a link that says 'Review This Book' - use http://itunes.apple.com/linkmaker/ to generate one.

Maybe you are looking for

  • Airport extreme. XP outlook can no longer connect

    Since October My wife and I can no longer connect to our office servers using outlook on PC's via Airport extreme wireless. Both our g5 and g4 have no problems. The PC's indicate excellent signal and status says "connected "thru our VPN connections t

  • Nested tables and varray

    hi friends, i have a question: why do we use nested tables and varrays?

  • Export function locks up Pre Pro

    Hi All, Yesterday all worked well-  I could Export from Pre Pro and generate FLV files.  Today when I try the same thing Pre Pro locks up.  I can use Encore but not Export (to Media-).   When I close Pre Pro via the Start Task Manager a couple of tim

  • Roadmap Ui element

    hai , I have an requirement where in to use the roadmao ui element. I have 3 screens and i need to use the road map in the 3 screens. if it is in the first screen first box in the roadmap shub be highlighted and same with 2nd and 3rd page. can anyone

  • AD sync Error

    Hi, I have a Windows 2012 64bit AD which holds all the 5 FSMO role (call it AD-1) and another AD with Windows 2003 32bit (AD-2).  Originally AD-2 was the main AD that holds the FSMO but all the roles now are transferred to AD-1,  this configuration w