DB built-in function

Happy Friday everyone,
I am newbie in Oracle and I don't really understand Oracle DB built-in function.
I type below sql in sqlplus:
select weeks_look_behind from dual;
and I get result
WEEKS_LOOK_BEHIND
200
Where is result from? Is WEEKS_LOOK_BEHIND same like TIME_DATE? Are they DB system built-in functions?
Many thanks!

I am newbie in Oracle and I don't really understand Oracle DB built-in functionWEEKS_LOOK_BEHIND is not an Oracle built-in function. So it is something written by a developer on your database. You can find out what it does by running this query
select text from user_source
where name = 'WEEKS_LOOK_BEHIND'
order by line
/I'm presuming that the object is in your current schema. If it isn't you will need to track it down by
select owner, object_type from all_objects
where object_name = 'WEEKS_LOOK_BEHIND'
/Cheers, APC
blog: http://radiofreetooting.blogspot.com

Similar Messages

  • How to use a mysql built-in function with dataprovider

    hi.
    I want to use a mysql built-in function, for example, MD5() on a column when updating a table with dataprovider.
    Something like this doesn't work:
    MyDataProviderOne.setValue("tablename.field_name", "MD5('some text')");
    How should it be done?
    thanks.
    Mike.

    hi.
    thanks. this helped, but I'd like to use also different functions, that's why, I'd rather do it by MySQL built-in functions with dataprovider... Is there any way to do that?
    best regards.
    Mike.

  • SSMS 2012: Import XML File to SQL Table - 'value' is not a recognized built-in function name!!??

    Hi all,
    I have the following xml file (books1.xml):
    <bookstore>
    <book>
    <BookID>1</BookID>
    <title>Everyday Italian</title>
    <author>Giada De Laurentiis</author>
    <year>2005</year>
    <price>30.00</price>
    </book>
    <book>
    <BookID>2<BookID>
    <title>Harry Potter</title>
    <author>J K. Rowling</author>
    <year>2005</year>
    <price>29.99</price>
    </book>
    <book>
    <BookID>3<BookID>
    <title>XQuery Kick Start</title>
    <author>James McGovern</author>
    <year>2003</year>
    <price>49.99</price>
    </book>
    <book>
    <BookID>4<BookID>
    <title>Learning XML</title>
    <author>Erik T. Ray</author>
    <year>2003</year>
    <price>39.95</price>
    </book>
    </bookstore>
    In my Microsoft SQL Server 2012 Management Studio, I executed the following SQL Query code:
    --XQuery w3schools example using books1.xml in C:\Temp folder
    ---SQL Query W3books Title
    ---9 March 2015
    USE XML_XQUERY
    GO
    CREATE TABLE W3Books(
    BookID INt Primary Key,
    Title VARCHAR(30));
    INSERT INTO W3Books (BookID, Title)
    SELECT x.book.query('BookID'), value('.', 'INT'),
    x.book.query('title'), value('.', 'VARCHAR(30)')
    FROM (
    SELECT CAST(x AS XML)
    FROM OPENROWSET(
    BULK 'C:\Temp\books1.xml',
    SINGLE_BLOB) AS T(x)
    ) AS T(x)
    CROSS APPLY x.nodes('W3Books/book') AS x(book);
    SELECT BookID, Title
    FROM W3Books;
    I got the following error messages:
    Msg 195, Level 15, State 10, Line 7
    'value' is not a recognized built-in function name.
    Msg 156, Level 15, State 1, Line 16
    Incorrect syntax near the keyword 'AS'.
    I don't know why I got the error of 'value' is not a recognized built-in function name. Please kindly help and tell me what is wrong in my code and how to correct the error.
    Thanks, Scott Chang
    P. S.
    (1) I mimicked the xml file and SQL Qeury code of Import XML File to SQL Table in
    http://pratchev.blogspot.com/2008/11/import-xml-file-to-sql-table.html. The xml file and the code of this sample worked in my SSMS 2012 program.
    (2) I am learning the "CAST" and "CROSS APPLY" in the Create Instances of XML Data of Microsoft MSDN - it is very abstract to me.

    Hi Stan210, Thanks for your nice response.
    I corrected my xml file as you pointed out.
    I made some changes in some code statements of my SQLQueryW3BookTitle.sql as you instructed:
    --XQuery w3schools example using books1.xml in C:\Temp folder
    ---SQL Query W3books Title
    ---10 March 2015
    USE XML_XQUERY
    GO
    CREATE TABLE W3Books(
    BookID INt Primary Key,
    Title VARCHAR(30));
    INSERT INTO W3Books (BookID, Title)
    SELECT x.book.value('/BookID[1]', 'INT'),
    x.book.value('/title[1]', 'VARCHAR(30)')
    FROM (
    SELECT CAST(x AS XML)
    FROM OPENROWSET(
    BULK 'C:\Temp\books1.xml',SINGLE_BLOB) AS T(x)
    ) AS T(x)
    CROSS APPLY x.nodes('bookstore/book') AS x(book);
    SELECT BookID, Title
    FROM W3Books;
    I executed my revised sql and I got the following Message and Results:
    Msg 515, Level 16, State 2, Line 6
    Cannot insert the value NULL into column 'BookID', table 'XML_XQUERY.dbo.W3Books'; column does not allow nulls. INSERT fails.
    The statement has been terminated.
    (0 row(s) affected)
    Results:
    BookID    Title
    I don't know why I just got the names of columns in Results and the "Cannot insert the value NULL into column 'BookID', table 'XML_XQUERY.dbo.W3Books'; column does not allow nulls, insert fails." in Messages.  Please kindly help, advise me
    how to correct the errors and respond again.
    Many Thanks again,
    Scott Chang

  • How to call the built in functions from flex?

    I want to use some of the Built in functions like the twelvesprints.getActivityOwnerId() in flex. From the java example i could make out that we needed to import some classes to do this but was unable to find them for flex.

    You can download the SWC file for Flex Method app here:
    https://sandbox.12sprints.com/FlashMethodLib.swc
    Java samples are located at
    https://streamwork.com/api/Java.zip
    Method exaples are available at:
    https://streamwork.com/api/methods/com.streamwork.hello_world.zip
    https://streamwork.com/api/methods/com.streamwork.constants.zip
    https://streamwork.com/api/methods/com.streamwork.using_arrays.zip
    com.streamwork.testFlash

  • What are the Built-In-Functions in XSLT mapping?

    what are the Built-In-Functions in XSLT mapping?

    hi praveen
    check the below blogs
    XSLT MAPPING                                   
    Step u2013 By u2013 Step Simple Approach for XSLT Mapping                                   
    Step – By – Step Simple Approach for XSLT Mapping                                   
    XSLT mapping for multiple segments of XML                                   
    XSLT mapping for multiple segments of XML                                   
    IF - ELSE IF and XSLT - A Better work around ?                                   
    IF - ELSE IF and XSLT - A Better work around ?                                   
    Calling instance (object) method of ABAP Class into xslt mapping by using SAP: CALL-EXTERNAL                                             
    Calling instance (object) method of ABAP Class into xslt mapping by using SAP: CALL-EXTERNAL                                             
    xpath functions in xslt mapping                                             
    xpath functions in xslt mapping                                             
    Using XSLT Mapping within the J2EE Adapter Framework                                             
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3823 [original link is broken] [original link is broken] [original link is broken]                                             
    EDIFACT to XML - Stylus Studio Solution                                             
    EDIFACT to XML - Stylus Studio Solution                                             
    Running NetWeaver's XSLT processor from XMLSpy                                             
    Running NetWeaver's XSLT processor from XMLSpy                                             
    generic xslt mapping part 1                                             
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1                                             
    generic xslt mapping part 1          part2                                   
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9692eb84-0601-0010-5ca0-923b4fb8674a                                             
    xslt recursive templates                                             
    XSLT: Recursive Templates                                             
    Generating Generic XML / HTML files without using XSLT Mappings                                                       
    Generating Generic XML / HTML files without using XSLT Mappings                                                       
    regards
    kummari

  • List of built-in Functions in SAP system

    Hi,
    I am trying to find the complete list of built-in function available in SAP system. I searched in SAP help but could not find a comprehensive list at all. I am wondering if anyone can help me locate the list.
    Thank you in advance,
    Sunny

    Hi Sunny,
    in my system are already 77.197 transaction codes defined. OK, some are customer development, but on the other hand we are fare away from having all modules installed.
    I'm not sure, if you are looking for all transactions, all function modules, all BAPIs, all interfaces...
    ...but be sure, no one can EVER go through a whole list.
    You have to restrict your search: to a specific topic (e.g. only material master), specific technics (e.g. only IDOCs) - then you can successfully browse through the possibilities.
    Regards,
    Christian

  • List of Built in Functions

    Hi,
    Can anyone tell me how to get list of built in Oracle functions..eg(Sum,Count,Trim,etc)..
    Thanx in adv
    Balajee

    Hi,
    When we install Oracle Discoverer, it loads a table EUL functions which has some built in functions and its parameters, whcih in turn is used by the Report of Dicoverer.so in that line can we have something which loads the built in fiunctions into a table..
    Balajee

  • Built-in functions inside text_io

    I am using text_io to get dir information. When inside the loop built-in functions such as to_date are not working. It is simply ignoring the function. However if I put a simply message box, it works.
    Is there a limitation to using functions inside text_io.
    Also, any code, including message boxes, outside text_io exit loop is ignored. Is there something I can do to fix it?
    Thanks,
    Srikanth

    But if I want to compare 2 dates, I cannot assign it to variables. I need to something like
    If to_date(a) - to_date(b) > 0 then
    else
    end if;
    This is not working inside text_io. Any ideas?
    thanks

  • Built in Function to Populate an access table from an Oracle Table through VB 6.0

    Dear all,
    Is there any built in function in VB 6.0 to populate an access table directly from an oracle table or SQL Server(Assume Both has the same columns & data type).
    (Just like the DoCmd command which can be used to populate an excel sheet directly from an access table).
    Please help.
    Regards
    Sibby.

    Sibby,
    There is no "built-in" code in VB that I am aware of. However, you could use this code which I wrote for SQL Server. For Oracle, you would have to change to the appropriate table to get all the table names. You can filter by table name to get just your tables like I did below (My_).
    '* Now select all the files and add to access.
    sSQL = "SELECT name, id FROM sysobjects WHERE xtype = 'U' AND SUBSTRING(name, 1, 3) = 'My_' ORDER BY name"
    Set rstTemp = OpenRdSetView(sSQL:=sSQL, adoConnection:=adoConnection)
    On Error GoTo TableExistError
    '* Loop through all my database tables and copy to the Access database.
    With rstTemp
    Do While Not .EOF
    '* Copy this to the Access backup database.
    sTableName = .Fields("Name").Value
    '* Select all records from the SQL Server table and copy to the local Access database.
    sSQL = "SELECT * INTO " & sTableName & " FROM "
    sSQL = sSQL & "[odbc;dsn=" & sDSN & ";UID=" & sUID & ";pwd=" & spwd & ";]." & sTableName
    adoBackupConnection.Execute sSQL, , adExecuteNoRecords
    '* Go to next table.
    .MoveNext
    Loop
    End With

  • 'SUBSTRING_INDEX' is not a recognized built-in function name.

    actually iam modifing the servlet code to connect with MSSQL.previously it was MYSQL.now compiling is ok.
    while running it shows error at the top of the linked page as...
    error
    [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]'SUBSTRING_INDEX' is not a recognized built-in function name.
    ->can any one give me the solution for this error.

    Don't use that function because it doesn't exist in SQL-Server.
    OR
    Change your SQL to use a function that does exist.
    OR
    Create a user defined function in SQL server that has that name.

  • [SQL Server]'TO_DATE' is not a recognized built-in function name

    Running 11g dg4msq and getting the error :
    SQL> select * from all_users@dg4msql;
    select * from all_users@dg4msql
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Oracle][ODBC SQL Server Driver][SQL Server]'TO_DATE' is not a recognized
    built-in function name. {10196,NativeErr = 195}

    Hi,
    This problem happened on Windows platforms after upgrading the RDBMS used to access the gateway from 10.2.0.3 to 10.2.0.4 patch 22.
    The solution is to install and apply Oracle Database 10.2.0.4 Patch 29 (Windows Bundle Patch 29) or later to the RDBMS that is running the query and connecting to the Gateway.
    This is detailed in the following note available on My Oracle Support -
    Query Using DG4MSQL Returns Error After Upgrade of RDBMS From 10.2.0.3 to 10.2.0.4 (Doc ID 1078940.1)
    Regards,
    Mike

  • Error 'DAYOFWEEK' is not a recognized built-in function name.

    hi friend I used the following query with sql server 2008 to select group by records
    SELECT
    sum(ljoin) as lct,
    sum(rjoin) as rct,
    CONCAT(DATE_FORMAT(DATE_ADD(date, INTERVAL(1-DAYOFWEEK(date)) DAY),'%Y-%m-%e'), ' TO ',
    DATE_FORMAT(DATE_ADD(date, INTERVAL(7-DAYOFWEEK(date)) DAY),'%Y-%m-%e')) AS DateRange
    FROM Pairs_Details
    WHERE userid='jitu'
    GROUP BY YEARWEEK(date)
    it return the  following error 'DAYOFWEEK' is not a recognized built-in function name.
    But I can not get my desire result there are my following table, data and desire output which I want
    Pairs_Details table definition:
    CREATE TABLE [dbo].[Pairs_Details](
    [sno] [int] IDENTITY(1,1) NOT NULL,
    [userid] [nvarchar](50) NULL,
    [date] [datetime] NULL,
    [ljoin] [int] NULL,
    [rjoin] [int] NULL
    ) ON [PRIMARY]
    Example data:
    sno userid date ljoin rjoin
    1 jitu 2014-01-21 15:48:24.000 1 NULL
    2 jitu 2014-01-22 15:48:24.000 NULL 1
    3 tetu1234 2014-01-22 15:48:24.000 1 NULL
    4 jitu 2014-01-24 15:48:24.000 NULL 1
    5 saurbh123 2014-01-25 15:48:24.000 1 NULL
    6 jitu 2014-01-26 15:48:24.000 1 NULL
    7 tetu1234 2014-01-28 16:40:05.000 NULL 1
    8 jitu 2014-01-28 16:40:05.000 NULL 1
    Desired output: for perticular userid 'jitu'
    userid | ljoin | rjoin | DATERANGE |
    jitu | 2 | 2 | 2014-01-21 15:48:24.00 TO 2014-01-27 16:40:05.000 |
    please any can help me.
    thanks.
    Jitendra Kumar Sr. Software Developer at Ruvixo Technologies 7895253402

    Try below code..
    SET DATEFIRST 2;
    ;WITH CTE AS
    SELECT * , DATEPART(WW, [date]) AS week_num
    FROM pairs_details
    SELECT userid, SUM(ISNULL(ljoin,0)) as ljoin, SUM(ISNULL(rjoin,0)) as rjoin
    FROM CTE b
    GROUP BY userid, week_num
    still missing date_range concatenated field.. I will get back to it... Meanwhile you can use this..
    Please mark as answer, if this has helped you resolving the issue.
    Good Luck :) .. Visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • Length of a string without using any built-in functions

    code that returns the length of a string without using any built-in functions.
    thanks
    Sam

    A string is internally represented by a character array.  An array of characters will reside on the stack, not the heap.  Yes, we always learned that String is a reference type, but what goes on in your memory might still surprise you...
    A struct is internally represented by only it's private properties, sequentially on the stack.
    So basically, what I thought is happening by messing with the structlayout: is only tricking our programming a bit into thinking that the top X bytes on the stack represent a chararray, while actually we put them there as a string.
    Wrong. True. And wrong.
    A string is internally represented by, in that order, an array length, a string length, the chars. None of them resides on the stack.
    An array is internally represented by, in that order, an array length and the chars. None of them resides on the stack.
    When you use the FieldOffset attribute to handle the string as a char array, you don't get anything right:
    - the Length returned is the "array length" of the string, which is equal to the string length + 1.
    - the chars returned by the array indexer are shifted by 2 chars (the length of the "string length" field).
    You can use the FieldOffset to make that work, but it needs a little bit more work.
    unsafe static int Test()
    string myString = "This string may contain many string inside this string";
    string testString = "string";
    int countResult = 0;
    fixed (char* myChars = new StringToChar { str = myString }.chr, testChar = new StringToChar { str = testString }.chr)
    // The 2 first chars of the array are actually the string length.
    int myCharsLength = myChars[1] << 16 | myChars[0];
    int testCharLength = testChar[1] << 16 | testChar[0];
    for (int i = 0; i < myCharsLength - testCharLength + 1; i++)
    if (myChars[i + 2] == testChar[2])
    for (int j = 1; j < testCharLength; j++)
    var c = testChar[7];
    if (myChars[i + 2 + j] != testChar[j + 2])
    goto endOfCharAnalyses;
    countResult++;
    endOfCharAnalyses:
    continue;
    return countResult;

  • Using SSRS Built in Functions in SharePoint

    Hi there,
    I currently have a number of reports deployed on a SharePoint site at work. I would like to monitor who actually uses which report and when they ran the report and also how long the report ran for. This is for auditing purposes and getting an idea
    of the performance of these reports.
    I came across the following built in functions on SSRS; UserID, ReportName, ReportServerUrl and ExecutionTime. Is it possible to use these functions somehow in SSRS & SharePoint whenever someone accesses a particular report and perhaps write this
    information to a SharePoint list within our SharePoint site.
    If this is possible, how would I go about doing this?
    Also, some of our reports run off parameters, is it possible to capture what parameters were used as well?
    Any help would be much appreciated. Thanks.  

    you can get most of these information from executionlog tables available from reportserver database
    http://www.mssqltips.com/sqlservertip/2722/sql-server-report-server-2008-r2-execution-log-reports/
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to find built-in functions for PL/SQL

    Hi everyone,
    Please can someone help me, I am running version 8i, and I am trying to find out how I can access all the built-in functions for PL/SQL.
    I am new in ORACLE environment and I just want to know all the built-in functions and their usage.
    Thanks
    Maikiki1
    null

    Use the 'Documentation' selection on the left side of the OTN page.
    All of the documentation for Oracle is available.
    You can also purchase the documentation CD-ROM from the Oracle Store.
    The functions are explained in the SQL reference manual.
    null

  • How to view SQL Built-In function Codings ?

    Hello All
    I want to view the sql built-in functions codings,any one say how to view this, or any web links contains this
    for ex --- i want to view the round function coding
    Thanks

    user2233 wrote:
    I want to view the sql built-in functions codings,any one say how to view this, or any web links contains this
    for ex --- i want to view the round function codingIf you mean seeing the actual source code for the SQL round() function, then no - not possible. It is part of the copyrighted (and private) Oracle source code.
    If you want to see what functions there are, what the syntax is and arguments are, what the functions do, then refer to the Oracle® Database SQL Language Reference guide.

Maybe you are looking for