How to scale sdo_geometry column values?
Hi,
I have two tables with spatial data, but the scales seems to be different in each one:
table 1 has values with this format (-56.2344324, -34.2344243)
while table 2 has values with the following format (-5623443.24, -3423442.43)
that is , on the second table there are 7 digits to the left of the decimal point, instead of 2 digits on table one.
Is there any spatial function that can be used to modify the values in the second table to match the first table?
Im trying to visualize both tables in Mapbuilder, but they are in different scales.
Thanks a lot, regards
Nestor
Hi,
You can try the following with scale = 0.00001 on your second table:
create or replace function scale_geometry(geom in sdo_geometry, scale in number)
return sdo_geometry deterministic
is
new_geom sdo_geometry;
begin
if ( geom is null ) then
return null;
end if;
new_geom := geom ;
if ( new_geom.sdo_point is not null ) then
new_geom.sdo_point.x := new_geom.sdo_point.x *scale;
new_geom.sdo_point.y := new_geom.sdo_point.y *scale;
new_geom.sdo_point.z := new_geom.sdo_point.z *scale;
end if;
if ( new_geom.sdo_ordinates is not null ) then
for i in 1..new_geom.sdo_ordinates.count loop
new_geom.sdo_ordinates(i) := new_geom.sdo_ordinates(i)*scale;
end loop;
end if;
return new_geom ;
end scale_geometry ;
/jack
Similar Messages
-
How to refer a column value of a single row in conditional column display?
Hello,
does anybody have an idea, how i can refer a column value of a single row in conditional display of a column?
So my idea is, that a report has a column, which value is only displayed, when another column value of this row has a specific value.
I want to solve this problem with condition type: PL/SQL Function Body returning a boolean.
But I do not know how to refer the column value of each single row!
Thank you,
TimHere's a solution that, to me, seems easier to implement but, that's, of course, in the eye of the implementer.
Rather than using APEX to generate a link column for you, actually create the link as part of your SQL.
select '<a href="f?p=102:3:491847682940364::::P3_CONTACT_ID:' || CONTACT_ID || "><img src="/i/themes/theme_1/ed-item.gif" alt="Edit"></a>' CONTACT_LINK, ...
etc.
Test this out. You'll see that it works just like making a column a link using the column attributes.
Next, we'll change the SQL to use a DECODE statement to either display the link or nothing depending on what your criteria is. For example, let's assume you only want a link for active contacts.
select Decode( CONTACT_STATUS, 'A', '<a href="f?p=102:3:491847682940364::::P3_CONTACT_ID:' || CONTACT_ID || "><img src="/i/themes/theme_1/ed-item.gif" alt="Edit"></a>', NULL ) CONTACT_LINK, ...
etc.
This will not display the link in any rows in which the CONTACT_STATUS is not active, i.e. "A"
-Joe -
hi
i am new to programming... i would like to know how to get the column values... i have a resultset object
i need code .... asap
thnx@OP: It is always good to type complete sentences and describe your problem at length. It helps in letting people know what you really need instead of making wild guesses or silly jokes. You post mentions that you get the ResultSet. Then you should look up the API docs for java.sql.ResultSet and take a look at the getxxx() method signatures. Use the ones which suit the specific case.
Besides, it is good to refrain from using asap and urgent. Even if something is urgent to you, it need not be urgent to others. Wording a question properly would attract better replies.
Finally, would you mind getting down to specifics of your problem? From what I perceived, the JDBC tutorial and the API docs should provide all the information you need. -
How to get the column values from a BC4J View Table in UIXML?
I am using a default UiXML Application for Order Entry system with Orders & Order Lines & Customers. I have a uix file OrdersView1_View.uix which displays (no updateable columns) all the Orders. How do I get the column value of a selected row in a BC4J Table (example:OrdersId) when a Submit button is pressed using UIXML or Java Classes?
I appreciate any help on this.Hi,
You need to use keyStamp, an example:
<bc4j table name="orders">
<bc4j:keyStamp>
<bc4j:rowKey name="key" />
</bc4j:keyStamp>
Furthermore, you can automatically send the selected row key using the go event handler, so in the handlers section you could send the key to an orderInfo page:
<event name="show">
<!-- forward to the update page, passing
the selected key as a page property -->
<ctrl:go name="orderInfo" redirect="true">
<ctrl:property name="key">
<ctrl:selection name="orders" key="key" />
</ctrl:property>
</ctrl:go>
</event> -
How to get one column value from a DOCUMENT TYPE attribute
Hi,
I have created a DOCUMENT TYPE attribute which queries from a table and all the column values( For Ex: Customer Name, Contact Name and Address) are displayed in the message body.
I want one column value(For Ex: Customer Name) to be displayed in the SUBJECT of the message.
How can this be done? Please let me know.
Thanks in advance.Thanks Matt. I have used SETITEMATTRTEXT to get a single column value into an ITEM ATTRIBUTE.
Please see the following procedure...
==========================================================
PROCEDURE MisNotifyDataDesk(
itemtype IN VARCHAR2
, itemkey IN VARCHAR2
, actid IN NUMBER
, funcmode IN VARCHAR2
, resultout OUT VARCHAR2
) IS
p_Cart_Id VARCHAR2(30);
p_ORG_NAME VARCHAR2(360);
BEGIN
IF funcmode != WF_ENGINE.ENG_RUN THEN
wf_log_pkg.string(5,'Notify_Cust_Data_Desk','Not in RUN mode');
RETURN;
END IF;
p_Cart_Id := WF_ENGINE.GetItemAttrText ( itemtype => itemtype
, itemkey => itemkey
, aname => 'CART_ID' );
p_code_position := 10;
SELECT
ORG_NAME
INTO
p_ORG_NAME
FROM
MISIBE_END_CUST_DETAILS
WHERE
QUOTE_HEADER_ID = p_Cart_Id;
-- For TEXT BODY
WF_ENGINE.SETITEMATTRTEXT(itemtype => itemtype , itemkey => itemkey , aname => 'ORG_NAME',avalue => p_ORG_NAME);
resultout := WF_ENGINE.ENG_COMPLETED||':'||CUST_DATA_CHECK(p_Cart_Id);
EXCEPTION
WHEN OTHERS THEN
WF_CORE.context (
'WFCustCheck',
'MisNotifyDataDesk',
itemtype,
itemkey,
TO_CHAR(actid),
funcmode,
SQLERRM
RAISE_APPLICATION_ERROR (-20005, SQLERRM);
===========================================================
I am using &ORG_NAME in the body and subject of my message. But the value is
not retrieved into the ITEM ATTRIBUTE when I run my process. It is just displaying in the message and the subject of hte message as "&ORG_NAME"
CUST_DATA_CHECK used in the resultout, is a function which returns 'T' or 'F'. That part is working fine. Just retrieving the ORG_NAME in the ITEM ATTRIBUTE is not working.
Am I going wrong somewhere? Please let me know.
Thanks, -
How i pass table column value to string variable or return to java applete
Hi Master,
How do I pass a table column value into string variable. See my code below:
import java.sql.*;
public class Waheed {
public Waheed() {
public static void main (String args [])
String s = "9 23 45.4 56.7";
System.out.println ("going for connection");
// DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn =
DriverManager.getConnection("jdbc:oracle:thin:@fahim:1521:aamir","muhammad","mfa786");
Statement stmt = conn.createStatement();
ResultSet rset = stmt.executeQuery("select accid from accbal");
System.out.println ("going for connection");
while (rset.next())
s= rset.getString("accid"); this line give me error
System.out.println (rset.getString("accid"));
System.out.println (s);
catch(Exception e){
e.printStackTrace();
This line give me an error:
s= rset.getString("accid");
s is string variable
Plese give me an idea how I can pass accid in s variable.
Thanks.
AamirSee the code sample in the following thread (try using upeercase).
JDBC connection
Kuassi -
How can I replace column value with a particular value in SQL
Hi All,
Can anyone please tell me how can I format my output with replacing a column value with a specific value which actually depends on the present value of the column
I am executing the following SQL statement
select state,count(id) from <table_name> where composite_dn= <composite_dn_name> group by state;
My Present output is:
State No.Of Instance
1 3
3 28
I want to replace the value in the column state as follows
State No.OfInstances
Completed 3
Faulted 28
I want "1" to be reppaced by "Completed" and "3" to be replaced by "Faulted"
Is is possible with SQL or PL/SQL , if it is then how can I achieve this required result. Please help!!
Thanks in Advance!!
Edited by: Roshni Shankar on Oct 27, 2012 12:38 AMHi Roshni,
I guess this CASE clause can be simulated by a DECODE and also it is very easy to use.
Refer -- http://www.techonthenet.com/oracle/functions/decode.php
select decode(t1.state,t2.state_id,t2.state_name), t1.count_id
from <table_2> t2, (select state,count(id) count_id
from <table_name>
where composite_dn= <composite_dn_name>
group by state) t1
where t1.state = t2.state_id;HTH
Ranit B.
Edited by: ranit B on Oct 27, 2012 2:02 PM
-- link added
Edited by: ranit B on Oct 27, 2012 2:19 PM
-- sample code added -
How to Update some column values in some rows in an advanced table
Hi Gurus,
Can any body help on this issue.
I am having a results table which is showing all the queried parties data queried in a seeded page in OCO module.
Lets assume the table contains 10 rows with the below columns
Party Name, Registry ID, Address Country, Match Percentage, Certification Level, Certification Reason, Internal Indicator, Status .
Certification Level, Certification Reason and Internal Indicator are the dropdowns.
The user want to update some of these fields values for some rows randomly.
After doing this if he click on Save button, Only thosed changed rows need to get update using a Custom Procedure.
But here all the rows irrespective of the change getting updated.
So how to capture the modified rows.
Appreciate any inputs..
Thanks
Palepu
Edited by: Palepu on 9 Aug, 2012 4:25 PMNot sure if you got the answer. You need to capture the row which got changed using the below and get the column value using the getAttribute method. This works for single selection row, if it is multi selection then you will have to loop through all selected rows and find the VO attribute value.
String rowReference = pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
Row currentRow = am.findRowByRef(rowReference);
String param1= (String)currentRow.getAttribute("VOAttribute");
Let me know if there are any issues.
Thanks
Shree -
How to format table column values to currency?
All,
I have bound a context attribute (type - string) to a table column (TextView) which is used to display currency.
It displays the value as 123456789.00
How do I format the value as 123,456,789.00?
Is there any FM available to format?
I don't want to change the above context attribute type to CURR.
Thanks
Thruna>I don't want to change the above context attribute type to CURR.
Why not? That is the correct thing to do. That way you get formatting, sorting, even the correct decimal position and notation for different currencies and user settings.
If you must go with string for the context attribute then I still assume your source data is type CURR. When you 'move' this content into the string of the context attribute use the WRITE statement. This will format the currency variable for output. -
How to sum a column value using CAML Query?
Hi All,
I would like to sum the column value using CAML qeury. Actually in my list, I have two column "Projects Name" and "Number of Issues". Now need to get sum of "Number of Issues" column. How to achieve in CAML Query.
Thanks in advance!Hi Sam,
it looks like you can use your current view based agregation, otherwise it is not possible(
http://msdn.microsoft.com/en-us/library/ms467521.aspx) and you need to work on custom bit on this requirement.
use the below link and create a view element as described and see if that works for you
Aggregations Element
http://msdn.microsoft.com/en-us/library/ms468626%28v=office.12%29.aspx
Another reference
Query Element
http://msdn.microsoft.com/en-us/library/ms471093.aspx
Hope this helps!
Ram - SharePoint Architect
Blog - SharePointDeveloper.in
Please vote or mark your question answered, if my reply helps you -
How to get Metadata column values using powershell(CSOM)
Hi,
I am trying to get list column values using Powershell (CSOM), but I am getting for Metata data columns.
I am getting internal value as System.Collections.Generic.Dictionary`2[System.String,System.Object]
Can anybody let me know how to get the values for metadata columns?
Any help would be greatly appreciate.
Thank you.
AA.Hi
Go through the links. It'll help.
SharePoint 2013 Code Tips – Setting a Managed Metadata Field with the Client Object Model(CSOM and JSOM)
Indul Hassan
Microsoft Community Contributor
http://www.indulhassan.com
You Snooze.. You Lose !! -
How to tell if column value has changed for use in workflow actions
Hello,
I am using Sharepoint 2010 and for one of my Lists, I am using a general list workflow. What I need to be able to do is determine if a column value has change (say an "Assigned To" field) because I only want to take some action if that particular
value has changed. I want to be able to have a workflow action that would be something like:
If Current Item: Assigned To not equals [OLD VALUE]
I have found some web searches that talk about creating a duplicate list or duplicate (but hidden) column but that doesn't seem to be the way to go. I have document versioning set but don't if that can be used to help with this. One possible
thought (although I haven't tried it to see if it works) is to create local variables and have the values in the variables be the "old value". Just not sure if there is a best practices for doing this.
Thanks for any thoughts - PeterHelen,
Not sure I fully understand your goal. We don't use "tasks" at all but if you are looking to have your workflow check certain valus and be able to send email messages to people based on whatever, then you can certainly do that (as long as your Sharepoint
has the email setup. We do this for alot of workflow tasks.
So, in the workflow you can have a blanket statement like what I previously listed:
if Current Item:hiddenStatus not equals Current Item:Status
.... do something
or you can do something like:
if Current Item:hiddenStatus equals "In-Progress"
.... do something
Else if Current Item:hiddenStatus equals "Completed"
.... do something
or combine the two and do nested "if" statements. Then you add an email statement wherever you need it like:
if Current Item:hiddenStatus equals "Completed"
then email "these users"
To add the email part, just type in "email" on the line where you want to add a statment. There is only one option to choose from. That will display the line "then email these users". The "these users" will be a link. When you
click it you will get a popup to add the email info. We typically will send the email to a user (or users) that are already listed in one of the PeoplePicker fields. On the email form, you can type in your own text, designate that a value is based
on a column value (like our PeoplePicker), designate that a value is based on a workflow variable, add a link to the current item, etc. To get to these options you will click the button to the right of the fields or use the "Add or Change Lookup" button
in the bottom-left for the text area. There is alot you can set in the mail.
Does this help answer your question?
- Peter -
How to set a column value in a tabular form via button
Hi All,
I am using Apex 3.0.1. And to create the form I am using the APEX interface tool
I have tabular updateable report. In the same page I have a LOV field where I can choose some possible results.
I want to have a button so I can select a value in the LOV, take this value and populate the column value to the LOV value for all rows in the tabular form.
The LOV and the buttons are done.. to update the column I tried creating a pl/sql that is executed when the button is pressed and has the following update in a loop for each element:
begin
for i in 1..APEX_APPLICATION.g_f01.count loop
APEX_APPLICATION.G_F02(i) := :P1_MY_LOV_VALUE;
end loop;
commit;
end;
When I press the button, the page refreshes but nothing happens. I don't see any changes in the Values for the column I am trying to update
ThanksHi user477501,
If you are doing this after a SUBMIT, then try updating your data table instead of the g_f02 array. When you page is re-rendered, it should re-query your data table.
If you do not want to submit the page, then try your hand at JavaScript.
A good reference for this is Mike Hichwa's article at:
http://www.oracle.com/technology/oramag/oracle/06-nov/o66browser.html
Be sure to download the example application, it is very helpful.
I hope this helps.
Patrick -
How to change the column value which is coming from DO by a calculated field?
Hi all,
I want to change a column value based on my calculated field value. I have a column which is coming from DO which is based on External Data Source. I have a calculated field in my report. When there is any change in the calculated field then the column which is coming from DO needs to be changed. It means the DO needs to get updated when there is a change in the calculated field. Or like if the calculated field meets some condition then I need to change/update the same in the DO. This has to be done on the fly. the report should not submitted for this. when there is a change in the calculated column the DO column needs to get updated.
Thanks,
Venky.Ok, I've been a customer for very many years, I'm on a fixed retirement
income. I need to reduce my bills, my contract ends in Dec. I will be
pursuing other options unless I can get some concessions from Verizon. My
future son-in-law was given this loyalty plan, so I know this is a
reasonable request. My phone number is (removed) acct number
(removed)
>> Personal information removed to comply with the Verizon Wireless Terms of Service <<
Edited by: Verizon Moderator -
How to copy a column value in to a variable in Dataflow task?
Hi All,
I want to copy a column value to a variable inside the data flow task. Which is the best way to achieve it in SSIS?
Thanks,
SriUnless its a conditional based query which returns a single value it doesnt make sense to store result in a variable.
If query resultset has multiple values then you cant store them in a variable unless its of type object. The easiest way to store values in that case to object variable is by using execute sql task and then setting resultset option as full resultset. Once
stored you can use for each loop with ado enumerator or script task to iterate through values of resultset.
Perhaps you could give us some idea on what you're trying to achieve
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page
Maybe you are looking for
-
Image Store function in PC Suite
I've installed the driver and downloaded the PC suite for my 6101 phone and CA-42 cable, onto a Dell dimension 2400 runing Windows XP. A DLA message appears at the beginning of the install, warning me that I won't be able to add anything to the insta
-
Hi All, I am a new user to Test Stand. I have to call LabVIEW files through Test Stand Application. I have to call a VI, which has a start button. To this start button I am passing TRUE value which will invoke another VI. Now I have to pass values to
-
I have wikopedia where google used to be for my searches. how do i change it ?
to the right of where the url is i have a wikopedia search box. i used to have a google search box. not sure how it changed, can you let me know how to change it back?
-
DataTip box to appear near the plot for Plot Chart
Hi, I am using a Plot chart. I use three Plot series for the chart. I show the plots for one series at a time. When I show the Data tips for each plot, I am getting a long line connecting the plot & the DataTip (as shown in attachment). I would like
-
Error Code: -3 and Error -1404
When I attempted to download the latest iTunes update, it appears as though iTunes installed fine, but there was an error with the included Quicktime. The error code is 3. Then when trying to run iTunes, the message comes up that I need Quicktime ver