How to do a BITOR in SQL?

Oracle SQL has a BITAND function, but no BITOR function. Is there a way to implement the equivalent of the BITOR function in SQL?
Thanks in advance,
Stew Ashton

StewAshton wrote:
Thank you, Alberto. This was actually just a test to see if I could mark my own answer as correct, which seems a bit strange.
Hi Stew,
Yes, I asked the same question a while ago:
A user can mark his reply in his thread as correct answer or useful answer
Check answers in the thread.
Regards.
Al

Similar Messages

  • How can I enable embedded pl/sql gateway to run on port 80

    I have a new 11G install on OEL 4.0, database created. I would like to be
    able to access the instance using the pl/sql gateway. Works fine with
    port 8080, the default. How to I enable it to run on port 80?
    I found this statement in the following docuementation:
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb22pro.htm#ADXDB2500
    Using HTTP(S) on Nonstandard Ports
    By default, HTTP listens on a nonstandard, unprotected port: 8080. To use HTTP(S) on
    the standard port, such as 80, your DBA must chown the TNS listener to setuid ROOT
    rather than setuid ORACLE, and configure the port number in the Oracle XML DB
    configuration file /xdbconfig.xml.I have root priviledges on the box.
    I've tried setting the listener file permissions:
    chown root:dba /u01/app/oracle/product/11.1.0/db_1/bin/tnslsnr
    chmod 6775 /u01/app/oracle/product/11.1.0/db_1/bin/tnslsnr
    Also put root in the dba group.
    The permissions turn out like this:
    -rwsr-sr-x 1 root dba 830854 Jun 17 21:04 /u01/app/oracle/product/11.1.0/db_1/bin/tnslsnr
    I stopped the listener, bounced the database, and started the listener again.
    But it still shows the process being owned by oracle:
    oracle 29682 1 0 21:08 ? 00:00:00 /u01/app/oracle/product/11.1.0/db_1/bin/tnslsnr LISTENER -inherit
    Changing the port is easy:
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SYS>select dbms_xdb.gethttpport as "HTTP-Port" , dbms_xdb.getftpport as "FTP-Port" from dual;
    HTTP-Port FTP-Port
    8080 2100
    At this point, I can access the apex home page with the following url:
    http://hostname:8080/apex/f?p=4550:10:1454849288245548
    I can than change it to port 80:
    SYS>begin
    dbms_xdb.sethttpport('80');
    dbms_xdb.setftpport('2100');
    end;
    2 3 4 5
    PL/SQL procedure successfully completed.
    SYS>SYS>select dbms_xdb.gethttpport as "HTTP-Port" , dbms_xdb.getftpport as "FTP-Port" from dual;
    HTTP-Port FTP-Port
    80 2100
    When I try to access apex with the following url:
    http://rmdcopslnx1.us.oracle.com/apex/f?p=4550:10:1454849288245548
    I get the following:
    Failed to Connect
    Firefox can't establish a connection to the server at hostname.com.
    Though the site seems valid, the browser was unable to establish a connection.
    * Could the site be temporarily unavailable? Try again later.
    * Are you unable to browse other sites? Check the computer's network connection.
    * Is your computer or network protected by a firewall or proxy? Incorrect settings
    * can interfere with Web browsing.I can set the port. Just can't talk to it.
    This is the entry from the listener log:
    <msg time='2008-07-03T15:40:09.741-06:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='hostname'
    host_addr='xxx.xxx.xxx.xxx'>
    <txt>TNS-12546: TNS:permission denied
    TNS-12560: TNS:protocol adapter error
    TNS-00516: Permission denied
    Linux Error: 13: Permission denied
    </txt>
    </msg>
    So this looks like an permissions problem. But where? I posted
    this on the apex forum here:
    Re: How can I enable embedded pl/sql gateway to run on port 80
    They suggested asking here.

    No, that thread did not provide the information that I need. Some more data:
    I have the port set to 8080:
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SYS>select dbms_xdb.gethttpport as "HTTP-Port" , dbms_xdb.getftpport as "FTP-Port" from dual;
    HTTP-Port FTP-Port
    8080 2100
    At this point, I can access the apex home page with the following url:
    http://hostname:8080/apex/f?p=4550:10:1454849288245548
    I can than change it to port 80:
    SYS>begin
    dbms_xdb.sethttpport('80');
    dbms_xdb.setftpport('2100');
    end;
    2 3 4 5
    PL/SQL procedure successfully completed.
    SYS>SYS>select dbms_xdb.gethttpport as "HTTP-Port" , dbms_xdb.getftpport as "FTP-Port" from dual;
    HTTP-Port FTP-Port
    80 2100
    When I try to access apex with the following url:
    http://rmdcopslnx1.us.oracle.com/apex/f?p=4550:10:1454849288245548
    I get the following:
    Failed to Connect
    Firefox can't establish a connection to the server at hostname.com.
    Though the site seems valid, the browser was unable to establish a connection.
    * Could the site be temporarily unavailable? Try again later.
    * Are you unable to browse other sites? Check the computer's network connection.
    * Is your computer or network protected by a firewall or proxy? Incorrect settings can interfere with Web browsing.
    I can set the port. Just can't talk to it.

  • How to find leap year in sql query

    How to find leap year in sql query

    Select
    CASE
      WHEN result = 0 THEN 'Leap_Year'
      WHEN result <> 0 THEN 'Not_A_Leap_Year'
    END
    From (Select mod((EXTRACT(YEAR FROM DATE '2013-08-24')), 4) result FROM DUAL);

  • How to see dbms_output on oracle sql developer

    ned immediate help
    how to see dbms_output on oracle sql developer

    Hi,
    In sql developer u have a tab named DBMS Output in your result sheet. In that the first Icon is Enable DBMS Output. turn it on (After on it will give the message set serveroutput on in the sheet) and then run your code.
    In the code u have to use the dbms_output.put_line package.after running the code u have to see the result in DBMS Output tab.
    Regards,
    NTR

  • How to define variables in toad sql script editor - newbie

    I have just pull out the script of a Function and want to run it on toad SQL editor.
    I am little bit confused how to define the VARIABLEs here in toad SQL editor to run my script.
    SELECT
    NVL(SUM(debit), 0) - NVL(SUM(credit), 0)
    INTO l_accountBalance
    FROM
    GLP_VoucherMaster vm
    INNER JOIN GLP_VoucherDetail vd ON vm.GLP_VoucherMaster_ID = vd.GLP_VoucherMaster_ID
    INNER JOIN GLP_ChartOFAccounts coa ON vd.GLP_ChartOfAccounts_ID = coa.GLP_ChartOfAccounts_ID
    WHERE
    vm.isActive = 'Y' AND vd.isActive = 'Y'
    -- *** how to define variables in toad sql script editor ***
    AND vm.voucherDate < p_cDate
    AND coa.AccountCode LIKE p_accountCode || '%';
    Thanks
    w\

    Just prefix with a colon (:)
    SELECT   NVL (SUM (Debit), 0) - NVL (SUM (Credit), 0)
      INTO   L_accountbalance
      FROM           Glp_vouchermaster Vm
                 INNER JOIN
                     Glp_voucherdetail Vd
                 ON Vm.Glp_vouchermaster_id = Vd.Glp_vouchermaster_id
             INNER JOIN
                 Glp_chartofaccounts Coa
             ON Vd.Glp_chartofaccounts_id = Coa.Glp_chartofaccounts_id
    WHERE       Vm.Isactive = 'Y'
             AND Vd.Isactive = 'Y'
             AND Vm.Voucherdate < :P_cdate
             AND Coa.Accountcode LIKE :P_accountcode || '%';
    /:p

  • How to set alert mail contain SQL text activities

    How to set alert mail contain SQL text activities.
    In "Notification Templates" topic have no Available Tags about sql text. Can I send mail alert with SQL text?

    it should be text/plain, for a complete list refer
    http://www.freeformatter.com/mime-types-list.html
    Regards.

  • How to Eliminate Special Character in SQL LOADER Script

    How to eliminate special character from SQL LOADER script file which suppose not to insert in TABLE
    example.CSV lile like this
    <ABC/ , 7747>
    <DEF/ , 7763>
    <NEW/ , 7779>
    <OLD/, 7795>
    I have to remove < > and / character at the time of loading into table. How It could be done. It is not possible to remove < , > , / character manually from CSV file

    On Unix/Linux that's very easy, on Windows... I don't know...
    $ cat myfile.csv
    <ABC/ , 7747>
    <DEF/ , 7763>
    <NEW/ , 7779>
    <OLD/, 7795>
    $ tr -d "\057\074\076" <myfile.csv >outfile.csv
    $ cat outfile.csv
    ABC , 7747
    DEF , 7763
    NEW , 7779
    OLD, 7795
    $

  • How to create a database in sql?

    My question is how to create a database in sql?

    entrant wrote:
    My question is how to create a database in sql?
    as Iam a beginner
    =================================================
    Learning how to look things up in the documentation is time well spent investing in your career.  To that end, you should drop everything else you are doing and do the following:
    Go to  docs.oracle.com.
    Locate the link for your Oracle product and version, and click on it.
    You are now at the entire documentation set for your selected Oracle product and version.
    BOOKMARK THAT LOCATION
    Spend a few minutes just getting familiar with what is available here. Take special note of the "books" and "search" tabs. Under the "books" tab (for 10.x) or the "Master Book List" link (for 11.x) you will find the complete documentation library.
    Spend a few minutes just getting familiar with what kind of documentation is available there by simply browsing the titles under the "Books" tab.
    Open the Reference Manual and spend a few minutes looking through the table of contents to get familiar with what kind of information is available there.
    Do the same with the SQL Reference Manual.
    Do the same with the Utilities manual.
    You don't have to read the above in depth.  They are reference manuals.  Just get familiar with what is there to be referenced. Ninety percent of the questions asked on this forum can be answered in less than 5 minutes by simply searching one of the above manuals.
    Then set yourself a plan to dig deeper.
    - *Read a chapter a day from the Concepts Manual*.
    - Take a look in your alert log.  One of the first things listed at startup is the initialization parms with non-default values. Read up on each one of them (listed in your alert log) in the Reference Manual.
    - Take a look at your listener.ora, tnsnames.ora, and sqlnet.ora files. Go to the Network Administrators manual and read up on everything you see in those files.
    - *When you have finished reading the Concepts Manual, do it again*.
    Give a man a fish and he eats for a day. Teach a man to fish and he eats for a lifetime.
    =================================

  • How to create a database in Sql server management studio

    how to create a database in Sql server management studio

    One method is to run the SQL statement below from a SSMS query window:
    CREATE DATABASE MyDatabase;
    You can also right-click on the Databases node in SSMS Object explorer and select New Database.
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

  • How to connect external database(Ex:SQL Server/Tivoli)  from ABAP Webdynpro

    Hi,
    Any one have idea how to connect external database like SQL Server/Tivoli to access tables from WebDynPro ABAP.
    Please point to me some links if you have
    Thanks
    Praveen

    Hi,
    Please check out this link -
    FETCH DATA FROM ORACLE DATABASE USING Web Dynpro
    Regards,
    Lekha.

  • How to open sdf files in SQL server 2012?

    How to open sdf files in SQL server 2012?
     I couldn’t figure out how to open the sdf files in SQL server 2012
     Thank you
     Best
     Jamal

    I don't think it's hard if understood the question properly you can try this I do it most of the time and this might be the solution for you, sometimes minor simple click is a life saver:)
    1. 
    Open SQL Server Management Studio, or if it's running select File -> Connect Object Explorer... and click the
    connect drop down arrow
    2. 
    In the Connect to Server dialog you will see Database Enghine, Analaysis Servie on so on and you go head change Server type to
    SQL Server Compact Edition
    3. 
    From the Database file drop-down as shown below click the drop down arrow and select <
    Browse for more...>
    4. 
    And you will see C:\, D:\, G:\
    drive and so on and open, your SDF file where it is located
    I hope this has been informative for you and good luck
    Please remember to click “Mark as Answer” on the post that has answered your question as it is very relevant to other community members dealing with same problem in seeking the right answer

  • How to store jpeg images in SQL server using NI database Connectivity Toolset. Can anyone please help me in this regard.

    Please tell how to store jpeg images in SQL Server using NI Database Connectivity Toolset.

    http://www.w3schools.com/sql/sql_datatypes.asp
    You setup a field as BLOB and store the binary of the picture there. Depending on the database it can be called differently as you can see in the link, in SQL server there's even a Image datatype.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • How to install and configure the SQL Server

    Hi All,
    We have to install SQL server in the new server because the old server is crash and need to upgrade. Please advice How to install and configure the SQL Server to run SAP Business One 8.8 successfully and what part we do have to give attention.
    Kind Rgds,
    Steve

    Hi,
    Try this solution:
    The step-by-step installation guide can be found in the documentation included in the installation media. (\Documentation\SystemSetup\AdministratorGuide_SQL.pdf).
    Below are some important parts that you should pay attention to during the Installation process.
    Resolution
    Collation setting: It must be set as SQL_Latin1_General_CP1_CI_AS,even the company DB is non-english location. The company DB will be created as corresponding collation settings automatically.
    Instance and TCP Port : It is recommended to run SBO on default instance and TCP port 1433. Otherwise,some optional components such as B1i may not work properly.
    Native Client: SQL Server Native Client should be installed on every client machine to enable the ODBC connection to DB server.
    Rgds,

  • How to see history in Oracle SQL

    how to see history in Oracle SQL
    i.e
    create table.....
    select * from tablename....
    delete tablename;
    Now i want to see how many command run after login.......please tell me the command...

    user12261139 wrote:
    how to see history in Oracle SQL
    i.e
    create table.....
    select * from tablename....
    delete tablename;
    Now i want to see how many command run after login.......please tell me the command...I'm not aware of an easy way to see how many commands were run after logging on. Different tools have different capabilities, though.
    The ms-dos version of SQL*PLUS offers a Doskey option to use the up and down arrows to recover recently executed commands.
    The SQL Workshop in Apex has a command history. Some of the GUI tools might offer similar functionality.

  • How to replicate data from MS SQL Server  to Oracle

    Hi,
    Can someone please help me on how to replicate data from MS SQL Server to Oracle 8i database.

    Dear,
    I'm a student.
    I do simple replication on Oracle 8.0.5 successfully. (one master site and one snapshot site). I only use the SQL*Plus and Schema Manager to do.
    But when I do advance replication (multimaster replication) I meet many problem. So I don't get the result.
    Do you show me the technology to do that ?
    Thanks !

