Track a Line String with a Trigger

Hi,
(sorry for my bad english)
I need to know if i can track a Line String with a trigger. For example, in my case, i've to colums called "COORDINATEPARTENZA" and "COORDINATEARRIVO". From contains a CONTROID() coordinates, anche TO contains CENTROID() coordinates. Now, can i track a line in a colums "LINE" with a trigger? All in automatic?
There is a method to take the coordinates from "COORDINATEPARTENZA" and "COORDINATEARRIVO" and track an automatic stringline with a trigger?
This is the code:
This is the Trigger:
CREATE OR REPLACE TRIGGER "TRIGGERPERCORSO"
BEFORE INSERT OR UPDATE OF luo_nomeluogo ON "SPOSTAMENTI"
FOR EACH ROW
DECLARE
partenza VISUALPERCORSO.coordinatepartenza%TYPE;
arrivo VISUALPERCORSO.coordinatearrivo%TYPE;
vecchioluogo LUOGHI.nomeluogo%TYPE;
nuovocodicespostamento SPOSTAMENTI.codicespostamento%TYPE;
presenza NUMERIC;
BEGIN
SELECT COUNT(*) INTO presenza
FROM spostamenti
WHERE ope_codiceopera = :new.ope_codiceopera;
IF (presenza >= 1) then
SELECT luo_nomeluogo INTO vecchioluogo
FROM (SELECT * FROM spostamenti
WHERE ope_codiceopera = :new.ope_codiceopera
ORDER BY codicespostamento DESC)
WHERE ROWNUM <2;
SELECT SDO_GEOM.SDO_CENTROID (c.COLLOCAZIONE, m.diminfo) INTO partenza
FROM LUOGHI c, user_sdo_geom_metadata m
WHERE m.table_name = 'LUOGHI' AND m.column_name = 'COLLOCAZIONE' AND c.nomeluogo = vecchioluogo;
SELECT SDO_GEOM.SDO_CENTROID (d.COLLOCAZIONE, n.diminfo) INTO arrivo
FROM LUOGHI d, user_sdo_geom_metadata n
WHERE n.table_name = 'LUOGHI' AND n.column_name = 'COLLOCAZIONE' AND d.nomeluogo = :new.luo_nomeluogo;
INSERT INTO VISUALPERCORSO(LUOGOPARTENZA, OPE_CODICEOPERA, COORDINATEPARTENZA, LUOGOARRIVO, COORDINATEARRIVO) VALUES (vecchioluogo, :new.ope_codiceopera, partenza, :new.luo_nomeluogo, arrivo);
END IF;
END;
So, now i need to track a line (with oracle spatial) from "COORDINATEPARTENZA" to "COORDINATE ARRIVO". With another trigger.
Thanks a lot (sorry for my bad english).

"COORDINATEPARTENZA" and "COORDINATEARRIVO" are points, correct?
If I understand, you need to create a line from initial point (PARTENZA) to final point (ARRIVO) in a trigger.
Yes, you can do it.
Anyway, you can write to me in italian (miguel dot fornari at gmail).

