How to find same values in 1 column???

TITLE AUTHOR_NUM
A Deepness in the Sky 3
Magic Terror 5
The Stranger 18
Venice 11
Second Wind 4
The Edge 4
Dreamcatcher: A Novel 6
Treasure Chests 23
Treasure Chests 25
Beloved 1
Harry Potter and the Prisoner of Azkaban 15
Van Gogh and Gauguin 9
Van Gogh and Gauguin 19
Of Mice and Men 20
Electric Light 17
Group: Six People in Search of a Life 2
Nine Stories 16
The Soul of a New Machine 24
Travels with Charley 20
Catch-22 10
Jazz 1
Band of Brothers 14
A Guide to SQL 7
Franny and Zooey 16
East of Eden 20
Harry Potter and the Goblet of Fire 15
The Fall 18
Godel, Escher, Bach 12
When Rabbit Howls 8
Black House 5
Black House 6
Song of Solomon 1
The Grapes of Wrath 20
Slay Ride 4
The Catcher in the Rye 16
To Kill a Mockingbird 13

List the branch number and names of shops which do not have any books written by Pratt in stock. Order the list by branch number.
how can I code this? if that statement was positive, i would say something like "*where ..... author_last IN ('Pratt')"*
But in this case, how can I do it? i don't think there's a command like "OUT" in SQL :)

