Using RTSI in Ansi C

I currently have a system with a PC6071 E and a PCI MIO 16E-4
I am using a bouble buffered Data aquisition
where I first configure the cards
then readAnalogue from each card in a loop.
If I use each card indivually ie. only one card is aquiring dat I have
no problem.
If I use the readAnalogue sequencially the first card aquires data but
the second card gives error -10609 transferInProgError.
I have read that a RTSI must be used to synchonise two cards but all the
examples I have found are in Labview.
How do I synchonised two E series Cards using a double buffer in using
C?

From your question, it sounds like you are running into 2 possible problems. If you are trying to synchronize 2 E-Series boards by sharing timing and triggering signals over the RTSI bus, you'll need to use the DAQ function Select_Signal. One board will need to be the "master" and the other the "slave". The order of programming should be:
1) Configure the master and call Select_Signal to route the scan clock and/or the AI Start Trigger over RTSI.
2) Configure the slave's acquisition and call Select_Signal to specify that the slave's scan clock and/or start trigger come off the RTSI bus lines specified in Step 1.
3) Start the slave.
4) Start the master.
If you are simply trying to perform 2 analog input operations simultaneously, you'll need to make sure that your D
AQ operations are asynchronous. By asynchronous, I mean that you do not use function calls that retain control of the nidaq32.dll until the operation completes. For example, you'll need to call DAQ_DB_HalfReady before calling DAQ_DB_Transfer to prevent the double-buffer transfer function from waiting until the data is available before retrieving and returning it. If you let the function wait, then other DAQ functions will not be able to execute.
You'll also want to make sure that you are not programming the same device twice without calling DAQ_Clear in between operations. That is a common cause of the -10609 error.

