Using the Dollar sign ($) in an implementation of the user-defined function

Hi all

Just a quick question: how would you use a dollar sign ($) in the (Oracle) implementation of a user function? I ask because the table name that I use in the application happens to contain a dollar sign (I$ _FACT_SALES) and post the results I get now, ODI bed the $ as a reference to a variable, the sign $ so my name removed from the table during execution (I_FACT_SALES). Is there something like a backslash or some other character that could be inserted before the $ for him be part of the name of the table?

Any response would be greatly appreciated.

Thank you very much
Marco

You have 3 options:

1.) try using the tablename parameter in the following quotations: ' MY$ TABLE "or maybe MY$ $TABLE using double symbol $
or
2) 2) I found this snippet: odiRef.getInfo (\\u0022DEST_WORK_SCHEMA\\u0022) + \\u0022.\\u0022,\\u0022\\u0022)?. "So on these lines, so that you can use \\u0022 as a symbol.
You can see the similar problem/solution/explanation
Re: Expression regular wierdness - problem with the character $

or
3.) change the prefix work Tables in the topology manager > physical schema > Your_Schema
E$ _, $ CAN, I have$ _ something like ERR_, SRC_, TD4100

Published by: Ace2 on December 2, 2009 09:57

Tags: Business Intelligence

Similar Questions

  • How to use the user defined function in the Update statement

    Hi all

    I wrote under the update statement to update the column based on the return value of function. but it does not work. Could someone help me on this. This function returns a single value for each project.

    Thanks in advance.

    UPDATE dg2. OD_PROJ_LOOKUP_TEMP o
    SET Months_In_Stage_Cnt = Months_In_Stage_Cnt_ret (o.project_id) select the double;


    Thank you
    Deb

    PLS-00231: function 'MONTHS_IN_STAGE_CNT_RET' cannot be used in SQL

    -What is the function that is declared private in a package? If Yes, then it must be public, otherwise the SQL engine cannot be used.

    Published by: Dom Brooks on November 18, 2011 09:43

  • the user-defined function

    Hi, experts,
    I wrote a sql query to get the amount after calculation.

    SELECT A.FORM_NO, C.SKUCODE, B.QUANTITY * (
    CASE WHEN TO_NUMBER(TO_CHAR(A.START_DATE,'YYYY')) = 2008 AND TO_NUMBER(TO_CHAR(A.END_DATE,'YYYY')) = 2008 THEN 
    TO_NUMBER(TO_CHAR(A.END_DATE,'MM')) - TO_NUMBER(TO_CHAR(A.START_DATE,'MM'))  +1 
    WHEN TO_NUMBER(TO_CHAR(A.START_DATE,'YYYY')) = 2008 AND TO_NUMBER(TO_CHAR(A.END_DATE,'YYYY')) > 2008 THEN
    12- TO_NUMBER(TO_CHAR(A.START_DATE,'MM')) + 1
    WHEN TO_NUMBER(TO_CHAR(A.START_DATE,'YYYY')) < 2008 AND TO_NUMBER(TO_CHAR(A.END_DATE,'YYYY')) = 2008 THEN 
    TO_NUMBER(TO_CHAR(A.END_DATE,'MM'))
    WHEN TO_NUMBER(TO_CHAR(A.START_DATE,'YYYY')) < 2008 AND TO_NUMBER(TO_CHAR(A.END_DATE,'YYYY')) > 2008 THEN
    12 ELSE 0 END )/((TO_NUMBER(TO_CHAR(A.END_DATE,'YYYY')) - TO_NUMBER(TO_CHAR(A.START_DATE,'YYYY'))) *12 + TO_NUMBER(TO_CHAR(A.END_DATE,'MM')) - TO_NUMBER(TO_CHAR(A.START_DATE,'MM')) + 1 )
    
    AS QUAN
    FROM FORM_TBL A, QUANTITY_TBL B, SKU_TBL C
    WHERE A.FORMNO = B.FORMNO AND B.SKU = C.SKU;
    It runs correctly, and no error returned.


    I would change for a user-defined function.

    create or replace
    function get_quantity
            (pi_year number, pi_year_diff number, pi_form_no varchar2, pi_skucode varchar2)
            return number is
        po_quantity number;
    begin
        
        
        SELECT ( B.QUANTITY * (
        CASE WHEN TO_NUMBER(TO_CHAR(A.START_DATE,'YYYY')) = (pi_year + pi_year_diff) AND TO_NUMBER(TO_CHAR(A.END_DATE,'YYYY')) = (pi_year + pi_year_diff) THEN 
        TO_NUMBER(TO_CHAR(A.END_DATE,'MM')) - TO_NUMBER(TO_CHAR(A.START_DATE,'MM'))  +1 
        WHEN TO_NUMBER(TO_CHAR(A.START_DATE,'YYYY')) = (pi_year + pi_year_diff) AND TO_NUMBER(TO_CHAR(A.END_DATE,'YYYY')) > (pi_year + pi_year_diff) THEN
        12- TO_NUMBER(TO_CHAR(A.START_DATE,'MM')) + 1
        WHEN TO_NUMBER(TO_CHAR(A.START_DATE,'YYYY')) < (pi_year + pi_year_diff) AND TO_NUMBER(TO_CHAR(A.END_DATE,'YYYY')) = (pi_year + pi_year_diff) THEN 
        TO_NUMBER(TO_CHAR(A.END_DATE,'MM'))
        WHEN TO_NUMBER(TO_CHAR(A.START_DATE,'YYYY')) < (pi_year + pi_year_diff) AND TO_NUMBER(TO_CHAR(A.END_DATE,'YYYY')) > (pi_year + pi_year_diff) THEN
        12 ELSE 0 END )/((TO_NUMBER(TO_CHAR(A.END_DATE,'YYYY')) - TO_NUMBER(TO_CHAR(A.START_DATE,'YYYY'))) *12 + TO_NUMBER(TO_CHAR(A.END_DATE,'MM')) - TO_NUMBER(TO_CHAR(A.START_DATE,'MM')) + 1 ))
        
        into po_quantity
        FROM FORM_TBL A, QUANTITY_TBL B, SKU_TBL C
        WHERE A.FORMNO = B.FORMNO AND B.SKU = C.SKU
        and c.skucode = pi_skucode and a.form_no = pi_form_no;
    return po_quantity;
    end;
    BUT IT CANNOT BE COMPILIED.
    The error is a recursive sql error

    ORA-00604: an error has occurred at the SQL level 1 recursive

    I think that there is no syntax error.

    What is the reason?

    Thank you very much!

    What is your DB version. If you are using 11g then can be consider that

    http://www.DBA-Oracle.com/sf_ora_00604_error_occurred_and_recursive_sql_level_string.htm

  • The user-defined functions...

    Hi all

    Where do we store the functions defined by the user of CF (models) in order so that it can be called by any model of CF? In the Custom Tag folder? In the directory root CF?


    Thanks in advance!

    We re-use our functions across different sites (I think it's what your bet to) using the method 'BlackBox '. I'm sure there are other ways, but this is the norm for society, that I work. For more information, see
    http://www.cfblackbox.com/

    Additional information:
    You can store them anywhere in your site, but you can declare the function once. For example, if you have a page that includes two models. Each of the two models to compose the same model that holds your function. This will cause an error. In addition, if you have the model in a loop, it will cause an error.

  • Problem with the implementation of a user-defined function

    Hello.
    I wonder if you could help create a user function in ODI, which would do exactly the same thing as this one:

    create or replace function Konwersja (psWejscie VARCHAR2) return DATE is
    dDate DATE;
    Start
    dDate: = TO_DATE (psWejscie, ' DD month yyyy ',' NLS_DATE_LANGUAGE = POLISH ');
    RETURN dDate;
    EXCEPTION
    WHILE OTHERS THEN
    RETURNS A NULL VALUE.
    END;

    I tried to put Konwersja (psWejscie VARCHAR2) and Konwersja ($(psWejscie)) in the syntax and the rest in the implementation in Oracle syntax, but when I used it in an interface to load data to a date column (Konwersja (.)) (("" Data_U ")), I got an ORA-00923 exception

    Yes, you can call this function from the DB interface directly. In the interface mapping column say Konwersja () it will work.

  • A query can be passed to the user-defined function?

    Hello
    I created a function that takes one parameter and returns a value. Now tha value that is passed into the function comes also from a query, so can I pass that Charly directly in the parameter?
    I tried this but it is giving error: ORA-00936: lack of expression.
    select ID from table1
    where areaid=f_getAreaID(SELECT sec FROM table2 WHERE artid='3232') and 
    type='p002' 
    Above code is in error. How do I get my requirement?
    Note: Assume that query to the function will always return a value of skis.

    Published by: bootstrap on August 28, 2011 12:13

    Subquery must be enclosed in parentheses. Function parameters must be placed in brackets. Therefore, you should use

    select ID from table1
    where areaid=f_getAreaID((SELECT sec FROM table2 WHERE artid='3232')) and
    type='p002'
    

    Remember, it must be a scalar subquery (subquery returns one or no line).

    SY.

  • User-defined function removes the expression hooks

    Trying to convert this column in a user function expression, however when I apply the function to the user hooks literally disappear.

    1 REGEXP_REPLACE (SRC_IO_PHONES_A.PHONE, ' ({: digit:{3})\.(:digit:{3})\.(:digit:{4})' 1 (\1)-\2-\3'),)

    2 REGEXP_REPLACE (SRC_IO_PHONES_A.PHONE, ' ([[: digit:]] {3})------.) () [[: digit:]] {3}). ([[: digit:]] {4})' 1 (\1)-\2-\3')


    These lines come from the same mapping. One implements the user-defined function and the second line is with I plug the code into the target Expression field.


    Any thoughts on why this is?


    Thank you

    So I thought to it thanks to a post of @oraclebase.  Another friend of mine has indicated that user in ODI functions develops a sort of pseudo-code and it is not really passing commands to the database.  Anyway, my research turned to substitute for the construction of all [: digit:].  This resulted in me find the above post where \d = [0-9].  By replacing all the scoring by \d hooks, the function worked.

  • How not to use the squint no functionality?

    I forgot how not to use the squint no functionality. Can anyone help?

    18.0 Firefox was released last Tuesday, you need to update.

    See if this FAQ for NoSquint answers your questions.

    https://urandom.ca/NoSquint/#FAQ

  • How to use the Print Screen function?

    I've seen various descriptions of how to use the print screen function.

    It would be nice to actually tell one that works.  None have worked for me.

    [Fn] and Prt SCr does not work.

    CTRL and Prt SCr does not work.

    CTRL, Alt, and Prt SCr does not work.

    [Fn], Ctrl and Prt SCr does not work.

    If anyone knows the correct method to activate the screen capture function which would be a good thing.

    From the looks of things, HP has a big problem with this function.

    Here's a microsoft articleon the use of the screenshot function.

    This should answer your questions.

    Thanks for taking a peek.

  • How to use the user with event loop event

    Hello

    I want to communicate between 2 VI, so I have a global variable (boolean) who gives the order to an event tool to run. The problem comes from the fact that event loop accepts no global variable, I found on the forum that I can use the user event. Of course, the second VI works normally when I push the button (boolean) in there to run the event loop. Please can someone explain me how to do this, I am a chemist.

    Thank you.

    You enter the receiver structure of event for the event you want to receive.

    To do this in two screws, you will have to share the user between them event reference.

  • IM 10 atm installation initiated Preview and I want to know: is it easy to use the dual-boot functionality, if I have 2 hard drives

    Hello!

    IM 10 atm installation initiated Preview and I want to know: is it easy to use the dual-boot functionality, if I have 2 hard drives? I have win7 on my main drive (SSD) and I want to install 10 preview initiated a new partition on my 500 GB hard drive, I created. I'll have to change smth in the bios menu, or I will be asked to choose between win7 and win10 in a menu after boot?

    Yes, it's, it's just like installing Windows on another partition.

    To learn more:

    http://answers.Microsoft.com/en-us/Insider/wiki/insider_wintp-insider_install/how-to-dual-boot-the-latest-Windows-build-with/9695dfc7-1C13-4D8D-B10B-587e78c6ac36

  • I added the user name to log on to the computer in the active directory after adding, I can't connect to the internal application by using the user name and password...

    Hello

    I added the user name to log on to the computer in the active directory after adding, I can't connect to the internal application by using the user name and password...

    Please give the solution

    What happens when you try to connect?

    If you are able to connect using the different account, try running gpupdate/force.

    If the problem persists, you can open the discussion on:

    http://social.technet.Microsoft.com/forums/Windows/en-us/home

    What is responsible technical issues forum.

  • Why I can't use the nested aggregate function?

    Hello Experts,

    Why I can't use the nested aggregate function? There is not an ora-00979 group by error of expression.

    Oracle Database 11 g Release 11.2.0.4.0 - 64 bit Production

    Select

       SUM (BOX WHEN (KSD_CREATEDATE BETWEEN TRUNC((KSD_CREATEDATE)) AND TRUNC(MIN(KSD_CREATEDATE)) +60) THEN 1  ELSE 0 END) AS col

    DE TABLE_3_4

    GROUP BY STC_FIRMANO

    Thank you

    GROUP BY will manage the SUM function, but the MIN is used incorrectly - use another SELECTION to get it, or work with only with a single line. Otherwise, you could do WITH... get the SUM of SELECT MIN...

  • Problem opening pdf files.  I have Acrobat Reader DC/Windows by default, but when I click on the file, a file conversion screen with all these codes. Must use the "open with" function which is a nuisance.  Why it will not default?

    Problem opening pdf files.  I have Acrobat DC/Windows by default, but when I click on the file, a file conversion screen now with all these language codes. Must use the "open with" function which is a nuisance.

    Why it will not open by default when I click on the file?

    Hello

    I guess that you are looking for this:

    Open drive

    Go in Edition > Preferences > General

    Uncheck the option, the online storage see the opening of the files

    Click OK and restart

    Thank you

    Abhishek

  • I used the text tool function more than the reminder function, how do I get it back?

    I used the text tool function more than the reminder function, how do I get it back?

    Hi Slate7Berta,

    Please use Adobe acrobat reader DC Acrobat Reader DC Learn & support instead of touch Adobe, there seems to be a compatibility issue.

    Kind regards

    Nicos

Maybe you are looking for

  • Opening to Lightroom

    What is the best resource for clear instructions on how to export the contents of opening to Lightroom safely? It's time...

  • Error loading message

    I have Windows Vista Home Premium.  When I log on my computer I got a message that says Error loading \AppData\Local\Temp\sshnas21.dll C:\Users\ (myname) The specified module could not be found. It also opens a small window semi say the Web page coul

  • BlackBerry Smartphones Gmail stopped last night synchronization?

    Hello world: My Gmail accounts and contacts ceased sync on my storm last night. I don't know exactly when, but I wouldn't change a thing on my phone cause this result. I rebooted by phone and a Bing icon popped up.  It was new. I can send email Gmail

  • Everybody how they got this color effect to this photo?

    I tried various options but do not come up with something really close. Should the image in the background be black and white? Thank you very much!

  • Print dialog box appears empty

    HelloI installed Adobe Acrobat Reader (free) DC and Adobre Acrobat X Pro (with license).On two cases that I can't print because when I click on the print dialog box icon goes empty. It reads as follows:The software Adobe Acrobat Reader DC:Adobe Acrob