Maybe you are looking for

  • Where has 'do you want to replace this file' gone when copying items in lion?

    Hello, can anyone tell me if I can still have the option when copying items from one folder to another to be asked ' do you want to replace this file' instead of only having the new options to: stop / keep both / or replace all?  thanks for your help

  • SAP Solman MMC is not opening

    Dear all, i have tried to open SAP Solman MMC, i got the below error . MMC cannot open the file c: \Documnets and  setting\user\Windows\sapmmc.msc. this may be because the file does not exit, is not an MMC console , or created by a later version of M

  • Strange Artifacts with Brightness/Contrast Filter

    I've applied the brightness/contrast filter to several stills and then on the last 6 frames, I pump the brightness to 100 to create a flash transition. However, on several of these, I'm getting very strange black artifacts after rendering. They appea

  • Workspace Not Remembering my Palette Options

    When I open Photoshop I am now getting this annoying Palette pop up called ACCESS CS LIVE that is attached to my Color Palette. Even though I close my Color palette and create a new Workspace, it pops up everytime I open Photoshop again. Anybody know

  • GR rounding issue

    Hi, In the Material master we maintained Alternate UOM as 5 UTO = 4536 KG I have created PO and received 90020 lb through GR. if we calculate this it should be 45.010 UTO. But it is showing 45.011 UTO, this is making a difference of 2 Pounds. this is