How to compare 2 columns with data like...

Hi,
I have to compare 2 columns from 2 different tables the columns contain data like
SELECT CIRCLE FROM RATE_PLAN
OUTPUT
(AP,NAT)
(AS,NAT)
(BH,NAT).
SELECT CIRCLE FROM subscriber_info
(AP,NAT)
(AS,NAT)
(BH,NAT)
but when i put a join on the tables on this column i get the ouput as -0 rows returned
select col1,col2 from rate_plan,subscriber_info
where
rate_plan.CIRCLE=subscriber_info.CIRCLE
HOW DO I COMPARE THE 2 COLUMNS SO THAT I GET MATCHING RECORDS??
NOTE:-DATATYPE OF BOTH THE COLUMNS IS SAME.

Hi,
using SQL*Plus can you cut and paste the result of following commands :set tab off
set trimout on
set trimspool on
desc rate_plan;
SELECT '-'||CIRCLE||'-' c FROM RATE_PLAN ;
desc subscriber_info;
SELECT '-'||CIRCLE||'-' c FROM subscriber_info ;And be sure to use the tags {noformat}{noformat} before and after the pasted output.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • How to add custom columns with BO data from GP to UWL

    Hi
    We have CE 7.1 in our project UWL taskitems only have GP workflow tasks.
    In UWL we can see that by default there are standard columns but now we need to add custom columns with data from ours BO associated to process instance
    For that we need to develop one custom connector for UWL where we can retrieve the values from custom conenctor to UWL.
    Currently our NWDS 7.1 does not have plugins for UWL Connector can anybody tell me where can I download this plugins?
    thanks in advance!
    Regards
    Cristian

    Hi,
    plz refer the following link
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0ee5047-c7a0-2a10-70b7-9557e3e4d440
    Regards
    Manohar

  • How to compare 2 columns in a cross tab

    Hi,
    I need some idea on how to compare 2 columns in a cross tab in Deski.
    Original Table is like this:
    Type..............ID...........Name
    Type1............1............BO1
    Type1............2............BO1
    Type1............3............BO2
    Type2............1............BO7
    Type2............2............ --     
    Type2............3............BO5
    I did Slice and dice to the original table and now it looks like a cross tab
    ......................1..............2............3
    Type1.........BO1....... BO1.......BO2
    Type2.........BO7........--     ...........BO5
    Now I want to compare column 1&2, 1&3 and put these values in new columns after column 3 for Type1 & Type2
    Does anyone has any idea on this?
    Thanks,

    1. Right click your table
    2. Select Calculations -> Count
    3. It will insert a new column. Edit this new column formula and substitute it with thos other formula:
    =If ( <Name> Where (<ID>=1)  = <Name> Where (<ID>=2)  ) Then "Column 1 equal to column 2" Else "They're not Equal"
    4.Put this title in that column's header:
    Column 1 vs Column 2
    5. Repeat steps for comparison between 1 and 3, just that this is the formula you have to use:
    =If ( <Name> Where (<ID>=1)  = <Name> Where (<ID>=3)  ) Then "Column 2 equal to column 3" Else "They're not Equal"
    Note: Apply necessary changes depending on what you need.
    Edited by: PadawanGirl on Jul 4, 2011 10:32 PM

  • How to make text columns with adobe muse

    Hi,How to make text columns with adobe muse (like InDesign)?

    Multiple columns can be acheived with CSS - http://www.w3schools.com/css/css3_multiple_columns.asp
    div
    -moz-column-count:3; /* Firefox */
    -webkit-column-count:3; /* Safari and Chrome */
    column-count:3;
    I'm surprised that Muse does not support text columns yet, but perhaps the custom CSS can be added in style tags on page properties. Haven't tried it, but don't see why it wouldn't work.

  • How to use TRUNC function with dates in Expression Builder in OBIEE.

    Hi There,
    How to use TRUNC function with dates in Expression Builder in OBIEE.
    TRUNC (SYSDATE, 'MM') returns '07/01/2010' where sysdate is '07/15/2010' in SQL. I need to use the same thing in expression builder in BMM layer logical column.
    Thanks in advance

    use this instead:
    TIMESTAMPADD(SQL_TSI_DAY, ( DAYOFMONTH(CURRENT_DATE) * -1) + 1, CURRENT_DATE)

  • How to aggregate a column based date column (for weekly single row)?

    How to aggregate a column based date column (for weekly single row)?

    Hi,
    Consider the below statement for daily bases which is ok
    SELECT ID, DATE, SUM(AMOUNT) FROM TABLE_NAME GROUP BY ID, DATE ORDER BY ID, DATE
    The same like the above statement, I want output on weekly, fortnightly, and monthly bases, How to do this? Need your help...

  • How can i register column with in the query

    hi all
    how can i register column with in the query?

    Thanks.
    In my business one, the column width was registed.
    But I don't know how can I do it.
    So I try to save the query again after change column width.
    Then the query was opend with changed column width.
    Is it right function?
    Is there any way to register the column width?
    It's very troublesome to change column width every time.
    seiichi

  • How to copy Log text (with Date, Time stamp ) User IDfrom BP to Transaction

    Hi Experts,
                     Can someone guide us how  to copy Log text (with Date ,Time & User ID) fron Business partner  (Prospect) to transactions by text detrmination procedure.
    Regards,
    Basavaraj Patil

    save text
    Fill out following parameters of SAVE_TEXT function module:
    HEADER
    TDOBJECT C 10 BUT000
    TDNAME C 70 10 digit BP number
    TDID C 4 Z001
    TDSPRAS C 1 Language
    INSERT = ’X’
    LINES
    TDFORMAT TDLINE
    |
    |testtttttttttttttttttttttttt( Your text)
    I would suggest you to use some other BAPI that would attach your text to BP than SAVE_TEXT.
    If you still wanted to use SAVE_TEXT then first make sure how the TDNAME is generated. It depends on the text determination procedure. For examples, it can be guid of BP, GUID followed by date or time or else the BP number itself.
    Just go to BP transaction, double click on the text pad, it will open you the SAP Script editor. Click on menu GOTO and select Header which will give you info about your TDID, TDOBJECT, TDNAME....
    Hope this helps.

  • How to connect Orcal devsuitehome with data 10g

    How to connect Orcal devsuitehome with data 10g
    can you give me full details coz I really dpress
    full details through Net configuration assistant or where

    Using the appropriate setting in tnsnames.ora file located in your [Forms_Home]\network\admin directory.
    There are some Oracle e-books about configuring the connection using the Oracle Net.. you should consult....
    All info are there....
    Sim

  • Can anybody tell how to compare two documents with two pointers controlled with the same mouse

    can anybody tell how to compare two documents with two pointers controlled with the same mouse ??

    I saw what I need but in a game to find the differences between two photos (two screens, two pointers controlled by one mouse), and I need a program to make the same thing   (compare a chosen files)

  • How i can create table with data

    How i can create table with data from dev to production?

    How i can create table with data
    [url=http://en.wikipedia.org/wiki/Black_Beast_of_Aa
    aaarrrrrrggghhh]from dev to production?
    [url=http://img2.travelblog.org/Photos/3800/14977/t
    /64816-Col-Kurtz-0.jpg]The horror, the
    horror.lol, you gonna scare somebody here.
    Are we helping devil?

  • How to compare all columns in a SELECT with all columns in a Cursor ?

    Hi All,
    I would like to know if something like this is possible in PL/SQL
    I have a cursor CUR1 which is a SELECT * FROM T1.
    And in my loop for every record found in CUR1 I am trying to retrieve its consecutive record in the table T2. Unfortunately T1 and T2 do not have a primary key so there are duplicates. But if I can compare each column of CUR1 with its respective column in T2, I can find the record. But the question is how ?
    So I tried something like this, but of course this is wrong, but hope this would give you an idea of what I trying
    VAR_T2 T2%ROWTYPE;
    CUR_T1 IS SELECT * FROM T1
    LOOP CUR_TI
    SELECT * INTO VAR_T2
    FROM T2 WHERE
    ‘ALL COLUMNS OF T2’ = ALL COLUMNS OF CUR1;
    So is there a easy way to accomplish this. Thank you, AJ

    As Walter says, this is simply an intersect if you are comparing all the columns.
    However, if you really must do it in a slow by slow, PL/SQL loop (no real valid reason why you would though)...
    DECLARE
      VAR_T2 T2%ROWTYPE;
      CUR_T1 IS
        SELECT * FROM T1;
    BEGIN
      FOR i IN CUR_TI
      LOOP
        SELECT * INTO VAR_T2
        FROM T2
        WHERE T2.col1 = i.col1
          AND T2.col2 = i.col2
          AND T2.col3 = i.col3
          AND T2.colN = i.colN;
      END LOOP;
    END;There is no simple mechanism for just saying "compare all the columns", you will have to specify each one individually in the WHERE clause.

  • SQLLDR: How to fill empty columns with specific default data ?

    Hello,
    We are in 11G
    Here is a complete exemple:
    1) The table definition:
    create table IMPORT_PRJ_TIMESHEETS
      RESSOURCE_CODE VARCHAR2(20),
      REFERENCE_DATE VARCHAR2(20),
      STATUS         VARCHAR2(20),
      PROJET_CODE    VARCHAR2(50),
      TACHE_ID       VARCHAR2(100),
      TACHE_DESC     VARCHAR2(250),
      RAF            NUMBER,
      JOUR1          NUMBER,
      JOUR2          NUMBER,
      JOUR3          NUMBER,
      JOUR4          NUMBER,
      JOUR5          NUMBER,
      JOUR6          NUMBER,
      JOUR7          NUMBER,
      IMPORT_DATE    DATE
    );2) the CTL:
    LOAD DATA
    CHARACTERSET WE8ISO8859P1
       APPEND INTO TABLE IMPORT_PRJ_TIMESHEETS
    -- Pour eliminer la ligne d'en-tete
    WHEN PROJET_CODE != 'ID projet'
       FIELDS TERMINATED BY '*-*' OPTIONALLY ENCLOSED BY '"'
    ( RESSOURCE_CODE       CONSTANT '!RESSOURCE_CODE!'
    , REFERENCE_DATE       CONSTANT '!REFERENCE_DATE!'
    , STATUS               CONSTANT '!STATUS!'
    , PROJET_CODE          CHAR
    , TACHE_ID             CHAR
    , TACHE_DESC           CHAR
    , RAF                  CHAR "TO_NUMBER( :RAF, '999G999D99')"
    , JOUR1                CHAR
    , JOUR2                CHAR
    , JOUR3                CHAR
    , JOUR4                CHAR
    , JOUR5                CHAR
    , JOUR6                CHAR
    , JOUR7                CHAR
    , IMPORT_DATE          SYSDATE
    {code}
    3) the datafile :
    {code}
    ID projet*-*ID tâche*-*Tâche/Description*-*RàF*-*lun. 13/07*-*mar. 14/07*-*mer. 15/07*-*jeu. 16/07*-*ven. 17/07*-*sam. 18/07*-*dim. 19/07*-*
    FR-FR-NT2300135*-* *-*GAMMAWEB - Coordination*-*0,00*-* *-* *-* *-*8,00*-*8,00*-* *-* *-*
    *-* *-*Holiday*-* *-* *-*8,00*-* *-* *-* *-* *-* *-*
    *-* *-*Special leave*-* *-*8,00*-* *-* *-* *-* *-* *-* *-*
    *-* *-*Vacation*-* *-* *-* *-*8,00*-* *-* *-* *-* *-*
    {code}
    - As you can see, the datafile delimiter is "*-*" .... there's no pb about this.
    - Also, there are 5 lines in the datafile. Currently, the _*load status*_ is :
       - Line 1 is the header  >>> not loaded, and that's fine with me.
       - Line 2 is successfully loaded
       - Line 3 / Line 4 / Line 5 : are not loaded .. but I need these lines ...
    *What I'd like to get is to successfully load lines 3 to 5 with a default values for the first 3 columns (project/task ID/ task desc)*
    I hope it's clear enough and that you will be able to provide a good answer ..
    Thanks in advance,
      Olivier                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Thanks for your reply ... it was helpful..
    here is the current CTL I use with the datafile above:
    LOAD DATA
    CHARACTERSET WE8ISO8859P1
       APPEND INTO TABLE IMPORT_PRJ_TIMESHEETS
       FIELDS TERMINATED BY '*-*' OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    ( RESSOURCE_CODE       CONSTANT '!RESSOURCE_CODE!'
    , REFERENCE_DATE       CONSTANT '!REFERENCE_DATE!'
    , STATUS               CONSTANT '!STATUS!'
    , PROJET_CODE          CHAR "NVL(:PROJET_CODE, 'INDIRECT')"
    , TACHE_ID             CHAR
    , TACHE_DESC           CHAR
    , RAF                  CHAR "TO_NUMBER( :RAF, '999G999D99')"
    , JOUR1                CHAR
    , JOUR2                CHAR
    , JOUR3                CHAR
    , JOUR4                CHAR
    , JOUR5                CHAR
    , JOUR6                CHAR
    , JOUR7                CHAR
    , IMPORT_DATE          SYSDATE
    {code}
    I have removed line "  WHEN PROJET_CODE != 'ID projet'   "  , because when I use it, because column is NULL .. it doesn't take the NULL into consideration... and as a results, there is only one line loaded, and not the 3 others !
    Now, when I remove line "  WHEN PROJET_CODE != 'ID projet'   " , I get the results that I want (4 lines loaded), BUT a BAD file is created (with the first row, the one that starts with 'ID projet' )   
    I understand that this is normal behaviour with this CTL.
    But would it be possible to not put this 'ID projet' line into the BAD file (so that the directory is not polluted with numerous BAD files)
       I was thinking with something like this :   "  WHEN NVL( PROJET_CODE, 'none') != 'ID projet'  "
           But this doesn't work..
    Do you have any advice to provide ?
    Thanks in advance
      Olivier                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to create a report with data using the Crystal Reports for Java SDK

    Hi,
    How do I create a report with data that can be displayed via the Crystal Report for Java SDK and the Viewers API?
    I am writing my own report designer, and would like to use the Crystal Runtime Engine to display my report in DHTML, PDF, and Excel formats.  I can create my own report through the following code snippet:
    ReportClientDocument boReportClientDocument = new ReportClientDocument();
    boReportClientDocument.newDocument();
    However, I cannot find a way to add data elements to the report without specifying an RPT file.  Is this possible?  I seems like it is since the Eclipse Plug In allows you to specify your database parameters when creating an RPT file.
    is there a way to do this through these packages?
    com.crystaldecisions.sdk.occa.report.data
    com.crystaldecisions.sdk.occa.report.definition
    Am I forced to create a RPT file for the different table and column structures I have? 
    Thank you in advance for any insights.
    Ted Jenney

    Hi Rameez,
    After working through the example code some more, and doing some more research, I remain unable to populate a report with my own data and view the report in a browser.  I realize this is a long post, but there are multiple errors I am receiving, and these are the seemingly essential ones that I am hitting.
    Modeling the Sample code from Create_Report_From_Scratch.zip to add a database table, using the following code:
    <%@ page import="com.crystaldecisions.sdk.occa.report.application.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.data.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.document.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.definition.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.lib.*" %>
    <%@ page import = "com.crystaldecisions.report.web.viewer.*"%>
    <%
    try { 
                ReportClientDocument rcd = new ReportClientDocument();
                rcd.newDocument();
    // Setup the DB connection
                String database_dll = "Sqlsrv32.dll";
                String db = "qa_start_2012";
                String dsn = "SQL Server";
                String userName = "sa";
                String pwd = "sa";
                // Create the DB connection
                ConnectionInfo oConnectionInfo = new ConnectionInfo();
                PropertyBag oPropertyBag1 = oConnectionInfo.getAttributes();
                // Set new table logon properties
                PropertyBag oPropertyBag2 = new PropertyBag();
                oPropertyBag2.put("DSN", dsn);
                oPropertyBag2.put("Data Source", db);
                // Set the connection info objects members
                // 1. Pass the Logon Properties to the main PropertyBag
                // 2. Set the Server Description to the new **System DSN**
                oPropertyBag1.put(PropertyBagHelper.CONNINFO_CRQE_LOGONPROPERTIES, oPropertyBag2);
                oPropertyBag1.put(PropertyBagHelper.CONNINFO_CRQE_SERVERDESCRIPTION, dsn);
                oPropertyBag1.put("Database DLL", database_dll);
                oConnectionInfo.setAttributes(oPropertyBag1);
                oConnectionInfo.setUserName(userName);
                oConnectionInfo.setPassword(pwd);
                // The Kind of connectionInfos is CRQE (Crystal Reports Query Engine).
                oConnectionInfo.setKind(ConnectionInfoKind.CRQE);
    // Add a Database table
              String tableName = "Building";
                Table oTable = new Table();
                oTable.setName(tableName);
                oTable.setConnectionInfo(oConnectionInfo);
                rcd.getDatabaseController().addTable(oTable, null);
        catch(ReportSDKException RsdkEx) {
                out.println(RsdkEx);  
        catch (Exception ex) {
              out.println(ex);  
    %>
    Throws the exception
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: java.lang.NullPointerException---- Error code:-2147467259 Error code name:failed
    There was other sample code on SDN which suggested the following - adding the table after calling table.setDataFields() as in:
              String tableName = "Building";
                String fieldname = "Building_Name";
                Table oTable = new Table();
                oTable.setName(tableName);
                oTable.setAlias(tableName);
                oTable.setQualifiedName(tableName);
                oTable.setDescription(tableName) ;
                Fields fields = new Fields();
                DBField field = new DBField();
                field.setDescription(fieldname);
                field.setHeadingText(fieldname);
                field.setName(fieldname);
                field.setType(FieldValueType.stringField);
                field.setLength(40);
                fields.add(field);
                oTable.setDataFields(fields);
                oTable.setConnectionInfo(oConnectionInfo);
                rcd.getDatabaseController().addTable(oTable, null);
    This code succeeds, but it is not clear how to add that database field to a section.  If I attempt to call the following:
    FieldObject oFieldObject = new FieldObject();
                oFieldObject.setDataSourceName(field.getFormulaForm());
                oFieldObject.setFieldValueType(field.getType());
                // Now add it to the section
                oFieldObject.setLeft(3120);
                oFieldObject.setTop(120);
                oFieldObject.setWidth(1911);
                oFieldObject.setHeight(226);
                rcd.getReportDefController().getReportObjectController().add(oFieldObject, rcd.getReportDefController().getReportDefinition().getDetailArea().getSections().getSection(0), -1);
    Then I get an error (which is not unexpected)
    com.crystaldecisions.sdk.occa.report.lib.ReportDefControllerException: The field was not found.---- Error code:-2147213283 Error code name:invalidFieldObject
    How do I add one of the table.SetDataFields()  to my report to be displayed?
    Are there any other pointers or suggestions you may have?
    Thank you

  • How to compare single value with multiple values

    In my query I have something like this:
    A.SOR_CD=B.SOR_CODE where A and B are 2 different tables. This condition is in the where clause. The column in table A has single values but some values in table B have multiple comma separated values (822, 869, 811, ..).  I want to match this single
    value on the left side with each of the comma separated values. Please let me know how will I be able to do it. The number of comma separated values on the right side may vary.

    Hi MadRad123,
    According to your description, you want to compare single value with multiple values in your query. Right?
    In this scenario, the table B has comma separated values, however those comma separated values are concatenated into a string. So we can use charindex() function to return the index of the table A value. And use this index as condition in
    your where clause. See the sample below:
    CREATE TABLE #temp1(
    ID nvarchar(50),
    Name nvarchar(50))
    INSERT INTO #temp1 VALUES
    ('1','A'),
    ('2','A'),
    ('3','A'),
    ('4','A'),
    ('5','A')
    CREATE TABLE #temp2(
    ID nvarchar(50),
    Name nvarchar(50))
    INSERT INTO #temp2 VALUES
    ('1','a,A'),
    ('2','A,B'),
    ('3','c'),
    ('4','A,C'),
    ('5','d')
    select * from #temp1 a inner join #temp2 b on a.ID=b.ID
    where CHARINDEX(a.Name,b.Name)>0
    The result looks like below:
    Reference:
    CHARINDEX (Transact-SQL)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

Maybe you are looking for