PL/SQL region. query get rounded up when displayed using htp.p procedure.

Hi,
I tried to apply the above code, but the coordinates don't seem to come out right.
When I test the following query:
select c.employee_id
,t.X
     , t.Y
from employees c, TABLE(SDO_UTIL.GETVERTICES(c.geom)) t;
It works fine. Don't let the spatial component discourage you. The output are just two coordinates, just like normal sql. I tested the output in a Report page.
When I display the columns via an alert, instead of ( 43.907787,-79.359741) I get (43,-79).
for row in employees loop
htp.p('
alert('||to_char(row.y)||');
alert('||row.x||');
Any idea how to get around this?
ThanX,
Pim

Hi,
I tried to apply the above code, but the coordinates don't seem to come out right.
When I test the following query:
select c.employee_id
,t.X
     , t.Y
from employees c, TABLE(SDO_UTIL.GETVERTICES(c.geom)) t;
It works fine. Don't let the spatial component discourage you. The output are just two coordinates, just like normal sql. I tested the output in a Report page.
When I display the columns via an alert, instead of ( 43.907787,-79.359741) I get (43,-79).
for row in employees loop
htp.p('
alert('||to_char(row.y)||');
alert('||row.x||');
Any idea how to get around this?
ThanX,
Pim

Similar Messages

  • Use SQL function to get the original order number using the invoice number

    Hi All,
    wondering is someone can help me with this challenge I am having?  Often I need to return the original order numbers that created the resulting invoce.  This is a relatively simple seriese of joins in a query but I am wanting to simplify it using a SQL function that can be referenced each time easily from with in the SELECT statement.  the code i currently have is:
    Use SQL function to get the original order number using the invoice number
    CREATE FUNCTION dbo.fnOrdersThatMakeInvoice(@InvNum int)
    RETURNS nvarchar(200)
    AS
    BEGIN
    DECLARE @OrderList nvarchar(200)
    SET @OrderList = ''
    SELECT @OrderList = @OrderList + (cast(T6.DocNum AS nvarchar(10)) + ' ')
    FROM  OINV AS T1 INNER JOIN
          INV1 AS T2 ON T1.DocEntry = T2.DocEntry INNER JOIN
          DLN1 AS T4 ON T2.BaseEntry = T4.DocEntry AND T2.BaseLine = T4.LineNum INNER JOIN
          RDR1 AS T5 ON T4.BaseEntry = T5.DocEntry AND T4.BaseLine = T5.LineNum INNER JOIN
          ORDR AS T6 ON T5.DocEntry = T6.DocEntry
    WHERE T1.DocNum = @InvNum
    RETURN @OrderList 
    END
    it is run by the following query:
    Select T1.DocNum, dbo.fnOrdersThatMakeInvoice(T1.DocNum)
    From OINV T1
    Where T1.DocNum = 'your invoice number here'
    The issue is that this returns the order number for all of the lines in the invoice.  Only want to see the summary of the order numbers.  ie if 3 orders were used to make a 20 line inovice I only want to see the 3 order numbers retuned in the field.
    If this was a simple reporting SELECT query I would use SELECT DISTINCT.  But I can't do that.
    Any ideas?
    Thanks,
    Mike

    Thanks Gordon,
    I am trying to get away from the massive table access list everytime I write a query where I need to access the original order number of the invoice.  However, I have managed to solve my own problem with a GROUP BY statement!
    Others may be interested so, the code is this:
    CREATE FUNCTION dbo.fnOrdersThatMakeInvoice(@InvNum int)
    RETURNS nvarchar(200)
    AS
    BEGIN
    DECLARE @OrderList nvarchar(200)
    SET @OrderList = ''
    SELECT @OrderList = @OrderList + (cast(T6.DocNum AS nvarchar(10)) + ' ')
    FROM  OINV AS T1 INNER JOIN
          INV1 AS T2 ON T1.DocEntry = T2.DocEntry INNER JOIN
          DLN1 AS T4 ON T2.BaseEntry = T4.DocEntry AND T2.BaseLine = T4.LineNum INNER JOIN
          RDR1 AS T5 ON T4.BaseEntry = T5.DocEntry AND T4.BaseLine = T5.LineNum INNER JOIN
          ORDR AS T6 ON T5.DocEntry = T6.DocEntry
    WHERE T1.DocNum = @InvNum
    GROUP BY T6.DocNum
    RETURN @OrderList 
    END
    and to call it use this:
    Select T1.DocNum, dbo.fnOrdersThatMakeInvoice(T1.DocNum)
    From OINV T1
    Where T1.DocNum = 'your invoice number'

  • Am getting error  error when am using  wm_concat funcation.

    hi all
    am getting error error when am using wm_concat funcation.
    SQL> DECLARE
    2 ex VARCHAR2(200);
    3 BEGIN
    4 SELECT wm_concat(ename) INTO EX FROM EMP WHERE deptno=30;
    5 DBMS_OUTPUT.PUT_LINE(EX);
    6 END;
    7
    8 .
    SQL>
    SQL> /
    DECLARE
    ERROR at line 1:
    ORA-06550: line 4, column 10:
    PL/SQL: ORA-00904: "WM_CONCAT": invalid identifier
    ORA-06550: line 4, column 3:
    PL/SQL: SQL Statement ignoredThanks for all in advance
    Edited by: maddy on 9 Jan, 2012 10:02 PM

    >
    WM_CONCAT is undocumented and unsupported by Oracle, meaning it should not be used in production systems.
    >
    so change your way
    btw
    for me
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    SQL> set serveroutput on
    SQL> DECLARE
      2   ex varchar2(200);
      3   BEGIN
      4   SELECT wm_concat(ename) INTO EX FROM EMP WHERE deptno=30;
      5   DBMS_OUTPUT.PUT_LINE(EX);
      6   END;
      7  /
    ALLEN,WARD,MARTIN,BLAKE,TURNER,JAMES
    PL/SQL procedure successfully completed.
    SQL> try wmsys.wm_concat

  • I am getting a error IO when trying to upload multiple images within wordpress using the flash uploader. I do not get the error when uploading using explorer. The error only appears if I try uploading using firefox....any ideas?

    I am getting a error IO when trying to upload multiple images within wordpress using the flash uploader. I do not get the error when uploading using explorer. The error only appears if I try uploading using firefox....any ideas?

    Logged the call with SAP who directed me to 'Define settings for attachments' in IMG and setting the 'Deactivate Java Applet' & 'Deactivate Attachment versioning' checkboxes - problem solved.

  • Same thing is happening to me. Adobe has not responded to anyone about this error. It appears that Abobe XI is not compatible with IE 11.  I do not get this error when I use Chrome or Firefox. Only IE 11 does this. I have tried clearing cache and cookies.

    Same thing is happening to me. Adobe has not responded to anyone about this error. It appears that Abobe XI is not compatible with IE 11.  I do not get this error when I use Chrome or Firefox. Only IE 11 does this. I have tried clearing cache and cookies. I even uninstalled and re-installed IE 11. It is still doing it.  I am surprized that a company like Adobe would just ignore our posts and leave us hanging this this.
    Error message is FAILED TO GET DISPATCH FROM IBRWSR2.  Then when you click on it the next error message says:  PHTML IS NULL. You have to click this error message twice and then the PDF finally loads. Happened every time
    Does anyone have a solution since Adobe will not respond?
    As a last resort I will try uninstalling the Adobe Reader XI and install Adobe Reader 10 instead. It seems to work ok. But when I try to install version 10 the Adobe site tries to install XI.  Any ideas?
    JimP08758

    It worked just fine for me.
    Many site issues can be caused by corrupt cookies or cache.
    * Clear the Cache and
    * Remove Cookies '''''Warning ! ! '' This will log you out of sites you're logged in to.'''
    Type '''about:preferences'''<Enter> in the address bar.
    * '''Cookies;''' Select '''Privacy.''' Under '''History,''' select Firefox will '''Use Custom Settings.''' Press the button on the right side called '''Show Cookies.''' Use the search bar to look for the site. Note; There may be more than one entry. Remove '''All''' of them.
    * '''Cache;''' Select '''Advanced > Network.''' Across from '''Cached Web Content,''' Press '''Clear Now.'''
    If there is still a problem,
    '''[https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode Start Firefox in Safe Mode]''' {web link}
    While you are in safe mode;
    Type '''about:preferences#advanced'''<Enter> in the address bar.
    Under '''Advanced,''' Select '''General.'''
    Look for and turn off '''Use Hardware Acceleration'''.
    Poke around safe web sites. Are there any problems?
    Then restart.

  • Trouble with slow Macbook Air. I have first generation MacBook Air and have a hard time keeping hard drive from being full. Right now, I have almost 5 gigs available, but mac is slow and I keep getting color wheel when I use Mail. Any suggestions?

    Trouble with slow Macbook Air. I have first generation MacBook Air and have a hard time keeping hard drive from being full. After trashing many docs, I have almost 5 gigs available, but mac is slow and I keep getting color wheel when I use Mail. I'd like to install Lion, but now I'm afraid it will slow down my machine even further. Do I have enough free hard disc space? Is Mail problem related to free hard disc space? Thanks for your help!

    7gb of free disc space is required to install Lion.  Read this about how to free up disc space: http://pondini.org/OSX/DiskSpace.html.  Also, advice on how to speed up your mac: http://www.maclife.com/article/feature/25_ways_speed_your_mac

  • My iphone 4s camera is getting switch off when i use

    My iphone 4s camera is getting switch off when i use and when i use HDR function in the camera its getting switch off after taking picture and I wont see the picture where I have taken, can any one help me out in this or I should go to service center

    Uninstall the app and reinstall it. If it persists dont use it. simple

  • Why i dont get email notifications when someone uses my apple account to know my location through Find my Iphone?

    Why i dont get email notifications when someone uses my apple account to know my location through Find my Iphone?

    Try adding [email protected] as a VIP contact in your icloud mail app using the appleid used for icloud if using multiple accounts (i.e different itunes and icloud account).
    But seriously that happens really !? not getting emails for using icloud services with a valid appleid.

  • Get this message when starting Firefox 5.0: procedure entry point CERT_FindSubjectKeyIDExtension could not be located in the dynamic link library nss3.dll

    get this message when starting Firefox 5.0: procedure entry point CERT_FindSubjectKeyIDExtension could not be located in the dynamic link library nss3.dll

    Hi,
    You can try to install the latest version over the current one: https://www.mozilla.org/en-US/firefox/new/

  • My iPad getting very warm when i use it for bit in longer time

    Why my ipad is getting very warm when i use it for bit in longer time, any body has same experience?, Why my ipad is getting very warm when i use it for bit in longer time, any body has same experience?

    The Temperature warning usually appears when the iPad has been set in a place where it gets so hot to the touch that you'd almost burn your hands if you picked it up. The temperature caused by the processor or charging the battery should never reach that level. If you feel your pad is too warm when you are using it Make an appointment at an Apple Store to have your device examined by a technician. Or contact Apple Support.

  • My ipod touch won't hold a charge and gets really hot when im using it. what is going on?

    my ipod touch won't hold a charge and gets really hot when im using it. what is going on?

    Likely that the battery is dead.  I would make an appointment at the Genius Bar of an Apple store to confirm. Apple will replace the battery for this price:
    Apple - Support - iPod - Repair pricing
    There are third-party places which may be less expensive.  Here is one. Google for more.
    DigiExpress.us - The iPad Repair Professionals

  • What should i do if my ipod is getting really hot when i use it/

    I need help my ipod keeps getting really hot when i use it

    I would suggest you stop use for a period of time until it cools down. When you turn it off, make sure you exit out of whatever program you are running. If it persists getting hotter, to the point where it's hard to hold, I would suggest you take it into the Apple store nearest you. Depending on how long you have had it, they may be able to replace it for you free of charge.
    It is abnormal for that device to get extremely hot but when it is running multiple programs, such as playing music and surfing safari, it can heat up.

  • Get the project name to use in a procedure?

    How to get the project name to use in a procedure?
    example <% = odiRef.getOption ("COMPATIBLE")%> - but the project name or your id?
    in ODI 11.
    thanks
    Edited by: user ODI Dev on 01/12/2010 16:42

    I also need solution for this issue.
    I want to set ODI variable value in Jython script, this method described there: How to assign value for a ODI variable from Jython Script
    I need to update snp_var_data table. For more flexible solution i need to know project name where variable declared, because variable name in snm_var_data consist of two part <PROJECT_NAME>.<VAR_NAME>. Also this name convention don't changed after import scenarios from dev to execution repository
    Edited by: 822130 on 19.12.2010 4:31

  • IN Po quantity is getting round off - when we create PO through BAPI?

    Hi all,
    In PO quantity is getting round off instead of 5711.210 it is taking 5711 only. Here we are creating the PO's through BAPI automatically.
    and in excel sheet we have maintained 5711.210, Kindly let me know what may be the possible causes for this..
    regards,
    archana

    fyi
    change decimal places in PO quantity

  • SQL trace query parameters round 2

    Hi,
    This is a follow up of this topic:
    SQL trace query parameters
    My problem is no matter what i do, the queries in my trace file do not show the query paramaters.
    I have tried several approach including this:
    http://theblasfrompas.blogspot.com/2010/05/dbmsmonitor-for-tracing-from-oracle.html
    Any idea why it isn't working? (I'm using Oracle XE 11g)
    Thanks

    user610868 wrote:
    Hi,
    This is a follow up of this topic:
    SQL trace query parameters
    My problem is no matter what i do, the queries in my trace file do not show the query paramaters.
    I have tried several approach including this:
    http://theblasfrompas.blogspot.com/2010/05/dbmsmonitor-for-tracing-from-oracle.html
    Any idea why it isn't working? (I'm using Oracle XE 11g)
    Thankshttp://www.lmgtfy.com/?q=oracle+sql_trace+level=4

Maybe you are looking for

  • Selection-screen comment.....?`

    Hi All, I need explanation for the following statement        SELECTION-SCREEN COMMENT 1(15) TEXT-001. What does 1 and 15 mean in the above statement? Regards Dnyanesh

  • I have a noisie hard drive is this bad?

    My 2010 white MacBook's hard drive is making a rather loud Spinning sound while using it. Is this ok? Does it mean It is ready to die?

  • Why the picking doesn't work

    Hi everybody: i am working on a java 3d demo which uses picking as the collision avoidance utility.the code below is quite simple but in fact it cant pick anything. the problem has made me crazy for quite a long time and i still not find out the corr

  • Slow loading images disabling adjustments Aperture 2

    I am running Aperture 2.1.4 on an intel mac having just moved over from a powerpc. Its a big leap in many ways. In aperture all the images load so much faster than before except the adjustments are disabled and the heading at the top of the Adjustmen

  • Sending SMS from EP

    Hi,       How can we send SMS to mobile from Enterprise portal.If it is possible what is the methodology to do so. Thanks .