On the SQL in OBIEE

Hello everyone,

I try a sql query in OBIEE for subtraction of 5 days from a specific date.

(1)-j' first tried the following query "Date of booking - Dim. "" Booking Date "= DATE_SUB ('2011-01-03', INTERVAL 31 DAYS) in the advanced sql filter and I got this error state: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error occurred. [nQSError: 43113] The message returned by OBIS. [nQSError: 27002] Near <>(): syntax error [nQSError: 26012]. (HY000)

(2)-j' I then replaced by SUBDATE DATE_SUB but got the same error.

(3) - I think that these functions are not supported by OBIEE so I decided not to use all functions. I tried this query: CAST('' 2011-01-03 AS DATE) - CAST()7 AS INTERVAL DAY) in the formula in the column editor, then I got this error: data type: 50361345 is not supported. (HY000).

I don't really know what I should do now. Please help with suggestions that may help solve the problem. Thanks in advance

Cool.

Looking at your approach, I want to treat-30 c - 5 AND-10 AND-15

TIMESTAMPADD (SQL_TSI_DAY-30, Column)

or otherwise try to double check that your approach, DynamicNumber below code should be the result of all the values of other columns, as said in this link.

TIMESTAMPADD (SQL_TSI_DAY - DynamicNumber, Column)

Thank you

Tags: Business Intelligence

