Join columns of different data types

Can i join two columns of different data types in a single statement. Is there any cast or convert statement
SELECT B~PARTNER AS RESP_GROUP
FROM BUT000 AS B
INNER JOIN CRMV_LINKPARTNER AS C ON BPARTNER_GUID = CPARTNER_NO.
Here PARTNER_GUID is Raw 16 and PARTNER_NO is Char 32, the query is not returning any rows.
Thanks
Akila.R

Hi!
Basically we can say, you can't join them, but you might try this way:
SELECT B~PARTNER AS RESP_GROUP
FROM BUT000 AS B
INNER JOIN CRMV_LINKPARTNER AS C ON BPARTNER_GUID = CPARTNER_NO(16).   "add
(16)
Or an other version
C~PARTNER_NO+16(16)   "depends on, where is the real number stored
Regards
Tamá

Similar Messages

  • Saving cluster of different data types to a file

    Hi,
    I use LV 8.6 SDK. I need to save clusters of different data types to a file on a disk, row by row.
    To be specific: I have a program that performs various investigations on a signal collected by DAQmx. Each time the quality of the signal is not in a specified boundaries, i get an indication. It is a cluster of time stamp, string, dbl, and Boolean. The program is supposed to run for few weeks in a row so there can be a lot of these indications. I expect to have around 200 000 rows a week (Altogether, divided into several groups).  
    I thought about TDMS but I am not able to save such a cluster. And I would like to save it as tdms cause i could divide the data to different groups. I also thought about data base but that would be the first time i use db and I really do not  have time to learn that now.
    I know it is possible to change some of the data types to others, ex Boolean to 0-1, but i need a string and a time stamp there. 
    Can someone advise me which data format should I use? Which one is the best one in this situation?
    Thanks in advance
    handre

    If you do not need to access data from another application (other than Labview) you can just save it as a binary file.
    It is the best choice (for me).
    I made an example with one cluster. You can replace that with an array of clusters, of that data type.
    Attachments:
    Example_VI_BD.png ‏2 KB

  • Store values of different data types into single database field

    Hi Friends,
      I  have to store values of different data types(character, numeric, date, time,  text, etc) into a single database field(Char 80). Then read the same values and display it into ABAP Webdynpro report. 
    Appreciate any ideas, examples, suggestions.
    Thanks
    JB

    Hi,
    Try like this:
    data: txt1 type string,
          var1(1) type c,
          var2(1) type n,
          var3 like sy-datum,
          var4 like sy-uzeit.
    parameters: a type c,
                b type n,
                c like sy-datum,
                d like sy-uzeit.
    concatenate a b c d into txt1.
    write txt1.
    var1 = txt1+0(1).
    var2 = txt1+1(1).
    var3 = txt1+2(8).
    var4 = txt1+8(8).
    write: / var1,
           / var2,
           / var3,
           / var4.
    Regards,
    Bhaskar

  • How to insert data in a column with uniqueidefier data type

    Guys,
    I need insert data in a column with uniqueidefier data type, when i am trying to that getting error.
    error message says: "Conversion failed when converting from a character string to uniqueidentifier."
    I have data in table a col1,col2,col3,col4 - col3,col4 has datatype as varchar and i am updating table b columns col1,col2 with table a col3 and col4.
    Please guide how to do it.

    Hi,
    Not any String can be convert to uniqueidentifier.
    1. you have to make sure u use a value which is fir to be uniqueidentifier
    2. Use convert or cast in the insert query in order to convert the string into uniqueidentifier
    insert X ... convert(uniqueidentifier, 'string which fit to be convert to uniqueidentifier')
    Please post DDL+DML for more specific help
    DDL = Data Definition Language. In our case that is, CREATE TABLE statements for your tables and other definitions that are needed to understand your tables structure and there for let us to test and reproduce the problem in our server. Without DDL no one
    can execute any query.
    How to get DDL: Right click on the table in Object Explorer and select script table as CREATE. Post these create table scripts here.
    DML = data manipulation language is a family of queries used for manipulating the data it self like: inserting, deleting and updating data. In our case we need some sample data in order to check the query and get result, so we need some indert query for
    sample data.
    If you post a "create query" for the tables and "insert query" with some sample, then we could help you without Assuming/Guessing. There is a reason that DDL is generally asked for and expected when discussing query problems - it helps
    to identify issues, clarify terminology and prevent incorrect assumptions.  Sample data also provides a common point of reference for the discussion. A script that can be used to illustrate or reproduce the issue you have, will encourage others to help.
    [Personal Site] [Blog] [Facebook]

  • Same Input name with different data type cause the reflection exception

    I have a proxy contains couple RFCs. Two RFCs contain an argument named IN_COMPANY_CODE with data type of ZTRE_FX_BUKRSTable. Another RFC contains the same argument name of IN_COMPANY_CODE but hold different data type (String). All RFCs are in the same proxy. Complie and build the application with no issue.
    But when I ran the RFC, it generates the reflection exception below:
    Method SAPProxy1.Z_F_Tre_R_Pre_Trade_Fx can not be reflected. --> There was an error reflecting 'In_Company_Code'. > The XML element named 'IN_5fCOMPANY_--5fCODE' from namespace '' references distinct types System.String and MSTRFOREX.ZTRE_FX_BUKRSTable. Use XML attributes to specify another XML name or namespace for the element or types.
    I realize the conflict introduced by the same name with difference data type. But I would like to know if this is fixable as a bug or if there is any best practice and/or some manual intervention to make it work.

    Please install fix from OSS note 506603. After this, right-click .sapwsdl file and select "Run custom tool".

  • How to add different data types in Linked list?

    The basic idea is that I want to implement a linked list like the one which we generally implement in C. I need to store different data types in a single node. Is it possible to implement like this or I have to implement a linked list for each different data type?

    I have an application program in which there is a form. In this form there are different text fields in which data is to be inserted by the user. These data's will be inserted into the database. I want to hit the database only once. So I need to store these data in a data structure before I insert into the database. I think it will be easy for me to handle the data in a linked list if I can have different data types in a single node.
    Moreover, I think u're not getting my question. This pic will help u.
    http://img522.imageshack.us/img522/4500/sampler.jpg
    I'm not sure about that the code which u have written will have different data types in single node. I have to try that.
    And of course if anyone has any better idea than me, it will be very helpful.

  • Explain me briefly about evaluation order.As per my knowledge it show data type order.but I have different data type in same diemension ex:account- acc_001 is smart list data type.account-ac_002 is percentage.So fot this i will accont dim in evaluation or

    Explain me briefly about evaluation order.As per my knowledge it show data type order.but I have different data type in same dimension ex:account->acc_001 is smart list data type.account-ac_002 is percentage.So fot this i will accont dim in evaluation order.What going can any one explaining brifly ?

    2786712 wrote:
    thanks John for reply.If you dont mine can you explain clearly with example and screenshot.
    @John: You got a task
    Here you go: Hyperion Planning and More...

  • How to list column names and data types for a given table using SQL

    I remember that it is possible to use a select statement to list the column names and data types of databaase tables but forgot how its done. Please help.

    You can select what you need from DBA_TAB_COLUMNS (or ALL_TAB_COLUMNS or USER_TAB_COLUMNS).

  • HTMLDB search on columns defined as data type date

    I have a HTMLDB applications that has a date column in the report. When I search and enter a date, no rows are returned. How do I enter the date in search text so that rows are returned?

    Hi Suresh:
    This is what I would do.
    Here is the demo...Hope this will help.
    BHAVESH@oracle10> create table suresh(created_date date, attribute1 varchar2(20));
    Table created.
    BHAVESH@oracle10> desc suresh
    Name Null? Type
    CREATED_DATE DATE
    ATTRIBUTE1 VARCHAR2(20)
    BHAVESH@oracle10> insert into suresh values (sysdate,to_char(sysdate,'yyyy/mm/dd hh:mm:SS'));
    1 row created.
    BHAVESH@oracle10> insert into suresh values (null,to_char(sysdate,'yyyy/mm/dd hh:mm:SS'));
    1 row created.
    BHAVESH@oracle10> select * from suresh;
    CREATED_DATE ATTRIBUTE1
    01/01/2009 11:24:08 AM 2009/01/01 11:01:08
    2009/01/01 11:01:28
    BHAVESH@oracle10> -- please notice my nls_date_format is mm/dd/yyyy hh:mi:ss AM
    BHAVESH@oracle10> -- which can be changed to anything...use alter session or on windows..using registry..or on server
    BHAVESH@oracle10> -- ....using nls_date_format init parameter.
    BHAVESH@oracle10> alter session set nls_date_format = 'DD-MM-YYYY';
    Session altered.
    BHAVESH@oracle10> select * from suresh;
    CREATED_DA ATTRIBUTE1
    01-01-2009 2009/01/01 11:01:08
    2009/01/01 11:01:28
    BHAVESH@oracle10> -- however, this may not work for you.
    BHAVESH@oracle10> -- so, you can convert the date in the format you want
    BHAVESH@oracle10> select to_char(created_date,'DD-MM-YYYY') as converted_date, ATTRIBUTE1 from suresh;
    CONVERTED_ ATTRIBUTE1
    01-01-2009 2009/01/01 11:01:08
    2009/01/01 11:01:28
    BHAVESH@oracle10> -- now use the decode function
    BHAVESH@oracle10> ed
    Wrote file afiedt.buf
    1* select s.*, to_char(decode(created_date,null,to_date(ATTRIBUTE1,'yyyy/mm/dd hh:mi:ss')),'dd-mm-yyyy') as new_date from suresh s
    BHAVESH@oracle10> /
    CREATED_DA ATTRIBUTE1 NEW_DATE
    01-01-2009 2009/01/01 11:01:08
    2009/01/01 11:01:28 01-01-2009
    If your date format is different under the attribute1 column, then you have to write a PL/SQL function to handle different date formats under the same column of different column!
    THanks
    - Bhavesh

  • Help! Update a column in LONG data type

    I am looking for help on how to update a column with the long data type in a oracle 7.34 table on sun Solaris 2.6.:
    SQL> desc searchengine;
    Name Null? Type
    ENGINE_ID NOT NULL NUMBER(38)
    ENGINEHTML LONG
    SQL> set long 10000
    Then when I run the following update statement I always get the error
    ERROR at line 1:
    ORA-01489: result of string concatenation is too long
    Here is the update statement:
    SQL> update searchengine set enginehtml = '<FORM ACTION="../ndClickMe/pgSearchEng" METHOD="GET" target=_top><TR><TD COLSPAN=2>
    <IMG SRC=/gifs/start/looksmart_websearch.gif width=85 height=25 ALIGN=BOTTOM BORDER=0><BR>
    </TD></TR><TR><TD HEIGHT=20 VALIGN=TOP COLSPAN=2><INPUT TYPE=hidden NAME=URL VALUE=http://www.looksmart.com/r_search>
    <input type=hidden name=search value=0><input type=hidden name=comefrom value="izbx-search">
    <input type=hidden name=isp value=zbx><INPUT NAME=key SIZE="22"><br><center>
    <INPUT TYPE="IMAGE" SRC=/gifs/start/search.gif WIDTH=53 HEIGHT=15 ALIGN=BOTTOM border=0 NAME=search
    value="Search!"><br></center></TD></TR></FORM><FORM name="Go3"><tr><td>
    <SELECT name="select" onChange="dropDown(document.Go3.select.options[Go3.select.selectedIndex].value);">
    <option value="">...or select a category</option>
    <option value="http://www.looksmart.com/eus1/eus53930/r?' &#0124; &#0124; '&' &#0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus53930" target=_top>Automotive</option>
    <option value="http://www.looksmart.com/eus1/eus65300/r?' &#0124; &#0124; '&' &#0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus65300" target=_top>Business</option>
    <option value="http://www.looksmart.com/eus1/eus151538/r?' &#0124; &#0124; '&' &#0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus151538" target=_top>Chat</option>
    <option value="http://www.looksmart.com/eus1/eus53832/r?' &#0124; &#0124; '&' &#0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus53832" target=_top>Computing</option>
    <option value="http://www.looksmart.com/eus1/eus52213/r?' &#0124; &#0124; '&' &#0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus52213" target=_top>Entertainment</option>
    <option value="http://www.looksmart.com/eus1/eus53671/r?' &#0124; &#0124; '&' &#0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus53671" target=_top>Family</option>
    <option value="http://www.looksmart.com/eus1/eus53940/r?' &#0124; &#0124; '&' &#0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus53940" target=_top>Health</option>
    <option value="http://www.looksmart.com/eus1/eus141561/r?' &#0124; &#0124; '&' &#0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus141561" target=_top>Hobbies</option>
    <option value="http://www.looksmart.com/eus1/eus53706/r?' &#0124; &#0124; '&' &#0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus53706" target=_top>Reference</option>
    <option value="http://www.looksmart.com/eus1/eus74544/r?' &#0124; &#0124; '&' &#0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus74544" target=_top>Shopping</option>
    <option value="http://www.looksmart.com/eus1/eus51605/r?' &#0124; &#0124; '&' &#0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus51605" target=_top>Society</option>
    <option value="http://www.looksmart.com/eus1/eus62704/r?' &#0124; &#0124; '&' &#0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus62704" target=_top>Sports</option>
    <option value="http://www.looksmart.com/eus1/eus62920/r?' &#0124; &#0124; '&' & #0124; &#0124; 'izbx' &#0124; &#0124; '&' &#0124; &#0124; 'comefrom=izbx-eus62920" target=_top>Travel</option>
    </select><hr noshade size="1"></td></tr></form>' where engine_id = 0;
    Is there any way to resolve it?
    Thanks,
    Judy

    Yes Prathap, I need to update a single column of type number in the search results table.but each of that column value would be updated with different values like one row in that column will take a value 325 while another will take 500 etc based on user input.
    Your help in this is very much appreciated, Thanks in advance !

  • The priority of different data type conversion

    Hi All,
    I want to know the priority of data type conversion rule. if in an expression, I have several kind of data type( I, P, F,N..).
    Then finaly, all the data object will convert to which data type?
    I don't know the priority of data conversion.
    E.g.   data a type i. data b type p. data c type f.
             a = b + c.
    or    data d type p, data e type f.
          if ( d > f ).
    Then who will convert to who's type?
    Thanks and Regards.
    Aaron

    For expressions, the right term in SAP is "calculation type", it's explained here : [abap help - determining the calculation type|http://help.sap.com/abapdocu_70/en/ABENARITH_TYPE.htm]. SAP takes the "biggest" type of all variables in the expression. It can be I, P or F (smallest is I, biggest is F).
    Conditions are handled differently, just using data type conversion (see link given above by Abhishek), SAP converts from smallest to biggest type (in your case, it converts P to F and compares the two F variables).

  • Dynamic ORDER BY clause - Possible different data types...

    I have a lexical parameter in my ORDER BY clause:
    ORDER BY &P_ORDER_BY
    My problem is that I have to designate this parameter as either a date, character or number, but the user defined column being ordered by could be any one of these. When I designate the parameter as a character type, and a number data type column is chosen, it orders by that value, but it orders it as though it were a character field, referencing the initial digit and not the overall numeric value. If I choose a number parameter type, and a character value is chosen, I get an invalid number error, and so on.
    Anyone have any ideas how I can do this?

    Okay, now we're on the right track. The lexical parameter I'm using allows the user to choose from a list of the columns being retrieved in the SELECT statement, so it will always be one that's in there, as you said. Now, since I don't know which one it's going to be, I can't just make all but one of them 'None' for the break order, BUT, what I intended to do was to add a column to the SELECT statement that would always return the column they chose, and I could put the break order on that column, leaving all the rest 'None'. However, in the past, this has created 2 problems for me.
    1.) As I mentioned in the first post, the column being returned could have a data type of character, number or date, but the parameter must be designated as only one of these. So, if the user chooses to order by a column having a value with a data type other than what the parameter is designated to be, then I get errors, it doesn't order correctly, etc...
    2.) This is the strange, but anytime I've marked all but one column as 'None' for the Break Order, my child data doesn't always stay with the parent. For example, the report is on an IT request database. The 'group fields' consist of data elements that are demographic info.of a request (requester, date requested, description, etc...), and the details for each request list out the comments that have been made in the system for that request. The problem I'm seeing when I set the break orders this way is that each request displays not only its own comments, but it lists out comments for other requests as well, and there doesn't seem to be any logic to which request's comments it lists in addition to its own, it just lists as many as will fit on the page...I don't know if I explained that very well, but that's what's happening.
    Does any of that make sense? Any ideas?

  • Reverse columns with GUID Data type

    Hi All,
    I want to reverse some of the SQL tables in Sunopsis to create the datastores. One column in these SQL tables has GUID data type and when i reverse this table, all other data being properly displayed but the reversed data store is not displaying data under the column.
    I have added GUID data type in topology in Physical Schema but still it is not working.
    Can you please suggest what should I check?
    Thank you so much in advance.
    Monalisa

    For some reason, this sounds like a technical question and not a comment or issue with the documentaiton.
    Can you suggest a more appropriate place to ask your question?

  • Error;invaild number. different data type: how to insert

    In testtable, ID(number(12), amount(number(12))
    Now I want to insert the following record. I got error,a invalid number .
    insert into testtable(id,amount) values('111','9,000.00');
    I think data type is different. amount is number type but '9,000.00' is varchar2.
    How can i insert '9,000.00' to number data type?
    I do insert to_number('9,000.00'). It doesn't work.
    Would you help me for this problem.

    as amount is a number field it will only take data of type number only.so if ue data is not number type u need to convert it to number and insert it.
    however u can select it in the same format(original),using something like this:
    SQL> SELECT ename employee, TO_CHAR(sal, '99,990.99') from emp;
    EMPLOYEE TO_CHAR(SA
    SMITH 800.00
    ALLEN 1,600.00
    WARD 1,250.00
    JONES 2,975.00
    MARTIN 1,250.00
    BLAKE 2,850.00
    CLARK 2,450.00
    SCOTT 3,000.00
    KING 5,000.00
    TURNER 1,500.00
    ADAMS 1,100.00
    EMPLOYEE TO_CHAR(SA
    JAMES 950.00
    FORD 3,000.00
    MILLER 1,300.00
    14 rows selected.

  • UNION for Columns of CLOB data type does not work

    Hi,
    I have two tables Encounter & Encounter_History. They have same columns. One column is of type CLOB. My requirement is to retrieve all the distinct records from both the tables with order by a date column. But problem is, UNION does not work in case of CLOB data type.
    I know it will work if I use UNION ALL, but it returns duplicate records.
    Please give me suggestion, how to solve this problem.
    For example: The following query does not work since column1 is a CLOB data type
    select column1 from table1
    union
    select column1 from table2
    Thanks

    But for sufficiently small clobs you can try:
    michaels>  SELECT TO_CLOB ('abc') cl
      FROM DUAL
    UNION
    SELECT TO_CLOB ('abc')
      FROM DUAL
    Error at line 1
    ORA-00932: inconsistent datatypes: expected - got CLOB
    michaels>  SELECT TO_CHAR (TO_CLOB ('abc')) cl
      FROM DUAL
    UNION
    SELECT TO_CHAR (TO_CLOB ('abc'))
      FROM DUAL
    CL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
    abc                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    1 row selected.

Maybe you are looking for

  • Runtime errors during RFQ creation

    Hello experts, I am trying to create a RFQ for my client. I have provided all necessary information needs to create a RFQ but when I try to execute, I get Runtime error "DYNPRO_NOT_FOUND" Can anyone tell me how can I solve this problem. I belive this

  • Itunes 4.3.3 I cant get it downloaded

    Hey guys for a few weeks I have been searching for a solution  everytime I try to download this update I get the error message Tht software for michaels Iphone was corrupted during the download.   Can someone please  tell me what im  missing         

  • Can OBIEE consume a web service?

    Hello All, As the subject suggests I want to pull in a java report into OBIEE calling a web service. Can this be done? Could you let me know the steps involved? Thanks, Lino

  • Why can't I use bookmark? It says something is wrong.

    I trying to use bookmark.

  • Thinkvanta​ge System Update fails:

    When executing Thinkvantage System Update on Lenovo 8168D5M  (Windows XP Professional) I get error message: ThinkVantage System TvsuCommandLauncher has encountered a problem and needs to close. I have downloaded and reinstalled System Update v3.15.00