Similar Messages

  • How to find default value of a column ?

    hi , alok again,
    i have to find default value of a column.
    Acutally i have found , column's max width, its nullability, precision, scale, type, but NOT default value.
    I will have to use the default value and nullability while validating user's input.
    ResultSetMetaData doesnot contain any method any such method...
    Pls help,
    how can i do so.
    Any idea will be highly appreciated.
    Thanks in adv.
    Alok

    Hi,
    After you get the resultset from DatabaseMetaData.getColumns() as shown by sudha_mp you can use the following columns names to retrieve metadata information:
    Each column description has the following columns:
    TABLE_CAT String => table catalog (may be null)
    TABLE_SCHEM String => table schema (may be null)
    TABLE_NAME String => table name
    COLUMN_NAME String => column name
    DATA_TYPE int => SQL type from java.sql.Types
    TYPE_NAME String => Data source dependent type name, for a UDT the type name is fully qualified
    COLUMN_SIZE int => column size. For char or date types this is the maximum number of characters, for numeric or decimal types this is precision.
    BUFFER_LENGTH is not used.
    DECIMAL_DIGITS int => the number of fractional digits
    NUM_PREC_RADIX int => Radix (typically either 10 or 2)
    NULLABLE int => is NULL allowed.
    columnNoNulls - might not allow NULL values
    columnNullable - definitely allows NULL values
    columnNullableUnknown - nullability unknown
    REMARKS String => comment describing column (may be null)
    COLUMN_DEF String => default value (may be null)
    SQL_DATA_TYPE int => unused
    SQL_DATETIME_SUB int => unused
    CHAR_OCTET_LENGTH int => for char types the maximum number of bytes in the column
    ORDINAL_POSITION int => index of column in table (starting at 1)
    IS_NULLABLE String => "NO" means column definitely does not allow NULL values; "YES" means the column might allow NULL values. An empty string means nobody knows.
    SCOPE_CATLOG String => catalog of table that is the scope of a reference attribute (null if DATA_TYPE isn't REF)
    SCOPE_SCHEMA String => schema of table that is the scope of a reference attribute (null if the DATA_TYPE isn't REF)
    SCOPE_TABLE String => table name that this the scope of a reference attribure (null if the DATA_TYPE isn't REF)
    SOURCE_DATA_TYPE short => source type of a distinct type or user-generated Ref type, SQL type from java.sql.Types (null if DATA_TYPE isn't DISTINCT or user-generated REF)
    Regards,
    bazooka

  • How to find the value of a variable in other program

    How to find the value of a variable in other program say I am in a FM and this FM is being called in from other program and I want to know some of the variable details of the program from the FM itself. Imagine if this is a txn. and I need to know the details from some of the programs while executing the same transaction
    Regards
    Vin

    Hi Vinayak,
         you will be having your first program values in internal table or some variables,
        when you are calling the second program you wii use like this,
        SUBMIT <Second Program Name> USING SELECTION-SCREEN '1000'
                           WITH s_emp(second program select-options)   IN t_emp(first program variables)
                           WITH p_chk   EQ t_chk
                           WITH p_r1    EQ t_r1
                           WITH p_month EQ t_month
                           WITH s_cust1 IN t_cust1
                           WITH p_r2    EQ t_r2
                           WITH s_cust2 IN t_cust2
                           WITH s_week  IN t_week
                           AND RETURN.
    you have pas like this to get your first program details.

  • Finding duplicate values in a column with different values in a different c

    I'm finding duplicate values in a column of my table:
    select ba.CLAIM_NUMBER from bsi_auto_vw ba
    group by ba.CLAIM_NUMBER
    having count(*) > 1;
    How can I modify this query to find duplicate values in that column where I DON'T have duplicate values in a different specific column in that table (the column CLMT_NO in my case can't have duplicates.)?

    Well, you can use analytics assuming you don't mind full scanning the table.....
    select
       count(owner) over (partition by object_type),    
       count(object_type) over (partition by owner)
    from all_objects;You just need to intelligently (i didn't here) find your "window" (partition clause) to sort the data over, then make use of that (the analytics would be in a nested SQL and you'd then evaluate it in outside).
    Should be applicable if i understand what you're after.
    If you post some sample data we can mock up a SQL statement for you (if what i tried to convey wasn't understandable).

  • How to set default values for boolean columns

    I'm trying to deploy some content types and columns into a site with a feature. All it's ok, except that I'm trying to set a default value for boolean columns with no success.
    I've tried to set default value at column level:
    <Field ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DisplayName="Se publican noticias en español"
    Type="Boolean" Hidden="FALSE" Group="Columnas ShaCon" >
    <Default>TRUE</Default>
    </Field>
    and at content type level:
    <FieldRef ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DefaultValue="TRUE" Required="TRUE" />
    But in any case, when i create a new item with this content type, default value is applied.
    Can anyone tell how to set default values for boolean columns?
    Thanks in advance,
    Regards,
    Sergio

    In the field definition you can set
    <Default>1</Default>
    or
    <Default>0</Default>
    How to set the default value Null?

  • How to display the value of a column in a chart at the top of each column

    How to display the value of each column in a chart at the top of each column?

    Like this?
    Done using chart Inspector.
    For details, see Chapter 7,  Creating Charts from Numerical Data in the Numbers '09 User Guide. The guide may be downloaded via the Help menu in Numbers.
    Regards,
    Barry

  • How to find report values using report writer

    hi,
    Please help me.
    How to find report values using report writer
    Regards,
    RRK.
    Edited by: Alvaro Tejada Galindo on Feb 6, 2008 12:01 PM

    Thanks all for the reply.
    I am trying to solve a problem where report parameter value that is set at Management Console is wiped out after calling replaceConnection.
    databaseController.replaceConnection(oldConnectionInfo, newConnectionInfo,
    null,DBOptions._doNotVerifyDB);
    We have to support changing database connection from a java utility
    class. But once replaceConnection is called all existing static parameter values are lost. To fix this issue we thought of getting parameters and values before calling replaceConnection and setting it after replaceConnection.
    Version is CS2008 SP3 - version 12.3.0.601
    If there is any other option of fixing the original wipe out issue?
    ParameterValues.getValues() didn't return value. I will try ParameterValues.getCurrentCalues() but the document says ParameterValues.getValues() is  equivalent to the IParameterField.getCurrentValues() method  unless it is empty, in which case it is equivalent  to the IParameterField.getDefaultValues() method.
    So getCurrentValues() may not work.

  • How to use Special value set with Column clause to display addtional column

    hi
    can anyone tell me
    How to use Special value set with Column clause to display addtional column
    how can i use FND POPID and with COLUMN clause ?

    Dear Yaseen,
                To get the value in formula cumulative,after you have created the formula for that particular key figure,go to edit and click on tab "calculations".
    In that select overall result as 'count all values not equal to zero' and single result as 'count all values not equal to zero' .
    And mark the cumulative check box underneath.
    I hope you get the desired result and please do me favour .
    Sumit goomber

  • How to find the Values of SAP Gateway Server Host  and Gateway Service Valu

    Hi All,
    I installed SAPR/3 4.7 EE on Windows. For configuring SLD and LDAP i am unable to give the SAP Gateway Server Host and Gateway Service values.
    Can any one plz suggest me how to find these values.
    Regds
    Phanikumar

    Hello, SAP Gateway Server Host and Gateway Service are used to set up rfc connectivity, that is the host name and the system number where your sld and ldap is responding, if you have no sld and no ldap , just simply uncheck that options while installing.
    Have a nice week end, Luciano.

  • How to insert varchar2 value in timestamp column in table?

    Hi all,
    Hope doing well,
    sir i am using one stored procedure and storing time in varchar2 variable in this format: 08:00:00
    now i have to insert this value in timestamp column in table. how to insert this value in timestamp column?
    thanks

    952646 wrote:
    Hi all,
    Hope doing well,
    sir i am using one stored procedure and storing time in varchar2 variable A "Very Bad Idea"(tm)
    When you do this, there is no fundamental difference between "08:00:00" and "here's your sign".
    Data should always be stored in the correct data type. For dates and times, that data type is either DATE or TIMESTAMP. Period.
    in this format: 08:00:00
    now i have to insert this value in timestamp column in table. how to insert this value in timestamp column?
    Hopefully as remediation to the original bad design.
    thanks

  • How to find these values fall in what time?

    Post Author: newcruser
    CA Forum: General
    From 9 AM to 5 PM time range..how to find these values fall where?.
    Is that done using group selection method?.  Please give me idea and direction
    UserId   Type      login                               logout1           1          2008-04-13 09:30:42         2008-04-13 10:30:122           2          2008-04-13 09:30:12         2008-04-13 11:00:323           1          2008-04-13 10:30:32         2008-04-13 12:56:234           2          2008-04-13 10:30:42         2008-04-13 12:00:345           2          2008-04-13 11:30:34         2008-04-13 13:40:236           1          2008-04-13 12:30:43         2008-04-13 13:00:437           1          2008-04-13 13:20:43         2008-04-13 14:45:218           2          2008-04-13 14:30:42         2008-04-13 15:15:599           1          2008-04-13 15:00:42         2008-04-13 16:30:4210         1          2008-04-13 16:20:42         2008-04-13 17:00:00

    Post Author: newcruser
    CA Forum: General
    In my case minimum (login) time changes and maximum(logout) time changes everyday.
    I want to create from minimum (login) to  maximum(logout) for every hour, how many people are online. How to do?.
    UserId          login                               logout1           2008-04-13 09:30:42         2008-04-13 10:30:122           2008-04-13 09:30:12         2008-04-13 11:00:323           2008-04-13 10:30:32         2008-04-13 12:56:234           2008-04-13 10:30:42         2008-04-13 12:00:345           2008-04-13 11:30:34         2008-04-13 13:40:236           2008-04-13 12:30:43         2008-04-13 13:00:437           2008-04-13 13:20:43         2008-04-13 14:45:218           2008-04-13 14:30:42         2008-04-13 15:15:599           2008-04-13 15:00:42         2008-04-13 16:30:4210         2008-04-13 16:20:42         2008-04-13 17:00:00
    i found minimum (login) and maximum(logout) using below formula. Now i want to find every hour from minimum (login) to maximum(logout) , so i can use each hour value in formula to calculate how many people are online for that particular time. How to do that?.
    @Minimum
    DatePart("h",(Minimum ()))
    @Maximum
    DatePart("h",(Maximum()))

  • Finding the same value in different columns

    Hello,
    I am trying to figure out how I would go about finding the same value in the same row but in different columns. For example, in the table sometimes the report name is the same as the description. I would like to find all of the rows where this is the case.
    Thanks
    Report name
    Description
    Date
    Time
    Report 1
    Report 1
    dddd
    tttt
    Report 2
    Billing Report
    dddd
    tttt
    Report 3
    Report 3
    dddd
    tttt

    Hi,
    Is this what you want?
    SELECT  *       -- or whatever columns you want
    FROM    table_x
    WHERE   report_name = description
    If not, post  a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • "How to get distinct values of sharepoint column using SSRS"

    Hi,
        I have integrated sharepoint list data to SQL Server reporting services. I am using the below to query sharepoint list data using sql reporting services.
    <Query>
       <SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetListItems</SoapAction>
       <Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetListItems">
          <Parameters>
             <Parameter Name="listName">
                <DefaultValue>{GUID of list}</DefaultValue>
             </Parameter>
             <Parameter Name="viewName">
                <DefaultValue>{GUID of listview}</DefaultValue>
             </Parameter>
             <Parameter Name="rowLimit">
                <DefaultValue>9999</DefaultValue>
             </Parameter>           
          </Parameters>
       </Method>  
    <ElementPath IgnoreNamespaces="True">*</ElementPath>
    </Query>
    By using this query, I am getting a dataset which includes all the columns of sharepoint list. Among these columns, I wanted to display only 2 columns (i.e Region and Sales type) using chart. I have created a Region parameter but when I click preview, the drop down box is giving me all the repeatative values of region like RG1,RG1,RG1,RG2,RG2,RG2,RG2,RG3.......... I wanted to display only distinct values of Region parameter so that whenever end user select region from the parameter drop down, it will display the respective value of Sales type column.
    Also when I select only RG1 parameter, it is giving me a chart including the sales type of all the Regions. (it should display me only the sales type of RG1) How can I link these 2 columns so that they will display the values respectively.
              I would really appreciate if anyone can help me out with this.
    Thanks,
    Sam.

    Hi Sam,
    By code, the CAML language doesn’t have any reserved word (or tag) to set this particular filter to remove duplicate results.
    In this case, we could use the custom code to get distinct records.
    Here are the detailed steps:
    1.         Create a hidden parameter that gets all the records in one field.
    Note: Please create another dataset that is same of the main dataset. This dataset is used for the parameter.
    2.         Create a function that used to remove the duplicate records.
    Here is the code:
    Public Shared Function RemoveDups(ByVal items As String) As String
    Dim noDups As New System.Collections.ArrayList()
    Dim SpStr
    SpStr = Split(items ,",")
    For i As Integer=0 To Ubound(Spstr)
    If Not noDups.Contains(SpStr(i).Trim()) Then
    noDups.Add(SpStr(i).Trim())
    End If
    Next
    Dim uniqueItems As String() = New String(noDups.Count-1){}
    noDups.CopyTo(uniqueItems)
    Return String.Join(",", uniqueItems)
    End Function
    3.         Create another parameter that will be used for filtering the maindata.
    Please set the available value to be =Split(Code.RemoveDups(JOIN(Parameters!ISSUE_STATUS_TEMP.Value, ",")), ",")
    And the default value to be the value you what such as the first value:
    =Split(Code.RemoveDups(JOIN(Parameters!ISSUE_STATUS_TEMP.Value, ",")), ",").(0)
    4.         Go to the main dataset. Open the property window of this dataset.
    5.         In the “Filters” tab, set the filter to be:
    Expression: <The field to be filter>
    Operator: =
    Value: =Parameters!Region.Value
    The parameter “Region” should be the parameter we created in the step3.
    Now, we should get distinct values of SharePoint columns.
    If there is anything unclear, please feel free to ask.
    Thanks,
    Jin
    Jin Chen - MSFT

  • How to find max based on 2 columns.

    Hi I have a table where I have two numeric fields (date and time) )(thouse field are not date time format but numeric)
    Column A represents date and column B represent time.
    How would I find max value of column A and with results for A find Max for B.
    example
    A - - - - - - - - - -B
    101010 - - - - - 202020
    101011 - - - - - 202021
    101012 - - - - - 202021
    101010 - - - - - 202022
    101012 - - - - - 202020
    What I looking for is
    A - - - - - - - - - - B
    101012 - - - - - 202021
    Thanks

    You can try one of the following...
    sql> select * from temp;
             A          B
        101010     202020
        101011     202021
        101012     202021
        101010     202022
        101012     202020
      1  select a,b from (
      2     select a,
      3            b,
      4            rank () over (order by a desc, b desc) rnk
      5       from temp
      6* ) where rnk = 1
    sql> /
             A          B
        101012     202021
      1  select a,b from (
      2    select a,b from temp
      3       order by a desc, b desc
      4* ) where rownum = 1
    sql> /
             A          B
        101012     202021Please try to provide create table statements and insert data scripts instead of "select * from table".
    It helps creating your case easier.

  • How to find the new tables and columns in a schema

    hi..good morning to all...
    I have a schema ABC which owns some objects.
    Now some days before I have made another schema XYZ which was a replica of ABC schema.
    between these days some new tables, new columns in the existing tables(with or without default value), comments on the columns are being added in the new schema i.e XYZ schema.
    Now I have to find the extra things which are present in the new schema. I need to find the new tables, new columns in hte existing tables, their default values and descriptions of those.
    Can u plss help me how can I find it?
    I am guessing that I have to write a SQL query with a minus clause but I am not able to write it and also dont know where should I execute it.
    plss help. thanks in advance.

    And moreover, when I am executing the query to get the desired result, then it is throwing "illegal use of long datatype" error and pointing to the b.data_default area of my query..
    select a.table_name, a.column_name, b.data_default, a.comments from all_col_comments a, dba_tab_columns b
    where a.TABLE_NAME=b.TABLE_NAME
    and a.OWNER=b.OWNER
    and a.OWNER=XYZ
    minus
    select c.table_name, c.column_name, d.data_default, c.comments from all_col_comments c, dba_tab_columns d
    where c.TABLE_NAME=d.TABLE_NAME
    and c.OWNER=d.OWNER
    and c.OWNER='ABC'
    order by 1, 2;
    plss help...

Maybe you are looking for

  • CQ5 server performance is very slow ?

    Hello, I deployed my project on publish server, but both the server responding very slow, Is it the CQ5 server the very slow? Please let me know how to make more faster performance of CQ5 server, please let me know is there any configration we have t

  • How Do I Put my Music File to iTunes Library?

    I already downloaded mp3 music from a website..how do I put it inside iTunes so I can put it into my iPhone? Also how can I make that song into my ringtone? Someone please tell me step by step instruction.

  • Transferring music from iPhone to MacBook

    I have recently downloaded some new albums on my iPhone, however when I tried to transfer them to my MacBook there was a problem with my internet connection and as a result a majority of the songs haven't transferred. At the moment all of the songs t

  • How to use generic webservice methods in java

    Hi, I am working on jdk1.5 and axis web service client version 1.3. I am calling webservice which developed in wcf service using .net ,Extesion like .svc?asmx input of webservice method is generic like list<IEmployee> When i try to call in cleint sid

  • DeskJet All in One printer cartridge compatibility

    Hi there. I hope you can help me. So my dad gave me this wonderful printer, the DeskJet 2544 all in one. Unfortunately, the tri. Color cartridge ran out. I was about to shop online on the HP website but there was no 301 tri color CH562E like the one