Similar Messages

  • EDI , where to check is using EDIFACT or ANSI standard ?

    hi all SAP expert,
    I am new to EDI, where can i check whether my current system us using EDIFACT or ANSI or others protocol from SAP tcode ?
    Is it tcode WE20,  under the tab "EDI Standard" ?
    Rejoice !

    Hi,
    From SAP system, you doesn't know whether you are using either EDIFACT or ANSI format of the EDI message, unless and until you maintain that information in your SAP system as they are not mandatory information in SAP.
    You can goto WE20 transaction and double click on your message type and then goto EDI standard tab and you can find the details like EDI standard, Message type and version there.
    For SAP system, its least bothered about what type of edi messaging standards are used.
    Thanks,
    Mahesh.

  • Synchroniz​ation of M-Series cards via RTSI and ANSI C?

    Hi!
    This is my first post and I'm happy to be here. I tried to search as thoroughly as possible, but if this has been answered elsewhere, I'd be grateful for a hint/link nevertheless.
    System:
    Win 2000 Pro with NI-DAQmx (part of NI-DAQ 7)
    2x PCI-6220M, 1x PCI-6221M
    RTSI Cable
    all components are registered in MAX
    Problem:
    I want to synchronize the cards over the RTSI bus. I am using the ANSI C library. There's an example SharedClk10-FiniteAcq_main.c, but it is designed for PXI and uses the undocumented (at least in the C reference?) DAQmxSetTimingAttribute function. I tried to pass '/Dev1/RTSI7' as the clock source, but it did not work.
    Then, after reading the C reference a bit more, it seemed as if I needed to use DAQmxExportSignal. But it gives me an error DAQmxErrorInvalidRoutingSourceTerminalName_Routing = -89120 when I try to route DAQmx_Val_20MHzTimebaseClock to '/Dev1/RTSI7'
    I'd like to know what C functions I have to call in which order to enable synchronized sampling with the three M-Series cards.
    So far I do:
    DAQmxCreateTask (primary & driven)
    DAQmxCreateAIVoltageChan (p & d)
    DAQmxExportSignal (p)
    DAQmxCfgDigEdgeStartTrig (d - trying to import the failed export of /Dev1/RTSI7)
    DAQmxStartTask (d & p)
    DAQmxReadAnalogF64 (p & d)
    DAQmxStopTask(p & d)
    This is my first time using M-Cards or the ANSI C functions, so I might have missed something essential.
    Can anyone give a hint as to what I need to do?
    Jens

    First, if you haven't, you should explicitly create a RTSI cable in MAX. This can be done by right-clicking on Devices and Interfaces -> NI-DAQmx Devices and choosing Create New NI-DAQmx Device -> RTSI Cable. Then, for each device that is connected to the RTSI cable, use MAX to edit its properties and in the "RTSI Configuration" tab, specify the RTSI cable. This will allow NI-DAQmx to automatically route signals of the RTSI cable.
    Now that a RTSI cable is configured, you don't need to explicitly export signals from the task. You can use the DAQmxGetMasterTimebaseSrc function to retrieve the master timebase terminal name from the primary task and the DAQmxSetMasterTimebaseSrc function to set the master timebase terminal name for the driven task. The DAQmxGetMasterTimebaseRate and DAQmxSetMasterTimebaseRate functions can be used in a similar manner. Configuring these properties will result in NI-DAQmx automatically routing the master timebase signal from the primary task to the driven task using the RTSI cable. To ensure the driven device starts at the same time, invoke the DAQmsxCfgDigEdgeStartTrip function passing a triggerSource parameter of "/ai/StartTrigger" which will result in NI-DAQmx automatically exporting the start trigger signal for the primary task over the RTSI bus and using it as a digital start trigger for the driven task.
    I assume that you will also want to invoke the DAQmxCfgSampClkTiming function for each task to specify the acquisition rate and number of samples to acquire. Note that since the master timebase signal and the start trigger signal are already routed using the RTSI cable, the sample clock itself does not need to be shared between the two tasks.
    geoff
    Geoffrey Schmit
    Fermi National Accelerator Laborary

  • Unicode string now returned from Stored Proc., used to be ANSI.

    Using ADO to connect VB6 to Oracle 8 stored procedures used to return strings in ANSI format. At some point in the last year or so, strings suddenly began to be returned as Unicode, unreadable by VB.
    Same problem now occurs using VB.Net and ODP.Net; I need to support both VB6 and .NET versions.
    Why are strings being encoded differently than before? Has anybody else seen this problem? What can be done?
    The NLS_LANG registry entries on the server and client machines match each other. Some of our installed base of customers reported this change, too.
    Below are some demonstration code examples.
    Stored procedure looks like this:
    CREATE OR REPLACE PROCEDURE MyStoredProc
    (sMyMsg IN OUT VARCHAR2) AS
    BEGIN
         sMyMsg := 'My test string';
    RETURN;
    END;
    On the VB6 side, my code looks like this:
    Dim vParam As Variant
    Dim cmdExecute As ADODB.Command
    Dim pParam As ADODB.Parameter
    Set cmdExecute = New ADODB.Command
    cmdExecute.CommandType = adCmdStoredProc
    cmdExecute.CommandText = "MyStoredProc"
    Set pParam = cmdExecute.CreateParameter("PARAM1", vbString, adParamInputOutput, 0, vParam)
    cmdExecute.Parameters.Append pParam
    cmdExecute.ActiveConnection = ADOConnect
    cmdExecute.Execute
    vParams = cmdExecute.Parameters(0)
    Result of VB code is that vParams now contains a Unicode string.
    Any suggestions as to what's happening, where the problem might be, what to do about it, or where else to post this question (I'm not sure which Forum is the best place to look for answers) would be appreciated.
    Is "force SQL_WCHAR" relevant to this problem? If so, what does that mean and how/where do I apply it?

    The Force WCHAR option forces the ODBC driver to
    report columns and return data as Unicode. If that
    is checked, you probably want to uncheck it.But how do I do that? I can't find any documentation for a SQL_WCHAR option. Where do I go to read/change the current setting of this switch?
    What character set is your client & database?NLS_LANG, for both machines, is "AMERICAN_AMERICA.WE8ISO8859P1". BTW, the client is 9.2, but the database is version 8.1.7. I'm fairly certain that the problem also existed when the client was also running ver. 8.

  • Using RTSI on the PCI-7811R FPGA

    I have created a FPGA vi that outputs a certain signal that I want to go out a DIO and the RTSI.  It goes out the DIO ok.  But there seems to be nothing going out the RTSI line.  I've added the RTSI resourse to the project, and all I do in the FPGA VI is configure the RTSI as Write, and then simply run a boolean value into it, just like I do with the DIO.
    What are the exact steps I need to take to configure the RTSI trigger to be outputed?  Do I need to go through Measurement and Automation explorer and configure the RTSI cable somehow?  I saw something about this in the Help, but was a little unsure exactly what to do. 
    Thanks for your help,
    Rick

    Hi Zbsbdjhd,
    You have to first define the RTSI line as an input or output depending on what you are trying to do. If you want to output a signal or value, set it to output using the Set Output Enable Method. You can then use an I/O node to write data to the line.
    Out of curiosity, what card are you using?
    Eli S.
    National Instruments
    Applications Engineer

  • Synchronise DAQ and CAN using RTSI

    I do a CAN/DAQ measurement using 2 PCI cards and a RTSI cable. However, not all of my analog samples are timestamped
    (I'm missing 930 timestamps on a total of 4700 analog samples).
    I'm using the Net RTSI config, because with the Obj RTSI config I get nothing but random timestamps for my analog signal, while CAN timestamps are OK.
    What can cause this behavior?
    Thanks,
    David.

    First of all: thanks for your reply.
    Now, the problem:
    I started of one of the examples on the NI site (http://zone.ni.com/devzone/explprog.nsf/6c163603265406328625682a006ed37d/773da68471f9efa4862569e00072a0fc?OpenDocument) and modified this somewhat to log data as binary. I also added a VI to filter out only the CAN ID I'm interested in. (I tried to use an Object instead of a Network Interface, but that resulted in random timestamps for analog... don't know why. Didn't find an example that should work to test with).
    DAQ board is used as the master, CAN is set to timestamp the RTSI events.
    The result: sometimes less, sometimes more timestamps for analog than I have analog samples.
    I have included the sample LV6 program that I use for testing. Main C
    AN-DAQ-RTSI is for acquisition, Main Reporting to read the measured files. 2 sample measurements are included too. Second example only contains noise, but ALSO has different number of timestamps than samples for analog.
    Gee, I hope I didn't bore you. )
    It would be great if someone could give me some advise.
    Thanks,
    David.
    Attachments:
    can-daq-rtsi.zip ‏162 KB

  • Can i trigger analog card using RTSI line from digital card

    I want to synchronize a PCI-DIO-32HS with a PCI-6713 and IMAQ1409 via RTSI lines and using the 32HS clock. I also need to trigger these devices from the 32HS.

    Greetings,
    Yes, both your PCI-DIO-32HS and PCI-6713 boards are able to send and receive clock and trigger signals through the RTSI Bus. Thus, you could trigger and clock your 6713 with your 32HS. I would suggest that you take a look at the examples installed with LabVIEW or NI-DAQ, and you should also search the examples available on the NI's web site -- HERE. I see that there are a number of examples designed to synchronize a 32HS with an E-Series device. These would not require a great deal of modification to substitute your 6713 for the E-Series board.
    Good luck with your application.
    Spencer S.

  • CAN loopback using RTSI programming

    Hi,
    I have 2 port CAN card from NI which can be programmed with RTSI extension. In my application, the first thing i need to do is a loopback test of the 2 ports.
    - 2 messages with different arb id's have to be sent on the port configured as TX.
    - The transmission of one message should activate the transmission of other message on the same port with the help of RTSI lines. ( RTSI 1 would be looped back with RTSI 3).
    - These messages transmitted onb TX port should be captured on the RX port.
    I tried to work on this but could not get the results. Can somebody help me in this regard??
    Regards,
    Siddu
    LabView 7.0, 6.1

    Hi Siddu,
    There are two restrictions that apply to cases like this that can make
    it pretty ‘tricky’ if the transmission needs to happen on the same CAN
    port:
    1. You can’t configure two CAN Objects with the same arbitration ID for the same port (doesn’t matter for your use case).
    2. When you configure the Network Interface to ‘Transmit a CAN Frame on
    RTSI Input’, (any) frames will only be transmit when there is a RTSI
    pulse.
    That obviously leaves CAN Objects for the transmission. For the
    receiving side however, there are only very (very) few cases where it
    is useful to use CAN Objects instead of the Network Interface.
    However, I’m not 100% sure, if I understand your need to (hardware)
    trigger the second frame. Assuming that you don’t generate any other
    CAN traffic, when you write both frames with ncWriteNet.vi (or
    ncWriteObj.vi) into the output buffer of the CAN card, the card will
    transmit the second frame as soon as it successfully transmitted the
    first frame. Thus, why the need for the RTSI trigger pulse?
    BTW: The ncWrite VIs complete when LabVIEW passed the data to write to
    the CAN card – NOT when the card successfully transmitted the frames.
    If you call ncClose right after calling ncWrite, the ncClose might stop
    the CAN card before the remaining frame(s) are written to the bus.
    Therefore, it’s always a good idea to use ncWaitForState
    (Write_Success, 0x2) before closing handles. This could be the reason
    why your VI only works when ‘highlight execution’ is turned on (as
    there is enough time between the ncWrite and the ncClose calls).
    Your VI (NI CAN Loopback Test RTSI.vi) also generates an error, but as
    the error cluster is not wired through, one doesn't see it right away:
    1. ncConfig ("CAN1", 8, {0x80000006,0x80000007,...}, {0x00000001,0x0007A120,...})
    Status: 0 (VI_SUCCESS)
    2. ncConfig ("CAN0", 8, {0x80000006,0x80000007,...}, {0x00000001,0x0007A120,...})
    Status: 0 (VI_SUCCESS)
    3. ncConfig ("CAN0:TD5", 12, {0x8000000F,0x80000013,...}, {0x000003E8,0x00000000,...})
    Status: 0 (VI_SUCCESS)
    4.  ncOpenObject ("CAN0:TD5", 41419424)
    Status: 0 (VI_SUCCESS)
    5.  ncWrite (41419424, 8, "........")
    Status: 0 (VI_SUCCESS)
    6.  ncCloseObject (41419424)
    Status: 0 (VI_SUCCESS)
    7.  ncConfig ("CAN1:TD5", 7, {0x8000000F,0x80000013,...}, {0x00002710,0x0000000A,...})
    Status: 0 (VI_SUCCESS)
    8.  ncConfig ("CAN0:TD5", 12, {0x8000000F,0x80000013,...}, {0x000003E8,0x00000000,...})
    Status: 0 (VI_SUCCESS)
    9.  ncOpenObject ("CAN1:TD5", 41419424)
    Status: 0 (VI_SUCCESS)
    > 10.  ncOpenObject ("CAN0:TD5", 0)
    > Status: 0xBFF6211D
    > 11.  ncWaitForState (41419424, 17, 20000, 18)
    > Status: 0xBFF62021
    12.  ncCloseObject (41419424)
    Status: 0 (VI_SUCCESS)
    > 13.  ncCloseObject (0)
    > Status: 0xBFF62024
    The problem here is, that the second ncOpenObject (for CAN0:TD5)
    fails (error code: 0xBFF6211D). The reason for that is that when the
    port (CAN0) was never opened directly, closing the only CAN Object on
    that port (fucntion call #6) will stop the port and reset its
    configuration. Thus when you try to open an object again, the above
    error occurs.
    -B2k

  • Simultaneous updation of sine wave using 2 PXI-6711 cards using RTSI Trigger

    Hi ,
    How to generate continuous sine wave using two pxi-6711 cards at same time without any phase shift using traditional nidaq functions.
    Regards,
    satya

    In LabVIEW, go to Help>>Find Examples. Navigate to Hardware Input and Output>>Traditional DAQ>>Multiple Device. There is an example there called "Two E Series Shared Scan Clock". That example is for analog input, but you should be able to modify it to be for analog output. Basically you will just have to share the scan clock from one board(master) and use it as an 'external' clock for the other board(slave).
    -Alan A.

  • RTSI pulse using a CAN frame

    Hi,
    I'm currently using the ncWriteMult function (we can't use the ncWrite
    function because our application simulates problems of transmission on
    the CAN i.e. stopping an exact amount a frames or sending frames with
    the wrong DLC => we need a good accuracy so we can't use for example
    ncAction(NC_OP_ START / NC_OP_ STOP) to stop N frames and then restart
    => our application fills a buffer with timestamped frames and send
    them with ncWriteMult).
    The application has to synchronize those actions with DAQ so we want to
    use RTSI. We want, for example, stop 50 0x203ID-frames, restart them
    and 100ms after send a RTSI pulse for DAQ synchronisation (to toggle an
    analog signal, that DAQ part works).
    As the application fills the buffer passed to ncWriteMult with
    timestamped frames, we 'd like to put special virtual CAN timestamped
    frame in that buffer that would only output a RTSI pulse.
    Is it possible to do that ? I tried to use the the NC_FRMTYPE_RTSI but
    this type seems to be only used to store RTSI events received by the
    CAN card in the read queue doesn't it ?
    Thanks for your replies.
    Best Regards.

    Hi JCX
    Well if i understand your request, you need to output a RTSI Pulse 100 ms after you sent 50 Frames using the Write mult net function?
    The easiest way to do so, would be using the Confog Net with RTSI to configure the RTSI output on call of nc action. Thus you will have a single RTSI Pulse on every call of nc action and you can configure this output 100 ms after your write mult  has written the last frame, controlled by using a wait for write success.
    See the attached example, for details.
    I noticed one problem with this solution: The open Function  initializes a start trigger pulse on the specified RTSI Line, thus you will see one RTSI Pulse on call of ncopen, before you enter the While loop to call the write mult. We are working on this to fix it for the next driver.
    DirkW
    Attachments:
    CAN Transmit multiple_Output_RTSI.vi ‏104 KB

  • Need to use quadrature encoder to trigger (RTSI) single point DAQ on 2 channels of E-Series DAQ, using 6602 NI-TIO for counting encoder pulses.

    This is for LV6i, W2000, all PCI equipment.
    Using a quadrature-measure position-VI, I get 7200 edges/rev from the encoder of my physical system. This equates to 0.05 degrees of angular displacement. This amounts to an angle stamp as opposed to a time stamp.
    I need each of these 7200 edges (source: 6602 NI-TIO) to trigger (using RTSI) the acquisition of a single sample from each of 2 channels on an E-Series DAQ board (maybe more channels later). I only need/want one rev (7200 samples per channel) of data for each run of the test. As I write this I think I want pre-triggering and a little more than a rev of data. So the
    re is a buffering step. Anyway, you can get the idea.
    I need this angle stamp and the DAQ samples to be placed in an array and on the hard drive for graphing and other mathematical treatment, analysis, etc.
    I think there must be a way to use the quadrature output of the counter/timer as a scan clock for the DAQ board, but I haven't seen an example to guide me.
    It seems like all of the RTSI or other triggering examples I have seen trigger once to start a continuous scan, not a series of discrete samples repeated quickly. I am not sure how to fill an array with this data. Again, examples are for continuous sampling, not a series of discrete readings.
    Any hints on any part of this task will greatly appreciated. This is my first LV project.

    Sounds like a fairly ambitious first project!
    I assume your 7200 edges/rev come from an encoder with 2 channels in quadrature which each provide 1800 cycles/rev. You can clock in analog data at 1800 scans/rev with either of the two encoder channels, but will probably need an external quadrature decoder circuit to produce 7200 scans/rev. Either method can be done with screwdriver and wire or else by using another counter from the 6602 and the RTSI bus. Here are two approaches in detail, but you could mix-and-match as needed.
    Note also that if you can be sure that your reference encoder will be uni-directional, you wouldn't need to measure position -- position could be determined by the array index of the analog scan data. This would simplify things greatly.
    1800 scans/rev, screwdriver & wire
    Wire both encoder channels to your 6602 breakout box and configure your counter for the 4x quadrature option. Send a wire from one of the encoder channel connections at your 6602 breakout box to a PFI pin at your E-series board breakout box. Config the analog acquisition to use an external scan clock and specify the correct PFI pin -- there are built-in examples that will guide you. Now one edge of one encoder channel acts as a scan clock for your analog acquisition. Inside the 6602 breakout box, route the same signal to one of the default gate pins and configure your encoder counter gate to use that pin as its gate signal. Note that there will be a race condition governing whether the encoder value updates from the encoder inputs before or after the value is latched by the gate.
    7200 scans/rev, extra counter & RTSI
    Make sure you have a RTSI connector between your two acquisition boards inside your PC. Build a quadrature decoder circuit that will convert your two encoder channels into a clock and direction output. (Consider the LSI 7084 decoder chip or similar). Setup your "encoder" counter for buffered position measurement. Use "Counter Set Attribute" to define "up down" as "digital" (don't use it to define "encoder type"). The clock output goes to the counter SOURCE and the direction output goes to the counter UP_DOWN pin.
    Use "Adjacent Counters.vi" to identify the counter considered adjacent to your encoder counter. Configure it for "retriggerable pulse generation". Use "Counter Gate (NI-TIO).vi" to specify "other counter source" as the gating signal. Configure the output pulse specs to be short duration (make sure total of delay + pulse width is less than the minimum period of the incoming encoder clock signals). Use "Route Signal.vi" to send this counter's output onto the RTSI bus, say RTSI 0.
    Now configure the analog acq. to use RTSI 0 as its external scan clock. Also configure the encoder counter to use RTSI 0 as its gate signal. Voila! Now your quadrature decoder clock output acts as a scan clock for analog acquisition and a "gate" to buffer your encoder measurement. The short delay helps ensure that the clock updates the position measurement before the gate fires to latch the value.
    Respond if you need clearer explanation. There's a fair amount of decent info "out there" if you scour the online help and this website. Good luck!

  • CAN input buffer overflow due to RTSI frame?

    Hello,
    I'm reading a continuous stream of CAN-messages with a CAN-Object. I'm creating occurences and reading multiple samples in a while loop.
    A second (asynchronuous) task generates a RTSI trigger at specified intervals. I use this trigger to write a RTSI fram to the CAN buffer. However, I get buffer overrun errors frequently. I've set the read queue to 100 and I read 20 frames each time (on occurrence). I only seem to get these overrun errors when using RTSI!
    Does someone know what my problem might be?
    Thanks a lot!

    Hi Koektrommel
    If “…and generating a RSTI time stamp every 1 ms” means that you have a 1 kHz signal on the RTSI port and you want to timestamp this, then it could be very tight. Every RTSI pulse generates an interrupt on the CAN card that the processor needs to execute in addition to the interrupts coming from the CAN controller and the communication with the Windows OS.
    Two things I can think of, that potentially could make things a little faster:
    Do not use any CAN Objects. Due to their own queues, the CPU needs more processing time to handle to additional queues compared to just using the Network Interface Object.
    Use the CAN controllers filters to filter out as many (unwanted) frames as possible. If you have a Series 1 card, you would use the regular Mask/Comparator settings for ncConfig, for Series 2 hardware you need to use the Series 2 specific filter attributes.
    -B2k

  • Working with UTF-8 text files as if they were ANSI?

    I have a text file saved in UTF-8, containing several characters from different languages. It's created in Notepad.
    I want to read that file into my Java application, which before only was used with regular ANSI .txt files.
    When showing the contents of the file on the screen (Swing GUI), the text is totally distorted. The application obviously doesn't understand from the beginning that the text file is encoded with UTF-8.
    Somehow I must convert the information in the file so that
    1) I can process the UTF-8 text in all String functions as if it were common ANSI text, and
    2) I can show the contents of those Strings on the screen in my Java application, and making it look like it should, whether it's English or Russian.
    Does anyone here have any tips or code samples that I can use?
    Thanks

    That is kind of what I'm trying to find out, how to read the file...
    When I read a text file that is saved as UTF-8, the letters don't show properly on the screen. Instead of, for example, a Pi symbol I would get a ?� or something.
    Though if I hardcode a String object that contains "\u0030" or a similar Unicode character, it shows properly.
    How do you read in the file???
    When you read in the file, you have to take the
    encoding into account.
    Take a look at InputStreamReader. This class allows
    you to specify the character encoding you will use.

  • Oracle Parsing SQL Statement in ANSI or Oracle Format

    I have problem with a Query ..It seems to be Oracle Bugs .
    When I enter below simple Query (in Oracle Join format ), It works properly
    select * from (
    select dept.*,emp.ename from dept,emp
    where dept.deptno=emp.deptno(+)
    where deptno in
    select deptno a from
    select deptno,dname from dept where deptno=10
    UNION ALL
    select deptno,dname from dept where deptno=20
    But When I changed it and use it in ANSI Format ,it is not parsed and shows me ORA-00920: invalid relational operator error ......
    Below shows the changes that I have made to convert it to ANSI Format.
    select * from (
    select dept.*,emp.ename from dept
    left outer join emp on (emp.deptno=dept.deptno)
    where (deptno) in
    select deptno a from
    select deptno,dname from dept where deptno=10
    UNION ALL
    select deptno,dname from dept where deptno=20
    It seems to be Oracle bugs.I appreciate everybody to help me.
    ( Comments : I use Oracle 9i R2 on Windows and I can not change the SQL statement
    because it is created dynamically)
    Best regards

    This sort of technical question needs to be addressed to one of the technical forums. Products | Database | SQL and PL/SQL would seem to be appropriate here.
    Have you tried applying the latest patchset for your database? Seems to work for me on 9.2.0.5
    SCOTT @ HP92 Local> select * from (
      2  select dept.*,emp.ename from dept
      3  left outer join emp on (emp.deptno=dept.deptno)
      4  )
      5  where (deptno) in
      6  (
      7  select deptno a from
      8  (
      9  select deptno,dname from dept where deptno=10
    10  UNION ALL
    11  select deptno,dname from dept where deptno=20
    12  )
    13  )
    14  /
        DEPTNO DNAME          LOC           ENAME
            10 ACCOUNTING     NEW YORK      CLARK
            10 ACCOUNTING     NEW YORK      KING
            10 ACCOUNTING     NEW YORK      MILLER
            20 RESEARCH       DALLAS        SMITH
            20 RESEARCH       DALLAS        JONES
            20 RESEARCH       DALLAS        SCOTT
            20 RESEARCH       DALLAS        ADAMS
            20 RESEARCH       DALLAS        FORD
    8 rows selected.
    SCOTT @ HP92 Local> select * from v$version;
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production
    PL/SQL Release 9.2.0.5.0 - Production
    CORE    9.2.0.6.0       Production
    TNS for 32-bit Windows: Version 9.2.0.5.0 - Production
    NLSRTL Version 9.2.0.5.0 - ProductionJustin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • LEFT OUTER JOIN multiple tables - using the 9i syntax

    I've always written my queries using the (+) operator for outer joins. I want to start using the new ANSI standard available in 9i. I can do it when I'm joining two tables in a simple query, but how does it work when I am joining multiple tables?
    Here is an example of some SQL that works with the (+) outer join syntax. How can I convert this to use the LEFT OUTER JOIN syntax?
    SELECT *
    FROM audit_entry aue,
    audit_table aut,
    audit_statement aus,
    audit_row aur,
    audit_row_pkey aup1,
    audit_row_pkey aup2
    WHERE aue.audit_entry_id = aus.audit_entry_id
    AND aut.table_name = 'TEST_AUDITING'
    AND aut.table_owner = 'CLA_JOURNAL'
    AND aus.audit_table_id = aut.audit_table_id
    AND aur.audit_statement_id (+) = aus.audit_statement_id
    AND aup1.audit_row_id (+) = aur.audit_row_id
    AND aup1.pk_column_name (+) = 'TEST_AUDTING_PK_1'
    AND aup2.audit_row_id (+) = aur.audit_row_id
    AND aup2.pk_column_name (+) = 'TEST_AUDITING_PK_2'
    I can join audit_statement to audit_entry easy enough, but then I want to join audit_table to audit_statement, how do I do that, do I start nesting the join statements?
    Thanks
    Richard

    Thanks for getting back so quickly, I have tried the suggested SQL with mixed results:
    SELECT COUNT(*)
    FROM audit_entry aue
    JOIN audit_statement aus ON aue.audit_entry_id = aus.audit_entry_id
    JOIN audit_table aut ON aus.audit_table_id = aut.audit_table_id
    RIGHT OUTER JOIN audit_row aur ON aur.audit_statement_id = aus.audit_statement_id
    RIGHT OUTER JOIN audit_row_pkey aup1 ON aup1.audit_row_id = aur.audit_row_id
    RIGHT OUTER JOIN audit_row_pkey aup2 ON aup2.audit_row_id = aur.audit_row_id
    WHERE aut.table_name = 'TEST_AUDITING_TWO'
    AND aut.table_owner = 'CLA_JOURNAL'
    AND aup1.pk_column_name = 'TEST_AUDTING_PK_1'
    AND aup2.pk_column_name = 'TEST_AUDITING_PK_2'
    I had to change the order slightly, between the first two JOINs but otherwise it executed OK. My problem is, it should only return 175 rows but its returning 30625 rows. If I comment out the second reference to audit_row_pkey I get the expected result:
    SELECT COUNT(*)
    FROM audit_entry aue
    JOIN audit_statement aus ON aue.audit_entry_id = aus.audit_entry_id
    JOIN audit_table aut ON aus.audit_table_id = aut.audit_table_id
    RIGHT OUTER JOIN audit_row aur ON aur.audit_statement_id = aus.audit_statement_id
    RIGHT OUTER JOIN audit_row_pkey aup1 ON aup1.audit_row_id = aur.audit_row_id
    --RIGHT OUTER JOIN audit_row_pkey aup2 ON aup2.audit_row_id = aur.audit_row_id
    WHERE aut.table_name = 'TEST_AUDITING_TWO'
    AND aut.table_owner = 'CLA_JOURNAL'
    AND aup1.pk_column_name = 'TEST_AUDTING_PK_1'
    --AND aup2.pk_column_name = 'TEST_AUDITING_PK_2'
    It looks the same condition is being used in each case but why do I suddenly get so many rows - its joining differently somehow. It must be to do with the order, do I need to bracket the query?
    Thanks again
    Richard

Maybe you are looking for

  • Any pre keyed effect sites that work with adobe premiere elements 11?

    I have been trying to find a legit non scam/virus site with pre keyed effects like explosions, gunshot fire, fire, and other effects like that. Most sites that I've tried are virus' or only work with imovie. Anyone know of any good sites that have pr

  • Java's Runtime.exec() method

    When you shell out to java's Runtime.exec() method, are the process name and arguments the same for the child process that is spawned. We see duplicated processes about the time when our logs tell us this command was run. However, we cannot seem to r

  • THIS SUCKS!!! Re:Multiple paths in FILE_DATASTORE path attribute

    After 6 hours of struggle I managed to solve my problem. Everything was due to a stupid mistake (or incomplete documentation of intermediaText) on Oracle's part: 1. Pasted from Oracle8i interMedia Text Reference - Datastore Objects: You can specify m

  • Problem with testdrive setup on win2K

    first i install iplanet Web Server 6.0 , works fine. second i install ias6.0 sp3, but got a blank directory. nothing copied on the disk after it prompt "install complete successfully". i saw some post said a article in 7/20 maybe help, but i can not

  • How do i print GR in MIGO !!!Urgent

    Hi all, Please privde me steps  to either print or Print Preview the output of GR for PO in MIGO. This is kind of urgent. Thanks-