Extraction of several lines using CONNECT BY

Hello

It's the structure of the table:

CREATE TABLE XX_SHIFT_EXCEPTIONS
(
PLANT_SHIFT_EXC_ID     NUMBER(18) NOT NULL,
START_DATE  DATE NOT NULL ,
END_DATE              DATE NOT NULL ,
EXC_START_TIME        NUMBER(18) NOT NULL ,
EXC_DURATION                   NUMBER(18),      
EXC_END_TIME           NUMBER(18) NOT NULL);

INSERT INTO XX_SHIFT_EXCEPTIONS
VALUES
(1,'27-NOV-2015','30-NOV-2015',1200,480,2000);

INSERT INTO XX_SHIFT_EXCEPTIONS
VALUES
(2,'28-NOV-2015','28-NOV-2015',1200,480,2000);

INSERT INTO XX_SHIFT_EXCEPTIONS
VALUES
(3,'27-NOV-2015','28-NOV-2015',1200,480,2000);

I want my result to look like this:

START_DATE END_DATE EXC_START_TIME EXC_END_TIME PLANT_SHIFT_EXC_ID

1 27 NOVEMBER 2015 27 NOVEMBER 2015 1200 2000

1 NOVEMBER 28 NOVEMBER 28, 2015 2015 1200 2000

1 NOVEMBER 29 NOVEMBER 29, 2015 2015 1200 2000

1 NOVEMBER 30 NOVEMBER 30, 2015 2015 1200 2000

2 NOVEMBER 28 NOVEMBER 28, 2015 2015 1200 2000

3 27 NOVEMBER 2015 27 NOVEMBER 2015 1200 2000

3 NOVEMBER 28, 2015 28 NOVEMBER 2015 1200 2000

I tried the below:

SELECT  PLANT_SHIFT_EXC_ID,START_DATE+LEVEL-1 START_DATE,START_DATE+LEVEL-1 END_DATE,EXC_START_TIME,EXC_END_TIME
from
(SELECT * FROM XX_SHIFT_EXCEPTIONS
WHERE TRUNC(END_DATE)!=TRUNC(START_DATE)) SHIFT1
CONNECT BY LEVEL<=(END_DATE-START_DATE+1)
UNION ALL
SELECT PLANT_SHIFT_EXC_ID,START_DATE,END_DATE,EXC_START_TIME,EXC_END_TIME
FROM XX_SHIFT_EXCEPTIONS WHERE END_DATE=START_DATE
order by 1,2;

But the result set is not wait for him as for factory shift 1, I get 11 lines instead of 4 rows

Help, please. Thank you.

so, something like this:

WITH XX_SHIFT_EXCEPTIONS (plant_shift_exc_id, start_date, end_date, exc_start_time, exc_duration, exc_end_time)