Similar Questions

  • If I can revise the SQL code generated by OBIEE

    Hi all

    I had a problemetic SQL generated automatically by OBIEE. I have to rewrite or at least add a tip to make it complete within a fixed period.

    But I'm not sure if OBIEE offers us this feature to change or customize the SQLs it generates?

    Please help to give some advice.

    Thank you very much.
    Leon

    Hi leon,.

    OBIEE increases the performance of the aliases table, cz as he can't do oneself joined himself.
    Please visit this link this will solve your problem to improve performance
    http://www.iwarelogic.com/blog/performance-increasing-OBIEE-724
    (GOLD) http://www.rittmanmead.com/2008/11/thoughts-on-OBIEE-performance-optimization-Diagnostics/

    UPDATE POST
    @leon, you cannot change the SQL code generated by obiee, your obligation to use EXISTS instead of IN operator, then you can do this in the physical layer of RPD by accessing the properties of the table and select SQL problem and write your query with condition EXISTS on the relevant tables. So that in turn Bi server accepts and converts according to its methodology.

    UPDATE POST-2
    @leon, you can use rownum in your where clause, but check the query generated by OBIEE and the results obtained by rownum satisfied your requirment.

    Please follow label by awarding points to make it useful to others and even for us. Rules to be followed http://forums.oracle.com/forums/ann.jspa?annID=939

    hope responds to your question.mark points.

    See you soon,.
    KK

    Published by: Jocelyn on January 24, 2011 22:25

    Published by: Jocelyne 24 January 2011 22:27

    Published by: Jocelyn on January 25, 2011 02:13

    Published by: Jocelyne 25 January 2011 05:26

  • Dashboard OBIEE - JavaScript - get the SQL logic

    Hi Experts,

    I have the dashboard with an OBIEE report and dashboard invites. So, whenever I change the values in the prompt lines in the report to amend accordingly. I hope that the sql logic changes also to the selection, I do on the dashboard page.

    I want to take this logical sql update. I knew that we can write the javaScript function in the municipality. JS file and then call this function in the dashboard. But I want to know how I can get the update sql logic.

    Any help or inputs would be appreciated.


    Thanks and greetings
    S

    Hi Siva,

    Sorry about that last post. I did not properly escape all my special characters and the Forum diverted.

    I have corrected the errors and again tested the code. Works fine on IE and Moilla.

    Give it another shot.

    -Joe

  • SQL sent to the database in obiee 10g

    Hello

    I can't see the SQL sent to the database in the log file. Ony able of logical query. I connected inwith administrator and checked th eloglevel is 5.

    How can I view the general sql query that was sent to the database.

    Thank you

    Advanced to the prefix tab
    SET VARIABLE DISABLE_CACHE_HIT = 1;

    Or another NQConfig.ini

    The NO value to cache.

    Since it is answered, mark it as correct :)

    Published by: Srini VIEREN on April 26, 2013 10:35

  • Default presentation variable used in the SQL filter expression

    Hello
    I am trying to use a default value for a variable used in a sql expression in a filter presentation and could use assistance on why obiee stifles the syntax.

    I have a report prompted with a prompt on the name of the month (variable presentation framework - pres_month_name). The value read is used in a filter as an sql expression. The sql expression is a DEAL on the variable of presentation and its conversion to a number based on business rules.

    In the sql expression, I give you the presentation variable a default value for a variable of repository - rep_default_month_name. Repository variable is correct and no, based on business rules, returns an appropriate default month name.

    Now, if I hard code the value by default, there is no problem. Here is a sample of the filter:
    The month number less than or equal to * DEAL "{pres_month_name} {OCT}" WHEN "NOV" THEN 10 WHEN... END *.

    Notice that the variable of presentation is between single quotes, because this is an area of character. Once more, it works fine, but I don't want to hardcode the default, I want it based on the variable repository, therefore:

    The month number less than or equal to * DEAL '{pres_month_name} {ValueOf (rep_default_month_name)}' WHEN 'NOV' THEN 10 WHEN... END *.

    By having this syntax for default of the variable of the presentation, I receive a message from the incorrect values in a filter.

    This report is not only used on a dashboard, but used in a briefing book as well. Whenever a briefing book is updated, by default the presentation variable is used, because obviously, the presentation is not available in a briefing, and I don't want to use a hard-coded value.

    I could duplicate the report and adjust the sql to not use the presentation variable, but always use the repository variable that returns a month by default, but I would be duplication of effort and I have to do this on several requests.

    Thanks for the help!

    Try this syntax described in the blog of Shiva that follows...

    http://shivabizint.WordPress.com/2008/10/02/Oracle-BI-EE-variables-overview/

  • How to create the view in OBIEE

    I have "table 1" with columns, Attr1, Attr2, action 1, measure 2.I need to create the view in the table repository Attr1, Measure1 and new attribute with values like a flag 3 'Y' in it. ". What will be the SQL code of the new view. Please provide the exact syntax for the view.

    Thanks in advance

    Hi Hsekar,

    You are right, it is called a SELECT type.

    Regarding your second question I don't know what you mean. You are using an SQL Select statement in this area. The Alias of the columns must match the columns will place you in the RPD exactly. But in this process, you create a physical view DB object, so there is not need to name it. You just create the select statement that you would use to create a view and OBIEE refers to the statement.

    If you have found the correct answer please give points!

    Best regards

    -Joe

  • Add the new column to Admin tool, including the SQL Code

    Hi all

    I am new to OBIEE and I already searched here in the forum but have not found an exact answer which could help me.
    I have a table in the warehouse where to get information on employees. It's employe_id, manager_id and name.
    Example:
    Employe_id Manager_ID name
    1 Mueller
    2 1 Meier

    Now, I would like to create a new column in the Mapping BI Admin tool business layer and add a SQL where to select the name of the Manager.
    Is this possible? And how can we do it? It will work with a new logical column? Where we add the SQL Code?

    I hope someone can answer my question!
    Thank you very much!

    Kind regards
    David

    OK, I think I got it - the name of Manager is on a separate table (or a search to return to the current table) and your thinking that you want to label your SQL in the report to find the name of Manager based on Director ID, you have?

    If so, import the table with the names of Manager in the physical layer. If this is the same table that you already have (but want to search him in the current table) then you need to create an alias for the current table.

    For each new table in the Phy layer, or an alias - define the join (current_table.manager_id = manager_table_or_aliased_current_table.employee_id)

    Once completed, we will on the source of the logic table in the MDB for this dimension, edit, on the general tab, "Add" and select the table / alias that you created in the phy layer. Click OK - it combines now two tables attached as a source - you can then map the name of the Manager search in your column 'name '.

    Kind regards
    Alastair

  • VIX file in the user interface designer receives the data from the Web service application that communicates with the SQL server database

    I created the Web service VI ("Mt-insolacije.vi"), which has two terminals of the input string (FROM / TO) for the dates of arrival and exit of two data terminals (table 1 d) from database (MS SQL server). This VI communicates with the database with functions of the database with a DSN and SQL query appropriate palette. There are two tables with two data (time and Insolation) columns in the database.

    This VI works when you run in Labview 2010, but when I used it as VI in UI Builder it returns no data.

    Could you please help me find a solution. Is it possible to communicate with the SQL server database in this way or there is another way?

    There are two files attachmet: Image of .vix file in Interface builder and .vi file ("Mt-insolacije.vi")

    Please help me ASAP!

    Thank you

    Ivan

    I found the solution problem is in the DSN. I've been using the user instead of DSN system DSN.

    It's important to create the system DSN if you want your VI of web service to communicate with the database.

    PS Please put feature bundle format timestamp and XY graph in the web user interface designer. It's complicated to trace data with datetime on X axis without them.

  • create the SQL server programmatially data source

    Hello

    I would like to create a SQL server by programming in LabVIEW data source. The SQL server version that I used is from 2005. Can someone give some ideas? An example of code will be more favorable.

    Thank you

    Jane

    You can build the connection string you even.  The open function in the Toolbox of data base accepts a string as well (it's polymorphic) who can be the connection string.  This is the site I use to understand.  Is the most common things.  You may need to search Google more specific elements.

    http://www.ConnectionStrings.com/

    If you want to use the other option, someone has achieved a UDL editor in LabVIEW.  You can use this code to create your own UDL which can use the Open DB function:

    https://decibel.NI.com/content/docs/doc-18613

    I have used the above code, so can't comment on that.

  • How to get the sql query result?

    Hello

    Currently I use LV2012 to connect to an Oracle database server. After the Oracle Express and Oracle ODBC driver facilities/settings made.

    I managed to use the SQL command to query the data through my command prompt window.

    Now the problem is, how to do the same task in Labview using database connectivity tools?

    I have build a VI to query as being attached, but I have no idea of what range to use to get the result of the query.

    Please help me ~ ~

    Here is a piece of code that I use to test the SQL commands, you can use the part that retrieves the results of sql.

    It is also possible to get the rear column headers, but it's for the next lesson!

    ;-)

  • Using WHERE command in the SQL property loader

    Hi all

    I hope that it will be a pretty simple question.

    I'm trying to use the Loader to read within the confines of a SQL database test. There are many types of models that need to be tested, each containing a set of specific limits. I want to be able to retrieve the appropriate limits for the model of the product under test.

    To do this, I have the model number of product available in a FileGlobal. The database contains a table containing information about limit test with an ID column "ModelNumber_Number."

    I wrote the following SQL query to get there:

    "SELECT * FROM TESTLIMITS WHERE ModelNumber_Number = + FileGlobals.ModelNumber.

    However, it is where I am confused. I'm not sure the syntax to access a variable in the SQL command. I have the following error:

    The multipart identifier "FileGlobals.ModelNumber" could not be bound.

    Can someone please advise on how to do this?

    Thank you very much

    Cam.

    Hello, I was able to resolve the problem by converting to a string.

    "SELECT * FROM TESTLIMITS WHERE ModelNumber_Number ="+ str (FileGlobals.ModelNumber).

    At soon Cam.

  • Need help, unable to connect to the ODBC database using the SQL Toolbox!

    Hi all

    I'm playing around with the evaluation of SQL Toolkit (2.2 + patch) and I'm having trouble.

    I ran the example 'connect' program and it seems to work fine.

    However, I try to write my own program, and I get the same message:

    "Service connection BD: (return value ==-10 [0xFFFFFFF6])."

    Native error - 2147467259 code 0x80004005

    The message is different from time to time, but the return value is constant.

    I use Microsoft SQL Server 2012 and MySQL.

    For MySQL, I installed the last Connector ODBC, 5.3.4. Inside the Control Panel / Data Sources (ODBC), I have a DSN called test_mysql in DSN user and system DSN.

    I ran a test on the connection and the test passes. I don't know if I have to use the ansi or unicode driver, I tried both with the same success.

    I do not know I had properly configured the SQL Server connection and who will try again.

    My Code CVI is quite simple:

    hdbc = connection BD ("DSN = test_mysql");

    Whenever I get a - 10 BD. Either I have something configured wrong or am I missing something.

    Does anyone have any suggestions?

    Update 2:

    After getting off the phone with Technical Support, the problem has been identified!

    LabWindows SQL Toolkit requires 32 bits DNS. My PC is a 64-bit, so my default DNS Manager in 64-bit.

    I needed to use the DNS Manager 32-bit when you work with the box tool.

    Once I created my DNS connections using the 32-bit version of the Datga ODBC Source manager, everything worked fine.

    See this technical note:

    http://digital.NI.com/public.nsf/allkb/E7984C0DA0F0E65086257694005B4CB7

  • Maximum length of the SQL command

    I created a MySQL database and a LabView 8.6 application that inserts data into the database using the SQL Toolbox.  I have a problem very long character data insertion in a LONGTEXT field.  I determined that the problem occurs when the SQL command is more than 1 048 574 characters or the length of a particular field exceeds 1 048 326 characters (cannot say who).

    The error I get is "error-2147467259 occurred at NI_Database_API.lvlib:Conn Execute.vi.  "Exception occurred in the Microsoft OLE DB provider for ODBC drivers: [MySQL] [ODBC 5.1 Driver] [mysqld - 5.1.35 - community] MySQL version disappeared in NI_Database_API.lvlib:Conn Execute.vi.

    According to the MYSQL documentation, a LONGTEXT can 4294967295 characters, so length shouldn't be a problem.  The documentation also indicates "the effective maximum length of LONGTEXT columns also depends on the maximum packet size that is configured in the client/server protocol and available memory", but I don't know how to configure the packet size in LabView.

    I enclose the code example that reproduces the problem, although it is based on a special run table structure effectively.  The table definition is included on the diagram.

    This setting must be configured outside of LabVIEW (UDL or DSN).

    You must configure the server and the client:

    I found this link while searching on stackoverflow

    http://dev.MySQL.com/doc/refman/5.1/en/packet-too-large.html

    You may need to select/Configure a specific vendor (different) in order to set this variable.

  • What are the changes that the installation of BizTalk has on the SQL instance?

    Original title: BizTalk.

    Hello.

    I want to install BizTalk.
    BizTalk and SQL are different servers.
    I would like to know what are the changes that the installation of BizTalk on the SQL instance.
    Can anyone help?
    Thkz

    Hello

    I know it's late to answer this question, just in case someone else look through this issue.

    BizTalk installation does nothing to SQL Server, but make BizTalk Configuration. When configure us BizTalk on any SQL Server (same or different), it creates the required databases and SQL Server works on this server.

    Here is a series of articles on installing and configuring BizTalk Server: http://sandroaspbiztalkblog.wordpress.com/2013/05/16/biztalk-2013-installation-and-configuration-install-and-configure-biztalk-server-2013-part-9/

    Thank you!

  • How to completely remove the SQL Server 2008 R2 from my system?

    I got the SQL Server loaded on my computer before I realized it was the express edition that I needed. When I tried to load the version I needed the computer said that I had to create a new instance for the second version to run simultaneously. (had already uninstalled the original SQL Server and did not not the problem.) I went through the steps again and somehow there is the menu server must remove files, but they can access it. The only solution I see at the moment is to reload the server and uninstall and I hope that everything that caused its not completely withdraw from my system is corrected. Please tell me there is another solution which has guaranteed results.

    Hi Avendia,

    Your question would be better asked on the SQL Server forum

    SQL Server Forum
    http://social.msdn.Microsoft.com/forums/en-us/category/SQLServer

Maybe you are looking for