Similar Messages

  • Multiple video tracks to line up with audio- iMovie or Finalcut??

    I am trying to make music videos, like this: http://www.youtube.com/watch?v=aEzpIAdsur8&feature=channel_video_title
    I have iMovie, and my main problem is getting the video to line up with the audio. I can make the audio tracks like up just fine, but then I am stuck with just one video clip to use, I cant go back and forth between different video clips of me playing different instruments because I can't line them up perfectly with the song. Help?
    I have been debating wether or not to get final cut express 4, because from what the reviews say it allows multiple video tracks to be used. Would that solve my problem?

    This forum is for mobile iMovie (iPhone & iPad).
    You may need the iMovie Mac forum:
    https://discussions.apple.com/community/ilife/imovie

  • Searching from beginning of a line/string with Oracle Text ...

    Oracle Database 10.2.0.3, Solaris
    Hi,
    what sounds very easy with the LIKE operator seems to be impossible with the Oracle Text Operator Contains ;
    Searching for 'Deutsche%' results with LIKE ->
    'Deutsche Bank'
    'Deutsche Post'
    'Deutsche Oracle Community'
    But with Contains-Operator which is token based the result is following ('$Deutsche%')
    'Deutsche Bank'
    'Armin Deutscher'
    We want to get results starting with 'Deutscher...' But with Contains and some configuration i did not find a way. Combining LIKE with Contains did not help too because Contains expands the word in more instances then LIKE.
    Indexed Columns are varchar2 typed
    any idea?
    kind regards
    Karl
    Message was edited by:
    kreitsch

    Have you evaluated the query rewrite template with CONTAINS?
    http://download.oracle.com/docs/cd/B19306_01/text.102/b14218/csql.htm#sthref122

  • Track a StringLine with a Trigger

    Hi,
    (sorry for my bad english)
    I need to know if i can track a stringline with a trigger. For example, in my case, i've to colums called "From" and "To". From contains a CONTROID() coordinates, anche TO contains CENTROID() coordinates. Now, can i track a line in a colums "LINE" with a trigger? All in automatic?
    There is a method to take the coordinates from "FROM" and "TO" and track an automatic stringline with a trigger?
    The Table is composed by:
    ID | FROM | TO | LINE
    Thanks a lot (sorry for my bad english).

    Ok, i means a simple line (Line Sting http://www.oracle.com/pls/db111/to_URL?remark=ranked&urlname=http:%2F%2Fdownload.oracle.com%2Fdocs%2Fcd%2FB28359_01%2Fappdev.111%2Fb28400%2Fglossary.htm%23sthref2928)
    This is the Trigger:
    CREATE OR REPLACE TRIGGER "TRIGGERPERCORSO"
    BEFORE INSERT OR UPDATE OF luo_nomeluogo ON "SPOSTAMENTI"
    FOR EACH ROW
    DECLARE
    partenza VISUALPERCORSO.coordinatepartenza%TYPE;
    arrivo VISUALPERCORSO.coordinatearrivo%TYPE;
    vecchioluogo LUOGHI.nomeluogo%TYPE;
    nuovocodicespostamento SPOSTAMENTI.codicespostamento%TYPE;
    presenza NUMERIC;
    BEGIN
    SELECT COUNT(*) INTO presenza
    FROM spostamenti
    WHERE ope_codiceopera = :new.ope_codiceopera;
    IF (presenza >= 1) then
         SELECT luo_nomeluogo INTO vecchioluogo
         FROM (SELECT * FROM spostamenti
         WHERE ope_codiceopera = :new.ope_codiceopera
         ORDER BY codicespostamento DESC)
         WHERE ROWNUM <2;
         SELECT SDO_GEOM.SDO_CENTROID (c.COLLOCAZIONE, m.diminfo) INTO partenza
    FROM LUOGHI c, user_sdo_geom_metadata m
    WHERE m.table_name = 'LUOGHI' AND m.column_name = 'COLLOCAZIONE' AND c.nomeluogo = vecchioluogo;
    SELECT SDO_GEOM.SDO_CENTROID (d.COLLOCAZIONE, n.diminfo) INTO arrivo
    FROM LUOGHI d, user_sdo_geom_metadata n
    WHERE n.table_name = 'LUOGHI' AND n.column_name = 'COLLOCAZIONE' AND d.nomeluogo = :new.luo_nomeluogo;
    INSERT INTO VISUALPERCORSO(LUOGOPARTENZA, OPE_CODICEOPERA, COORDINATEPARTENZA, LUOGOARRIVO, COORDINATEARRIVO) VALUES (vecchioluogo, :new.ope_codiceopera, partenza, :new.luo_nomeluogo, arrivo);
    END IF;
    END;
    So, now i need to track a line (with oracle spatial) from "COORDINATEPARTENZA" to "COORDINATE ARRIVO". With another trigger.
    Can you understand now?

  • Error  SDO_WITHIN_DISTANCE of a line string

    I am writing a number of queries for a prototype application. All of my queries are working except for when I try to find POINTS which are a certain distance from a line string.
    select
    poi.*
    from
    point_of_interest poi
    where
    SDO_WITHIN_DISTANCE(poi.location,
    SDO_GEOMETRY(2003,8307,null,
    SDO_ELEM_INFO_ARRAY(1,2,1),
    SDO_ORDINATE_ARRAY(45.0264,32.0082,44.998,32.0027,44.9858,32.0008,44.9797,32.0001)),'distance=5 unit=KM') = 'TRUE';
    The error I receive is
    ERROR at line 1:
    ORA-29902: error in executing ODCIIndexStart() routine
    ORA-13032: Invalid NULL SDO_GEOMETRY object
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 333
    The location fields in my table are points defined by
    SDO_GEOMETRY(2001,8307,SDO_POINT_TYPE(<longitude>,<latitude>,null),null,null)
    I can create a valid SDO_GEOMETRY on the line string. I only receive this error when I try to compare the points and line string with the SDO_WITHIN_DISTANCE.

    Oops, I finally see what I did wrong. My SDO_GTYPE was wrong 2003 should have been 2002.

  • Additional results doesn't work with multi-line string dat

    I observed an erratic behavior with "Additional Results" in TestStand 2010. The problem statement is as follows:
    1. I have a variable "Locals.FirstName"
    2. I have another variable "Locals.LastName"
    3. Concatenate these two strings with a line feed or a new line character (Locals.FirstName+"\n"+Locals.LastName) and display it in a XML report. 
    Approach:
    1. Using "Statement Expression" I concatenate two strings and print the result using "Additional Results"
    2. For verification I display it using "Message Popup" step type. The formatting is as desired in "Message Popup". However, the new line characters appear as "Spaces" in XML report.
    Tracing Of this Erratic Behavior:
    1. I passed the concatenated string to LabVIEW VI and passed it to "Step.Result.ReportText" variable to log it in XML report. The same string which didn't appeared properly using “Additional Results"of "Statement Expression” step now appears proper in XML report.
    I have attached the sequence file for reference. Ensure that Report option is set to XML before executing this sequence.
    Can anyone justify this behavior and suggest the correct approach??
    Thanks !
    Attachments:
    Erratic Behavior Of Additional Results.seq ‏8 KB
    Tracing Of Erratic Behavior.vi ‏9 KB

    Amit -
    Here is a modified version of the TestStand 2010 Horizontal.xsl style sheet that corrects the issue you have mentioned. Note that leading and trailing "\n" characters will still be stripped out, and all "\r" characters will be stripped out.
    Hope this helps.
    Manooch H.
    National Instruments
    Attachments:
    horizontal_modified.zip ‏22 KB

  • String with multiple lines

    hi
    i have a string with multiple lines inside it eg.
    hello this is
    my string with
    mutiple lines inside it
    how could i get it to print out line by line
    iv used "\n" so it detects the new lines but it doesnt seem to work
    this is my following code that doesnt seem to detect the newline
    if(multiString.equals("\n")){
    }

    nicchick wrote:
    i have a string with multiple lines inside it eg.
    hello this is
    my string with
    mutiple lines inside itWhere do you have this String? In a file? in a JTextArea of a Swing GUI? Details are important.
    if(multiString.equals("\n")){But the whole string isn't an "\n" so this won't do. Again, much will depend on the current state of the String. You may need to split it based on the current line separator.

  • Converting strings with line feeds to a single line with identifying chars

    Hi, I dont want to re invent the wheel if there is something out there that does this already. I want to take some string with multiple
    line feeds and convert it to a single line. For example:
    "I want this string
    to be changed to
    a single line"
    to this...
    "I want this string\r\n to be changed tor\\n a single line"

    vsekvsek wrote:
    OK, Hope this will make better sense. So right now a I have a routine that loads files like below:
    "TEST\r\n TEST1\R\n TEST2"It's not clear to me at this point what you mean by that string.
    After the initial word TEST, does that string have a backslash character followed by an r followed by another backslash followed by an n? Or does it have a carriage return followed by a line feed. (\r followed by \n)
    We format it when loading in a way that it will look like this when queriing from the DB
    "TEST
    TEST1
    TEST2"It doesn't look like anything "when querying from the DB." That part doesn't make any sense.
    Either the string has a backslash followed by an r, in which case when you render in in a text editor or on a console it will look like a single line with a visible backslash character followed by an r, or it has a carriage return (\r) in which case it will look like multiple lines when rendered in a text editor or on a console.
    Later I re-extract it to a file from the DB and What confuses me is when I inspect the string it looks like this
    "TEST\r\n TEST1\R\n TEST2"How are you inspecting it? If it's in a debugger or similar tool, it's not uncommon for it to be showing a carriage return character (\r) as a visible backslash followed by an r, rather than interpreting it and rendering a new line. This is so that you can see exactly what characters are in there, rather than wondering about the specific whitespace.
    >
    but it extracts to my file like
    "TEST
    TEST1
    TEST2"
    So I guess there are some hidden cr's or something messing it up that I need to manipulate but not sure how to apprach it?I still don't know what you're trying to do, or if you even have an actual problem with your data or are simply not understanding what you're seeing.

  • What does this error means? "Line 20 column 57: character content of element "language" invalid; must be a string with length equal to 3 (actual length was 7) at XPath /package/book/metadata/languages/language" "

    Hi there.
    I am about to publish a book in English and Chinese.
    What does this error means?
    Line 20 column 57: character content of element "language" invalid; must be a string with length equal to 3 (actual length was 7) at XPath /package/book/metadata/languages/language"
    And where is line 20, column 57?
    Thanks folks!

    Go into iTunes Producer and select from the dropdown, don't type.
    cs
    iBooks Author Guide

  • Logic Pro when recording audio and midi takes, the regions sometimes become confused. The midi tracks line up with audio tracks.

    When recording midi and audio tracks simutaneously the midi tracks don't always line up with the software instrument channel. They may show up on the audio track. Sometimes they appear white instead of the normal green. Any suggestions?

    Hey there jlholm,
    It sounds like you are seeing some unexpected behavior when you are working on your project. I would use troubleshooting steps 6-10 from the following article named:
    Logic Pro X: Troubleshooting basics
    http://support.apple.com/kb/HT5859
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

  • How to send string with line feed to Agilent 33250A via COM1

    Agilent 33250A is a function generator. In HPERTERMINAL, when "Send line ends with line feeds" is enabled, simple strings make it work well, such as: "APPLQU", "OUTPUT ON", etc...
    But I can't make it work with .vi file. COM setting is correct because 33250A shows "remote" icon immediatly after string sent. It will respon "error" to any mismatched setting (e.g. 9600 vs 115200). So, the connection is there but it just doesn't respond to commands.
    I don't know why. The termination character is enabled in .vi
    I apprecite your help to make the .vi to send string just like the HYPERTERMINAL with 'line feeds'.
    Thank you very much.
    Jian
    Attachments:
    Serial_Communication.vi ‏40 KB
    Write2COM1.vi ‏22 KB

    From what I can see it looks like you are NOT specifying what termination character you want to use when you call the serial port init.
    When not otherwise specified, the port will be configured to use the default termination character which is a "carrige return" HEX 0A.
    Try wiring a "Line Feed" constant to the init VI.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How can I keep my audio track, delete a short segment of video, and reinsert a new video clip, without changing the audio with the way it lines up with the original video?

    How can I keep my audio track, delete a short segment of video, and reinsert a new video clip, without changing the audio with the way it lines up with the original video?

    If you have either iMovie 09 or iMovie 11 you can do this easily using the Cutaway feature.
    Go to iMovie/Preferences and make sure that the Advanced Tools are enabled.
    Now you jut drag and drop the 2nd clip onto hte first clip at the frame where you want the Cutaway to start. A popup menu will appear. Choose Cutaway.
    Here is a good Tutorial.
    If you have iMovie 08, let me know. There is a way to do it, but it is more complex.

  • My test instrument is outputting a 5 line string but labview only read until the carriage return. how can I get it to read the whole string?

    I have a labview sub-VI reading the string being outputted by a pH meter.  The meter outputs a 5 line string and labview is only reading up to each lines carriage return, there-by giving me 5 separate strings is there anyway to rectify this and have the 5 line read as one string?
    NAS1
    St Petersburg FL
    Labview 2010

    Yes, LabVIEW will automatically update. What happens is that the old serial functions still exist in 7.1 and above but the code (the block diagram) has been modified to use VISA functions. Older versions of LabVIEW are fully supported in this manner. The only way you can avoid the automatic update is to have the old serial functions in an llb and your top level VI refer to these. Having any VI that was part of vi.lib in an llb is a very bad idea and the way to fix things is to remove any VIs in the llb that are part of the LabVIEW distribution.
    I don't remember how the old serial config worked and what the new version does with the VISA Configure Serial Port. Your program should only have a single serial config and you might just be able to directly replace that with the VISA configure Serial Port.

  • How to display two-lines strings item

    Hi,
    How can I display list of two-line string items? Each Item in the list should have a phone number and a time. It should look similar to the "dialled numbers" display where each item has an image, and two-line string.
    Is it possible doing it with the high-level API or should I go low-level?
    Thanks in advance
    Imzadi

    use: list.setFitPolicy(Choice.TEXT_WRAP_ON)

  • Need help with create trigger based on more then 1 table and join.

    Hello,
    Here i have 3 tables
    1. Employee
    PERSON_ID
    1
    1
    N
    NUMBER
    None
    ORG_ID
    2
    N
    NUMBER
    Frequency
    LOC_ID
    3
    N
    NUMBER
    Frequency
    JOB_ID
    4
    Y
    NUMBER
    Height Balanced
    FLSA_STATUS_ID
    5
    Y
    NUMBER
    Frequency
    FULL_NAME
    6
    N
    VARCHAR2 (250 Byte)
    Height Balanced
    FIRST_NAME
    7
    N
    VARCHAR2 (20 Byte)
    Height Balanced
    MIDDLE_NAME
    8
    Y
    VARCHAR2 (60 Byte)
    Height Balanced
    LAST_NAME
    9
    N
    VARCHAR2 (40 Byte)
    Height Balanced
    PREFERRED_NAME
    10
    Y
    VARCHAR2 (80 Byte)
    None
    EMAIL
    11
    Y
    VARCHAR2 (250 Byte)
    None
    MAILSTOP
    12
    Y
    VARCHAR2 (100 Byte)
    None
    HIRE_DATE
    13
    N
    DATE
    None
    2. ems_candidate
    EMS_CANDIDATE_ID
    1
    1
    N
    NUMBER
    None
    EMS_JOB_ID
    2
    Y
    NUMBER
    Frequency
    NAME
    3
    N
    VARCHAR2 (255 Byte)
    Frequency
    EMAIL
    4
    Y
    VARCHAR2 (255 Byte)
    None
    TELEPHONE
    5
    Y
    VARCHAR2 (25 Byte)
    None
    EMS_SOURCE_ID
    6
    Y
    NUMBER
    Frequency
    RECEIVED_DATE
    7
    Y
    DATE
    Frequency
    COMMENTS
    8
    Y
    VARCHAR2 (4000 Byte)
    None
    3. employee_resources
    EMP_RES_ID
    1
    1
    N
    NUMBER
    None
    PERSON_ID
    2
    Y
    NUMBER
    Height Balanced
    CANDIDATE_ID
    3
    Y
    NUMBER
    Frequency
    EMP_START_DATE
    4
    Y
    DATE
    None
    CUSTOM_RESOURCE_FLAG
    5
    Y
    NUMBER (1)
    None
    RESOURCE_GROUP_ID
    6
    N
    NUMBER
    Frequency
    RESOURCE_STATUS_ID
    7
    N
    NUMBER
    Frequency
    GROUP_LOC_ID
    8
    N
    NUMBER
    Height Balanced
    ASSIGNED_JIRA
    9
    Y
    VARCHAR2 (250 Byte)
    None
    REVOKED_JIRA
    10
    Y
    VARCHAR2 (250 Byte)
    None
    CREATED_DATE
    11
    Y
    DATE
    SYSDATE
    None
    UPDATED_DATE
    12
    Y
    DATE
    None
    Now i want to create trigger when new record get inserted in employee table wanted to update person_id in employee_resources table.
    So i want to match ems_candidate.name with employee.full_name , ems_candidate.ems_job_id with employee.ems_job_id. And if it matched then update person_id in employee_resources table else through an exception and insert record in temp table.
    If anybody has an idea can u please help me.
    Thanks,
    Gayatri.

    I created below trigger
    CREATE TRIGGER emp_resources_upd_person_id
    AFTER INSERT ON ems.employee
    FOR EACH ROW
    BEGIN
        UPDATE ems.employee_resources
           SET person_id = :new.person_id
         WHERE candidate_id = (SELECT ems_candidate_id  
                                 FROM ems.ems_candidate cand, ems.employee emp
                                WHERE TRIM(UPPER(emp.first_name)) = TRIM(UPPER(SUBSTR (cand.name, 1, INSTR (cand.name, ' ') - 1)))
                                  AND TRIM(UPPER(emp.last_name)) = TRIM(UPPER(SUBSTR (cand.name,INSTR (cand.name, ' ') + 1,DECODE (INSTR (SUBSTR (cand.name, INSTR (cand.name, ' ') + 1), ' '),0,LENGTH (cand.name),(INSTR (SUBSTR (cand.name, INSTR (cand.name, ' ') + 1), ' ') - 1)))))
                                  AND emp.person_id = :new.person_id);
    EXCEPTION
      WHEN OTHERS THEN
        INSERT INTO ems.update_person_id_exception(person_id,first_name,last_name,full_name) VALUES(:new.person_id,:new.first_name,:new.last_name,:new.full_name);
    END;
    Now when i am trying to insert row in ems.employee  table it gives me an error
    ORA-04091
    table string.string is mutating, trigger/function may not see it
    Cause: A trigger (or a user defined plsql function that is referenced in this statement) attempted to look at (or modify) a table that was in the middle of being modified by the statement which fired it.
    Action: Rewrite the trigger (or function) so it does not read that table.
    Can anybody please help me to come out from these error.
    Thanks,
    Gayatri.

Maybe you are looking for

  • Not able to login to FWSM via SSH client

    When i am trying to login to FWSM via SSH client and it is throwing an error that "SSH server rejected your password Try again"

  • Download report into a flat file format

    Hi Friends, I would like to know your thoughts on what is the best practice most of you using to download a report into a flat file(NOT csv). In my application business users want a report to be downloaded into their local desktop (just like a .csv)

  • Download clob contents from function instead of a blob column in a table

    I found some examples how to create a download link for data stored in a blob column. However my data is not stored in a blob column but is created in a function returning a clob. Obviously this function can be used to fill a blob column that can the

  • Valuation Grouping Code same- Valuation Class different for each plant

    Hi All, We have 5 plants assigned to the company code. We have same Chart of Accounts (1000) and all the plants are grouped together to one valuation grouping code(001). Now if i extend the material codes to different plants, i am able to give each v

  • Page break(blank line) in a output list

    Hi, I want to display the equipment numbers (it_equi) in the ouput list. IT_EQUI is having thousands lines, its going to multiple pages (but blank line is inserted between the pages). But I dont want the blank lines between the pages. Can you please