AS (SELECT 1, to_date (27 November 2015 "," MON-DD-YYYY ""), to_date (November 30, 2015 "," MON-DD-YYYY'"), 1 200 480, 2000 FROM dual UNION ALL)

SELECT To_date 2 (November 28, 2015 "," MON-DD-YYYY ""), to_date (November 28, 2015 "," DD-MON-YYYY ' "), 1 200 480, 2000 FROM dual UNION ALL

SELECT 3, to_date (27 November 2015 "," MON-DD-YYYY ""), to_date (November 28, 2015 "," MON-DD-YYYY'"), 1 200 480, 2000 DOUBLE)

SELECT PLANT_SHIFT_EXC_ID, START_DATE + LEVEL 1 START_DATE, END_DATE START_DATE + LEVEL 1, EXC_START_TIME, EXC_END_TIME

OF XX_SHIFT_EXCEPTIONS

CONNECT BY LEVEL<= (end_date="" -="">

AND PRIOR plant_shift_exc_id = plant_shift_exc_id

and prior sys_guid() is not null

/

HTH

Tags: Database

Similar Questions

  • Update of several lines using the join condition

    Hi all

    CREATE OR REPLACE
    PROCEDURE update_t
    IS

    BEGIN
    SheikYerbouti IN (SELECT EMPLOYEE_ID, FIRST_NAME, LAST_NAME FROM hr.employees)
    LOOP
    UPDATE
    HR.employees1
    SET
    FOCA =)
    Select concat (FIRST_NAME, LAST_NAME) in the hr.employees where SheikYerbouti. EMPLOYEE_ID = 197);
    END LOOP;
    END update_t;
    /

    I'm trying to update column Foca Employees1 table. When I run this procedure, I get the error

    Error report:
    ORA-01427: einreihig subquery returns multiple rows
    ORA-06512: at "SYSTEM. UPDATE_T", line 13
    ORA-06512: at line 1
    01427 00000 - "einreihig subquery returns several lines.

    Please let me know a solution for this.

    Thank you
    Mathon

    Hello Mathieu,
    in your internal SQL result set is not limited to just one line.
    Try this

    UPDATE hr.employees1 SET
    FIRST_LAST= (select concat(FIRST_NAME,LAST_NAME) from hr.employees where emp_rec.EMPLOYEE_ID=hr.employees.employee_id);
    

    Your version had no restrictions on selected lines of hr.employees. You gave a where condition clause that is not related to the query.

    The best solution for your problem is to avoid completely any PL/SQL loop. You can try something like this:

    update
       (select
           e1.first_last,
           e.first_name,
           e.last_name
        from
           hr.employees1 e1,
           hr.employees e
        where
           e1.employee_id=e.employee_id) set
       first_last=first_name||last_name;
    

    But beware, the updates on the joints work only under certain restrictions. The key of the table to be updated must be the join key. (key preserved is the word to look for).

    Hope that helps,
    dhalek

  • Split the cell enclosed in several lines using REGEXP_SUBSTR - Performance?

    Hello

    I have a table that has about 20,000 lines. There is a column called key word which has values like below:

    File_id Keyword
    1SMITH; ALLEN; WARD; JONES; BRADY
    2S & P500; TOPIX
    3SMALL; LARGE; MEDIUM

    I want to display the data like this:

    File_id KEYWORD
    1SMITH
    1ALLEN
    1WARD
    1BRADY
    2S & P500
    2TOPIX
    etc.

    I use this application and it works:

    SELECT STG. FILE_ID, REGEXP_SUBSTR (STG. KEYWORD ' [^;] +', 1, LEVEL) AS A KEYWORD OF STG STG_TABLE

    CONNECT REGEXP_SUBSTR (STG. KEYWORD ' [^;] +', 1, LEVEL) IS NOT NULL

    But its so slow its unusable.

    Is there a faster way to return this output?

    Other info:

    KEY Word is varchar2 (4000), but rarely more than 100 bytes are used

    Oracle 11g 2

    Thank you!

    Wrong approach, there are too many lines that are generated

    Apart from replacing regexp with substr/instr, try the first slot

    SELECT

    STG. FILE_ID

    REGEXP_SUBSTR (STG. KEYWORD ' [^;] +', 1, LEVEL) AS KEYWORD

    OF STG STG_TABLE

    CONNECT

    level<= regexp_count(stg.keyword,';')="" +="">

    and prior STG. FILE_ID = STG. FILE_ID

    and prior sys_guid() is not null

  • Need help to insert several lines using PL/SQL

    Hi gurus,

    I wrote a simple PL/SQL to insert the recrods in a table. It works fine if the sql script that is stored in the column to the table TEST_VALIDATION SCRIPT returns a single line. Can you get it someone please let me know a better way to insert multiple results returned by the script? Rest columns can be duplicated.

    DECLARE

    p_rows default NUMBER of 0;

    CURSOR C1_TV
    IS
    SELECT ID, DESCRIPTION, TEST_VALIDATION SCRIPT;

    BEGIN

    FOR C1_TV_REC in C1_TV
    LOOP

    Run immediate C1_TV_REC. SCRIPT in p_rows;

    INSERT INTO THE VALIDATION
    (END_DATE,
    VALIDATION_ID,
    VALIDATION_DESCN,
    VALIDATION_COUNT
    )
    VALUES
    (
    (select sysdate to DOUBLE),
    C1_TV_REC.ID,
    C1_TV_REC. DESCRIPTION,
    p_rows
    );

    COMMIT;

    END LOOP;

    END;
    /

    Please let me know if this isn't clear.

    Thank you
    Shash

    You need something like that

    declare
      p_rows dbms_sql.number_table;
      i pls_integer;
    begin
      execute immediate SCRIPT bulk collect into p_rows;
      i:=1;
      loop
        exit when i>p_rows.count;
        insert... p_rows(i)....
        i:=i+1;
      end loop;
    end;  
    

    or the much faster method (if it works in your case)

    declare
      p_rows dbms_sql.number_table;
      i pls_integer;
    begin
      execute immediate SCRIPT bulk collect into p_rows;
      forall i in p_rows.first..p_rows.last
         insert into table (field) values (p_rows(i));
    end;  
    

    And why you use

    (select sysdate from DUAL)
    

    Just use

    sysdate
    

    Published by: Oleg Gorskin the 12.01.2010 06:51
    Add method with forall

  • Updated several lines using BOX WHEN

    I have the table ACCOUNT of structure as follows:

    Account_id ACCOUNT_STATUS
    0044607212
    0420562915
    6012720653

    I need to update the three rows at a time using a SELECT statement such that the second column will be respectively 5, 3, 2.
    I used the following query but it seems something is missing

    UPDATE ACCOUNT
    SET ACCOUNT_STATUS = CASE  
    WHEN ACCOUNT_STATUS = '004460721' THEN 5 
    WHEN ACCOUNT_STATUS = '042056291' THEN 3 
    WHEN ACCOUNT_STATUS = '601272065' THEN 2 
    WHERE ACCOUNT_ID IN ('004460721','042056291','601272065') 

     

    My question is this correct way? If not, I can use CASE WHEN statement and how or I only have the choice of use of SUB-SELECT to achieve this objective in a single statement?

    Don't know what SQLFiddle is and the DB, it uses, but it worked at Oracle 10.2.0.5:

    create table account (key primary number account_id,)
    account_status varchar2 (30));

    insert into a values (1, '5') account;
    insert into a values (2, '3') account;
    insert into a values (3, '2') account;

    update account

    Set the account_status CASE account_id =

    WHEN 1 then "2"

    WHEN THEN 2 '5'

    WHEN 3 THEN "3"

    END

    WHERE account_id IN (1,2,3);

    Select *.

    account;

    ACCOUNT_ID ACCOUNT_STATUS

    ---------------------- ------------------------------

    1                      2

    2                      5

    3                      3

  • Get several lines with the request - please help

    Hello

    I have query that gives me the output below.
    select distinct a.*,cu1.usr_key,cu1.first_nm,cu1.last_nm
    from(
          select ng.grp_key, ng.grp_nm , gt.grp_typ_nm, stts.nm as grp_sts, ng.expiry_date, ng.updt_dttm, stts.stts_key
          from new_group ng, user_group ug, group_type gt, status stts
          where ug.grp_key = ng.grp_key and ng.grp_typ_key = gt.grp_typ_key and 
          ng.stts_key = stts.stts_key and
          ug.usr_grp_rl_typ_key = 1 and 
          lower(ng.grp_nm) like 'test foe%'
          union 
          select ng.grp_key, ng.grp_nm , gt.grp_typ_nm, sts.nm as grp_sts, ng.expiry_date, ng.updt_dttm, sts.stts_key
          from new_group ng, group_type gt, status sts
          where ng.grp_typ_key = gt.grp_typ_key and ng.stts_key = sts.stts_key and 
          lower(ng.grp_nm) like 'test foe%')a, common_user cu1, user_group ug1
    where cu1.stts_key = a.stts_key and cu1.usr_key = ug1.usr_key and ug1.usr_grp_rl_typ_key = 1 and ug1.grp_key(+) = a.grp_key;
    18345 enemy test remove Group organization DELETED February 9, 12 AM 3 09.38.34 29742 Sam Saed
    18345 enemy test remove Group organization DELETED 9 February 12 09.38.34 AM 3 29643 dummyName514 dummy
    18345 enemy test remove Group organization DELETED February 9, 12 09.38.34 AM 3 28917 TestMObileUser Gujral
    18345 enemy test remove Group organization DELETED February 9, 12 AM 3 27284 Rocky jegou 09.38.34
    18345 enemy test remove Group organization DELETED February 9, 12 AM 3 28920 Bhavani Gujral 09.38.34
    18345 enemy test remove Group organization DELETED 9 February 12 09.38.34 AM 3 29645 dummyFName516 dummy
    18345 enemy test remove Group organization DELETED February 9, 12 AM 3 27316 Karthik Gilani 09.38.34
    18345 enemy test remove Group organization DELETED February 9, 12 AM 3 28147 Bowl David Mathews 09.38.34
    18345 enemy test remove Group organization DELETED February 9, 12 AM 3 09.38.34 29731 Sam Saed
    18345 enemy test remove Group organization DELETED February 9, 12 AM 3 28919 Madhu mango 09.38.34

    For a group 18345, there are 10 users and this is the reason why I get a multiple user records.

    I can't avoid these last three columns, because I have to show these values in the application.

    In my opinion, the UNION is at the origin of the problem. Can I replace the UNION here? Please share your ideas on this.

    Thank you
    Rambeau

    Published by: ouali on February 9, 2012 22:35

    Hello

    because I have to show these values in the application.

    What is your problem then? If you simply issue a SELECT statement to application code or send the data back to REF CURSOR, it will be quite OK to have several lines. That's what the SELECT statements are for: to return sets of results with several lines.
    So, could not explain your problem more in detail please? If you get an error somewhere, provide the code causing the error and the error message (it is probably ORA-001422 exact extraction returns several lines somewhere in PL: / SQL, isn't it? then post here).

    In my opinion, the UNION is at the origin of the problem. Can I replace the UNION here? Please share your ideas on this.

    Us don't know not the answer to this question, because no one here knows your needs (what you need).

  • How to insert multiple lines using a single query

    Hi all

    How to insert multiple lines using a single query to the emp table?
    I have the number of rows to insert into table x. consumes a lot of time. I tried to insert several lines using a single query, but get errors. I know exactly the query to do this.


    Thank you
    Sunil

    Like this?

    SQL> create table test(id number , dt date);
    
    Table created.
    
    SQL> insert into test values(&a,&b);
    Enter value for a: 1   --- It asked me and I entered 1
    Enter value for b: sysdate  --- It asked me and I entered sysdate
    old   1: insert into test values(&a,&b)
    new   1: insert into test values(1,sysdate)
    
    1 row created.
    
    SQL> 
    

    g.

  • How to extract the same song, several times using different bit rates or formats and store all the digital music files in WMP 12 default on the same HDD music library

    Using Windows Media Player 12 (w/under Windows 7), "can I ripping the same song, several times, using different bitrates & and/or formats and store all the digital music files in the music library by default WMP - 12, on the same hard drive?

    1.) #1 goal: tear up the same song repeatedly, w / "different rates" as a WMA file.

    2.) #2 goal: tear up the same song repeatedly, w / "different rates" as an mp3 file.

    3.) #3 objective: NOT to each subsequent copy (version) of the song, deleted & and/or replaced by the previous version of the song [even].

    4.) question Bottom Line Up Front--> is Windows Media Player 12 (included with the Windows 7 operating system) are able to achieve '#1 objectives; #2; & #3 above?

    5.) details/example: I want to tear the piece "Maria Maria by Carlos Santana" to my laptop as a Windows Media Audio [WMA] file.  In addition, I would like to rip the song 'Maria Maria' three several times with 3 different bitrates in format WMA; and, as an MP3 file.  Therefore, my final result wished (after the extraction process), will take place the four 4 audio files split up as follows: (a) 'Maria Maria by Carlos Santana'--> Format: file WMA; Ripped @128 Kbps bitrate.  (b) ' Maria Maria by Carlos Santana'--> Format: file WMA; Ripped to the "Variable bit rate; (c) ' Maria Maria by Carlos Santana'--> Format: file WMA; Ripped commissioning "Lossless." and (d). 'Maria Maria by Carlos Santana'--> Format: MP3 file. Ripped @256 Kbps bitrate.

    6.) my preference: I do NOT want to rename the file (s). {for example, 'Maria Maria by Carlos Santana' renamed/changed for--> "Maria_Maria_by_Carlos_Santana_128kbps.wma",...} 'Maria_Maria_by_Carlos_Santana_256kbps.mp3 '; etc.}.  In addition, I am not concerned about the additional disk space that will be consumed after multiple copies of the same song with different speeds of transmission and different formats.

    7.) my experience w / Windows Media Player 10 (w / the operating system of Windows XP): using WMP - 10, my goal (s) described above is not a problem at all.  Simply insert the CD purchased by Carlos Santana, containing the song "Maria Maria"... Select the desired Format (WMA; WMA VBR; WMA Lossless; or mp3)... Select the desired flow rate (WMA... 128/160/192kbps_mp3: 128/192/256/320 kbit / s; etc.) ; and click on the "RIP" button to start the copy process on the hard disk of of Carlos Santana's "Maria Maria".  This process (w / WMP-10) would result in having the same song, copied on the hard disk, with levels of quality different "audio" (via the different bit rate settings); regardless of the format (MP3/WMA) which was chosen.

    8.) my experience w / Windows Media Player 11 (w / the operating system of Windows XP): using WMP 11, to described above of my objective (s) could not be reached e-a-s-i-l-y.  The problem with WMP - 11 - in short - which was after the desired selection "Rip settings" tab 'Options' of WMP - 11 (i.e., Format & Bit Rate) and heart-wrenching piece wanted to {'Maria Maria by Carlos Santana'} a moment later/second, WMP11 remove / would crush the previous version of the song [even].  Therefore, the program would NOT allow the user to have multiple copies of the same song on the hard drive of the PC; which obviously restricts a user to have the freedom to choose what level of quality digital audio, they prefer to listen to.

    9.) the ability to have multiple copies [at my descretion] of the same song (on my hard drive) with different bitrates and formats in my music library, is important for me because it has a direct impact on "how I enjoy MY music ', and in what form (audio quality), I choose to listen to my music.  {For example, when I exercise and listening to my camera, digital audio player (Zune), a song ('Maria Maria by Carlos Santana'), will usually be torn off at a lower rate due to the unit of capacity reduction of storage - compared to the storage capacity of notebook PCs/desktop/external hard drives PC.}  However, when I listen to my music through my home cinema or entertainment system (which contains a hard disk dedicated with a large storage capacity), I prefer to load the entertainment system with digital music files that have been ripped to WMA... with the bit being rate-setting is for the: settings "WMA Variable Bit Rate" or "WMA Lossless.

    10.) there you have it.  This is my first post in this forum.  I hope that [detailed] explanations, will be sufficient to encourage these "with knowledge & the hands on experience" using Windows Media Player 12 (as well as with WMP-10/WMP-11 respectively), by providing a [step] "How-to"... "solution to my situation.  It would be highly appreciated.  I'm looking forward-'the solution' - and relevant suggestions & and/or community feedback regarding my request for assistance.

    * Thank 'All' (that would) in advance... For your time & Assistance *.

    Certainly, you can, but I would say that they be in different folders, for your convenience as well as Windows.  You can create one for each debit/format, then you will know who is who.

    In Windows Media Player, on the toolbar, select Tools, Options, Rip, and then select the flow you want first, rip music, then change the folder (higher on the same tab) and rip again... and so on and so forth.

    When you are at home on your home theater, you can use the 320 bitrate folder, when you transfer to the Zune, you can use one of the lower bitrate files (although I personally tear it up to 320 and let the Zune reduce as he wants, even with the iPhone via iTunes, hard drive space is not really a problem here) my server has several hard drives, and I can always add more if and when space is low!

  • Using pathfinder to cut a shape of several lines

    Hello

    There is probably a really easy answer to this, but I'm not. I created a model space "scratches" by using several lines aligned and equal remote etc, I then placed a form of rectangle on top of these lines and to extract the rectangle of the lines so that I'm only left with the pattern of scratches in the area of the rectangle. Hope that makes sense, could not think of a better way to describe!

    Thank you

    I'm not sure that understand what you're trying to do, i.e. the need to use the Scout at all. What group the traits and resize or make a compound path? Or even by selecting copy/cut, then 'paste' in the new frame?

    You try to use it as a filling for a frame that is containsomething else? If so, you might want to build a gradient instead.

    Peter

  • Help to extract data Clob to a column in a table that has several lines in a table

    Help to extract data Clob to a column in a table that has several lines in a table

    It works for only the first line

    CREATE or REPLACE DIRECTORY XMLDIR AS ' / orabackups';

    Grant read, write on DIRECTORY XMLDIR to the public;

    () dbms_xslprocessor.clob2file

    beef in CLOB,

    XMLDIR IN VARCHAR2,

    "testfile2.txt" IN VARCHAR2);

    DECLARE

    buf CLOB.

    BEGIN

    SELECT H15_DOC

    IN buf

    OF H15TEST. H15_STAGE

    where rownum = 1;

    dbms_xslprocessor.clob2file (buf, 'XMLDIR', 'testfile2.txt');

    END;

    /

    -This error code

    CREATE or REPLACE DIRECTORY XMLDIR AS ' / orabackups';

    Grant read, write on DIRECTORY XMLDIR to the public;

    () dbms_xslprocessor.clob2file

    XData in CLOB,

    XMLDIR IN VARCHAR2,

    "testfile2.txt" IN VARCHAR2,

    CSID in NUMBER: = 0);

    DECLARE

    CURSOR xmlmycur IS SELECT H15_DOC

    OF H15TEST. H15_STAGE

    where rownum = 102140;

    l_clob CLOB.

    XData CLOB.

    BEGIN

    DBMS_LOB.CREATETEMPORARY (l_clob, true);

    DBMS_LOB.CREATETEMPORARY (xdata, true);

    OPEN xmlmycur.

    LOOP

    SEEK xmlmycur INTO xdata;

    dbms_xslprocessor.clob2file (xdata, 'XMLDIR', 'testfile2.txt');

    EXIT WHEN xmlmycur % notfound;

    END LOOP;

    CLOSE Xmlmycur;

    END;

    /

    ORA-21560: 3 argument is null, invalid or out of range

    ORA-06512: at "SYS." DBMS_LOB", line 991

    ORA-06512: at "XDB". DBMS_XSLPROCESSOR', line 324

    ORA-06512: at line 15 level

    FYI, it seems that the file being created will exceed 5 gig

    Yes, it is a known issue with DBMS_XSLPROCESSOR.clob2file with big files.

    Here is a slightly modified version of the code that I posted earlier, fixing WRITE_ERROR except:

    DECLARE

    v_file utl_file.file_type;

    -write a unique to clob

    procedure write_clob (p_content in clob) is

    v_buffer varchar2 (32767).

    V_POSITION pls_integer: = 1;

    v_amount pls_integer: = 32767;

    Start

    loop

    Start

    DBMS_LOB. Read (p_content, v_amount, v_position, v_buffer);

    exception

    When no_data_found then exit;

    end;

    UTL_FILE.put_raw (v_file, utl_raw.cast_to_raw (v_buffer), true);

    V_POSITION: = v_position + v_amount;

    end loop;

    end;

    BEGIN

    -Open the file

    v_file: = utl_file.fopen ('TEST_DIR', 'testfile2.txt', 'wb', 32767);

    -loops through the lines

    for r in)

    Select h15_doc

    of h15test.h15_stage

    )

    loop

    write_clob (r.h15_doc);

    end loop;

    UTL_FILE.fclose (v_file);

    END;

    /

  • I tried several times using IE, Chrome and Firefox browsers (win) to download the files for Indesign CS6 - all of these attempts have failed to extract the files. Other parts of the plant extract successfully, so I don't think I have

    I tried several times using IE, Chrome and Firefox browsers (win) to download the files for Indesign CS6 - all of these attempts have failed to extract the files. Other parts of the plant extract successfully, so I don't think that's my machine or OS (Win 7 Pro). I have been fighting for three days and am losing patience fast. Advice or assistance will be appreciated.

    I finally got it to work using a different machine and copy the files on a USB stick for transfer to the machine I need installed on!

  • How to use the checkbox to select several lines of af: table

    Hi all
    I want to use the checkbox to select several lines of af: table

    Kind regards
    Tom

    Hello

    look at this link
    http://Sameh-Nassar.blogspot.com/2009/12/use-checkbox-for-selecting-multiple.html

    Kind regards
    Felix

  • Selection of several lines

    OK, I have three tables, two tables are one and one is one to many. From one to the other tables have all the data in a row and one of many data available in several lines. The table several (named county_notes) has notes on specific counties. Other tables (named county_bio and county_stats) have different information about each County. The three tables are connected by a code.

    What I want to be able to list notes on each county and County information in the same report.

    For example:

    Record1
    County: Craven
    Phone: (252)123-4567
    Notes:
    Judy is nice
    John is average

    The tables would be like this:

    county_bio
    County_name ID
    1 craven


    county_stats
    ID county_phone
    1 (252) 123-4567

    county_notes
    Notes ID
    1 Judy is nice
    1 John is average


    Of course the tables above are just examples, but you get the idea of how the tables are arranged to the top. The problem is that I can join the table of county_notes to one of the two using tables, it's bad. Problem 2, Coldfusion separates each note in another record. So I find myself with record "craven" showing twice (once with the note about judy) and once with the note about john.

    Here's the SQL code that connects county_bio and county_notes:
    SELECT *.
    OF county_bio
    County_notes LEFT JOIN
    ON county_bio.ID = county_notes.county_ID

    First of all how all three tables connected? And on the other hand how ColdFusion to print each note about the County in a record?

    Thanks for any help! I have worked on this for a few days and am running out of ideas.

    wbnc1902 wrote:
    > First of all how all three tables connected?

    something like this:

    SELECT *.
    OF (county_bio INNER JOIN county_stats ON cb.ID = cs.ID cs cb)
    LEFT JOIN county_notes ON cb.ID = cn.county_ID cn

    NOTE: it is not the best practice use SELECT *. Instead, you should
    List the actual columns that you have selected.

    > And on the other, how do
    > ColdFusion to print each note about the County in a record?

    Search for the tag CFOUTPUT GROUP attribute in the docs

    HTH

    ---
    Azadi Saryev
    SABAI - Dee.com
    http://www.SABAI-Dee.com

  • Extract the first line containing "critical" or "E-Stop" of the last avalanche of line

    Hi all

    I'm watching some test systems by analyzing their audit files.

    In this case, the platform generates several line 100 files in a specific folder. The code below is to find the last file and extract the contents of the last line of the last file.

    Unfortunately, when an error occurs, the main software generates not only one entry, but an avalanche of lines [not a specific quantity of them, depending on how much the alarms are resolved] and I'm now ideas of how I could identify and the contents of the first line containing "Criticism" or "E-Stop" to exit from this avalanche [line avalanche started 22.27].

    As an example, the above program is extract the yellow line, while I need information from the blue line.

    Any idea on how I can do this?

    See you soon,.

    You can add this snippet to the top of your existing code.  I changed the indicator table to a table so I could highlight the line.

  • Match pattern IMAQ 4 to superimpose several lines 2

    Hello community OR,.

    I have a problem connecting to the match pattern to superimpose several lines 2.

    I want to track an object from a video webcam.

    In this help http://zone.ni.com/reference/en-XX/help/370281U-01/imaqvision/imaq_match_pattern_4/ it is said that the Matches (Pixels) (Bounding Box) must be connected to the superposition of several lines to the end of line Points. But I can't take the bounding box only. I tried the unbundling of the table 1 d of the clusters, but I can't do it.

    Any help is appreciated. I can post a picture of my code if requested.

    Thank you

    Marwan Sabry

    I'm sorry, it's an array of clusters.
    -Therefore, index 0 for the first game.
    -unbundling with name for encompassing and then pass it to overlay vi.

Maybe you are looking for

  • Contact requests from not not by

    Recently, a friend and I worked through a fight we had and decided to unlock and add another. I sent him a request and she sent me a request, but both have our skypes always the question marks next to our names and none of our Skype display a button

  • OR PCI-8330 / not seen in Device Manager

    Hello I have a card NI PCI-8330. I tried this on 2 different computers (PCI slot) card and the card is not even detected in Device Manager. The "New Hardware Wizard" shows yet until it is. Possible bad card? Any suggestions please? Thank you!

  • Image Browser EX is slow to launch

    When I updated to ZoomBrowser EX for ImageBrowser EX, the new browser takes 10 times longer to load photos. Is this normal?

  • The desktop printer icon is no longer shows printer or scanner-controls specific to the

    I have a DeskJet 3050 a J611g all-in-one. I use Windows 7 64-bit. Normally, when I doule - click the icon for the printer to my desktop, I get a window that shows the image of the printer and the HP logo at the top with several printer options and sp

  • Scam? Free laptop from Microsoft or w/Microsoft

    Received the letter today with the logo of microsoft in the area of the return label. Inside "in honor of the holidays, our promotional Department has programmed allows you to receive a complete new laptop with a new software of Microsoft.» "Call now