Is it possible to create a spatial view with paramete?

Is it possible to create a view with parameter like following:
SELECT GEOM FROM INTERSTATES WHERE MDSYS.SDO_FILTER(GEOM, MDSYS.SDO_GEOMETRY(2003, 8307, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3), MDSYS.SDO_ORDINATE_ARRAY(?, ?, ?, ?)), 'querytype=WINDOW') = 'TRUE'
so that I can specify ???? at run time.
If not, is there a way to create a view that perform variable window query?

You may want to look at application contexts, that way you may have code something like this:
create or replace context gis_ctx using gis_params ;
create or replace package gis_params
as
procedure set_bounds( minx in number, miny in number, maxx in number,maxy in number );
end;
create or replace package body gis_params
as
procedure set_bounds( minx in number, miny in number, maxx in number,maxy in number )
is
begin
dbms_session.set_context( 'gis_ctx', 'minx', minx);
dbms_session.set_context( 'gis_ctx', 'miny', miny);
dbms_session.set_context( 'gis_ctx', 'maxx', maxx);
dbms_session.set_context( 'gis_ctx', 'maxy', maxy);
end ;
end ;
To use this method you´ll have to execute
gis_params.set_bounds(-3,40,-2.9,40.1) ;
before doing the select.
SELECT GEOM
FROM INTERSTATES
WHERE MDSYS.SDO_FILTER(GEOM,
MDSYS.SDO_GEOMETRY(2003,
8307,
NULL,
MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3),
MDSYS.SDO_ORDINATE_ARRAY(sys_context ('gis_ctx', 'minx'),
sys_context ('gis_ctx', 'miny'),
sys_context ('gis_ctx', 'maxx'),
sys_context ('gis_ctx', 'maxy'))),
'querytype=WINDOW') = 'TRUE' ;
I f you are in a web environment, read about GLOBAL CONTEXT ACCESSED GLOBALLY .
Regards, Nico.

Similar Messages

  • Is it possible to create a spatial index on a view?

    Hi
    Is it possible to create a spatial index on a view?
    We would like to link our spatial tables to each other (using only one of the SDO_GEOMETRY fields) in a view & make it very easy so that anybody can work with the data.
    Thanks Caroline.

    Simon,
    In order for autoregistration to work, you first need to make sure that all entries in mdsys.sdo_geom_metadata_table are registered with SDE. All tables not just one schema. None of our spatial tables or views exist in the SDE schema.
    Also make sure all Oracle Spatial tables in sde.table_registry are held in mdsys.sdo_geom_metadata_table.
    When a user makes a database connection in ArcCatalog, all Oracle Spatial tables will be registered with SDE automatically. Also, entries will be inserted into mdsys.sdo_geom_metadata_table and indexes will be created. If you do not have primary key fields, you will have to Register with Geodatabase and it will create the OBJECTID field.
    This did not work for us originally. but after cleaning up metadata and installing SP1, it is working now and it is very convenient.
    VIEWS:
    You have to create the view thru SDE. You cannot register foreign views. There are bugs in support of views containing SDO_GEOMETRY objects. I have been told some problems will be fixed in SP2 and there may be a patch out to address some others.
    Here are the incidents I have filed in reference to views:
    1.
    I created a view consisting of a geometry column from a "foreign" Oracle
    Spatial table (SDO_GEOMETRY) and corresponding attribution in another table.
    I used the following command to create the view through SDE:
    C:\arcgis\arcexe81\BIN>sdetable -o create_view -T gis_v_traffic -t
    "trims_traffi c_geom,traffic" -c
    "trims_traffic_geom.geometry,trims_traffic_geom.fid,traffic.i
    d_number,traffic.aadt" -w "trims_traffic_geom.mslink = traffic.mslink" -u
    gis -p spatial -i esri_sde -s JJ0DN10
    ArcSDE 8.1 Build 832 Thu Mar 22 14:08:07 PST 2001 Attribute Administration
    Utility ----------------------------------------------------- Successfully
    created view gis_v_traffic.
    I can preview the geometries in ArcCatalog without error.
    However, when I try to select a feature in ArcMap I get the following error:
    The instruction at "0x125222dd" referenced memory at "0x00000000". The
    memory could not be "read".
    I click ok.
    Then I get this error:
    The insruction at "0x5f8012d3" referenced memory at "0x00000004". the memory
    could not be "read".
    I click ok and ArcMap terminates.
    I can select features from the spatial table the view is pointing to, but
    not from the view itself.
    2.
    I need to create views utilizing database links to tie attribution in other
    databases to geometries created for that data in a spatial database.
    I issued the following command from command prompt and got this error:
    C:\arcgis\arcexe81\BIN>sdetable -o create_view -T link_v_traffic -t
    "trims_traff ic_geom,[email protected]" -c
    "trims_traffic_geom.geometry,trims_traffic_ge
    om.fid,[email protected],[email protected]" -w
    "trims_t raffic_geom.mslink = [email protected]" -u gis -p
    spatial -i esri_sd e -s JJ0DN10
    ArcSDE 8.1 Build 832 Thu Mar 22 14:08:07 PST 2001 Attribute Administration
    Utility ----------------------------------------------------- Error:
    Underlying DBMS error (-51). Error: Unable to create view link_v_traffic
    ORA-00957: duplicate column name (link_v_traffic)
    3.
    Spatial Views created on Oracle Spatial LRS layers containing SDO_GEOMETRY
    objects are not recognized as feature classes unless they are created with
    the sdetable -o create_view command.
    Here is typical SQL for the view creation:
    create or replace view trims_v_traffic as select a.geometry,
    b.nbr_tenn_cnty, b.nbr_rte, b.spcl_cse, b.cnty_seq, b.tr_beg_log_mle,
    b.tr_end_log_mle, b.yr_trfc, b.aadt, b.pct_peak_hr, b.dhv_pct, b.drct_distr,
    b.vhcl_pass_pickups, b.vhcl_su_trk, b.vhcl_mu_trk, b.actl_cnt, b.updt_by,
    b.updt_on, b.mslink, b.mapid, b.id_number, b.sta_nbr from
    gis.trims_traffic_geom a, gis.traffic b where a.mslink = b.mslink;
    The table containing the SDO_GEOMETRY object is registered with SDE in the
    following manner:
    C:\arcgis\arcexe81\BIN>sdelayer -o register -l trims_traffic_geom,geometry
    -e slM -k SDO_GEOME
    TRY -s JJ0DN10 -i esri_sde -u gis -p spatial -c fid -C SDE
    A feature class is successfully created for this layer and the data can be
    added successfully to a map.
    However, there is no way of adding data to a map from a spatial database
    view containing an SDO_GEOMETRY object which was created externally from
    SDE.
    We are using Oracle Spatial 8.1.7 on NT 4.0. We are also using ArcGIS 8.1
    and ArcSDE 8.1.1.
    4.
    SDE does not support spatial database views which reference snapshot
    objects.
    I was unable to create a view using sdetable -o create_view which referenced
    a snapshot object.
    The snapshot was created using the following sql syntax:
    CREATE SNAPSHOT SNP_TEST
    BUILD IMMEDIATE
    REFRESH FAST
    ON DEMAND
    AS
    SELECT * FROM [email protected]
    We are using ArcSDE 8.1.1 with Oracle 8.1.7 on NT 4.0.
    Here are the permissions I granted, they need to be the same for every schema:
    for sde (these are all the permissions that might be needed for any type of
    activity - new install or upgrade)..lets just step through and go ahead and
    grant them all...
    grant create session to sde;
    grant create table to sde;
    grant create procedure to sde;
    grant create sequence to sde;
    grant create trigger to sde;
    grant unlimited tablespace to sde;
    grant select any table to sde;
    grant create any sequence to sde;
    grant create any procedure to sde;
    grant execute any procedure to sde;
    grant drop any procedure to sde;
    grant select any sequence to sde;
    grant create any view to sde;
    grant drop any view to sde;
    grant create any trigger to sde;
    grant drop any sequence to sde;
    each Oracle user will also need the following privileges...
    grant create session to gis;
    grant create table to gis;
    grant create procedure to gis;
    grant create sequence to gis;
    grant create trigger to gis;
    grant unlimited tablespace to gis;
    Viewer
    The viewer is allowed to connect to an ArcSDE database. Other users grant
    select privileges on their tables and feature classes to the viewer or to
    the public role. The DBA can create a role that can be granted select
    privileges on data objects owned by other users. The role can be granted to
    the viewer.
    create session
    select on other user's data objects
    Editor
    The editor is allowed to connect to an ArcSDE database. Other users grant
    select and insert, update, or delete on data objects they own to editor. The
    DBA may create a role that can be granted select, insert, update, and delete
    privileges on data objects owned by other users. The role can be granted to
    the editor.
    create session
    select, insert, update, or delete on other user's data objects
    Creator
    The creator is allowed to connect to an ArcSDE database and create data
    objects. The creator may grant privileges on their
    objects to other users or roles. Other users can grant select and insert,
    update, or delete on data objects they own to creator. The DBA may create a
    role that can be granted select, insert, update, and delete privileges on
    data objects
    owned by other users. The role can be granted to the creator:
    create session
    create table
    create procedure
    create sequence
    create trigger
    unlimited tablespace
    select, insert, update, or delete on other user's objects
    It might be worthwhile to rebuild your SDE metadata. I can walk you thru that if you need help.
    Hope this helps.
    Dave
    null

  • Is it possible to create a customized survey with our organizations logo at the top?

    Is it possible to create a customized survey with our organizations logo at the top? I'm trying to create a survey for our members but instead of using a template we would like to use something simple with our logo included at the top.

    Just create a blank form and click Add Header at the top of the form page:

  • Is it possible to create a Clone database with the same name of source db ?

    Is it possible to create a Clone database with the same name of source db using RMAN ...
    DB version is 11.2.0.2
    Is it possible to clone a 11.2.0.2 database to 11.2.0.3 home location directly on a new server . If it starts in a upgrade mode , it is ok ....

    user11919409 wrote:
    Is it possible to create a Clone database with the same name of source db using RMAN ...
    yes
    >
    DB version is 11.2.0.2
    Is it possible to clone a 11.2.0.2 database to 11.2.0.3 home location directly on a new server . If it starts in a upgrade mode , it is ok ....yes
    Handle:     user11919409
    Status Level:     Newbie (10)
    Registered:     Dec 7, 2009
    Total Posts:     102
    Total Questions:     28 (22 unresolved)
    why do you waste time here when you rarely get any answers to your questions?

  • Is it possible to create a hot spot with Apple Airport Express 2nd Generation Dual Band Wireless Router, usefull in a hotel with ethernet wall sucket.

    is it possible to create a hot spot with apple Airport express 2 generation and use it i a hotel with ethernet wall socket and use it with my Ipad 2?

    HenrikAppleJespersen wrote:
    is it possible to create a hot spot with apple Airport express 2 generation and use it i a hotel with ethernet wall socket and use it with my Ipad 2?
    Yes, it is one of the things AirPort Express was specifically designed for.

  • Is it possible to create a editable pdf with validation(required field) using Adobe Acrobat pro version?

    Hi,
    the subject says it all. I have downloaded the trail version to see if its possible to create a editable pdf with validation(required field) using Adobe Acrobat pro version?
    Basically, I will have to create a pdf form where users fill it and send it back to me. there will be required fields (the textbox and check box) that user need to fill before saving the editable pdf?
    Is it possible. if so, can someone kind enough to point to me right directions?
    Thanks in advance.

    Thanks for reply. What I am trying to achieve is to give an option for the user to download the pdf form and once the user tries to save the pdf, it validates with the required field. I managed to create the editable pdf with required fields option. I just need that validation to be done when user click on save file. How can I achieve this? thanks so much for your help.

  • Is it possible to create a customer master with different address

    Hi Gurus,
    Is it possible to create a customer master with different address as we maintain in SAP CRM.
    Kindly help me onthis issue \
    Regards
    Kannan

    Hi Kannan,
    There are no multiple addresses but you can use multiple unloading ponts for the same address for the ship to Party.
    So when you create a Sales order the system will give a pop up with the unloading points allowing you to select the desired one.
    I hope I understand your query correctly.
    Regards
    Yogesh

  • Is it possible to create a tagged pdf with apple pages?

    Not sure if possible and any tutorials would be appreciated.

    > Is it possible to create a tagged PDF with Apple Pages?
    Short answer: No, Apple chose at the introduction of Mac OS X to support only Adobe PDF 1.3 and those parts of Adobe PDF 1.4 that include device-independent transparency, but not those parts of Adobe PDF 1.4 that include Adobe XMP for XML markup of the page description program.
    Long answer: Adobe PostScript is a page description programming language, unlike Xerox Interpress which is a page and document description programming language. In other words, Adobe PostScript is a streaming or sequential rendering model that cannot simulate the behaviour of a bound book where the user can turn from any one page to any other page arbitrarily. Adobe introduced Acrobat Distiller in 1993 in order to convert Adobe PostScript page description programs into Adobe PDF page and document description programs that share the same fundamental functionality as Xerox Interpress.
    Conversion from Adobe PostScript to Adobe PDF buys one nothing but page-independent processing. Specifications published by Adobe in 1993 state how the SFNT Spline Font file format used by Apple and Microsoft for Unicode imaging has to be re-encoded into PostScript font program dictionary format (PostScript so-called simple fonts with less than 256 glyphs and PostScript so-called complex fonts (CID fonts) which are simple fonts tiled into a single superfont). All that is left is the glyph identifiers, and per Unicode Specification version 1.0 the glyph identifiers are private and font-dependent, so no character information can be inferred.
    ISO 19005:2005 PDF/A is a superset of ISO 15930:2002 PDF/X-3. The problem with ISO 15930:2002 PDF/X-3 is the same as above, that is, Adobe PostScript cannot encode the file format of the International Color Consortium, which has to be re-encoded to PostScript CSA Color Space Arrays and PostScript CRD Color Rendering Dictionaries. It is possible to encode the ICC file format directly in PDF 1.3 and higher, as specified in ISO 15930 and ISO 19005, but because PDF encodes only the glyph identifiers that are the output of the SFNT file format, and not the UCS Universal Character Set input and the settings for the feature selectors in the font file, ISO 19005:2005 has come under criticism for failing to support search in complex scripts.
    ISO 19005:2011 is supposed to address the shortcomings by saving the UCS input into the PDF itself, but in this case it is impossible to use Adobe PostScript and Adobe Acrobat Distiller as intermediates to Adobe PDF. So in order to drive ISO 19005:2011 Adobe would have to ditch Adobe Acrobat. I am not sure if there is software that implements ISO 19005:2011, but I noted that the Apple iBook Store does not accept PDF at all. Personally, I struggle to think of how to explain to endusers the overwhelming number of Adobe ISO PDF formats (there is PDF/E, PDF/UA and whatever else), and the overwhelming number of Adobe ISO PDF versions of these formats (there is ISO 19005:2005, ISO 19005:2011, ISO 15930 all the way back to 1999/2000 in God knows how many versions at this point).
    Best wishes,
    Henrik Holmegaard
    would-be technical writer

  • Is it possible to create an inbound delivery with MB31

    Hi,
    I would like to know if it's possible to create an inbound delivery with transaction MB31. It's a requirement of the client that all goods that come into the warehouse (HU managed) get in with an inbound delivery.
    So, for the scenario of production (non HUM storage Location) to warehouse (HUM storage location) a transfer posting will be done with MB31, A inbound delivery must be created.
    I hope this is possible.
    Regards,
    Alexander

    Hi,
    You can use an STO to transport stock from production to your warehouse and you can use VL31N with reference to your STO to create an inbound delivery document.
    Thanks
    Silas

  • Is it possible to create a wip sample with inventory valdity rule in spec

    Hi friends
    Can anyone please tell me
    Is it possible to create a wip sample with inventory validity rule in the item Specification?
    I have an item which is a wip (product) item and has validity rule defined for inventory. can i create a sample from the batch for it with inventory validity rule in the specification.
    Thanks in advance
    Prem.

    Hi Jay
    How are you.
    Yes, in process sampling only.
    Is it not neccessary to have a wip validity rule for wip products in the specs. I am able to create samples for wip products with inventory validity rule.
    Regards
    Prem.

  • Possibility to create full responsive websites with new features

    Hi guys!
    I think that Muse would be incredible and very professional if the develop team include the possibility to create full responsive websites, with no more problem even in the height of a site, expecially if you wanna create an horizontal scroll website.
    Another great fature is the Bootstrap 3, that could be used in some layout and templates... Add more widget, like in a CMS and obviously it would be great if you can use very full-responsive icons.
    What do you think about it, guys?

    Fully responsive would be great. 
    I love the new updates from Muse, especially the library, state buttons, and ability to create mega menus....   However, I've been building more of my websites with Wordpress due to the lack of Responsive design.  If Muse adds that capability, along with at least basic additions to the CMS (clients being able to add hyperlinks, link documents, modify H1,2,p text, etc), I'm likelly to go all in. 

  • Is it NOT possible to create indexes on views using SSMS?

    I'm looking at:
    http://www.mssqltips.com/sqlservertip/1610/sql-server-schema-binding-and-indexed-views/
    The thing is I'm not able to find that index dialogue ANYWHERE. When I google I keep coming up with examples of how to create indexes using TSQL. Is there no way to create an index on an view with SSMS?
    Using SQL Server 2008 R2.

    Expand Views -> expand view -> right click Indexes - > new index

  • How to create a view with parameter?

    who can tell me hwo to create a view with
    parameters just like a cursor?

    Hi,
    This is not possible in Oracle. What u can do is create the view without the where clasue and supply the where clause at runtime.
    Hope this helps...
    Regards,
    Ganesh R

  • Is it possible to create a complex sound with 12 harmonic partials in Audition

    Hi all,
    I am new to Audition 3. I have an experiment which needs a complex stimuli with 12 partials. Is it possible to create such a stimuli is Audition 3.
    Thank you,
    Varghese

    If you can calculate what all the harmonics you want are, and their relative amplitudes, then this would be relatively easy to do for 12, yes. But I'd be inclined to create them as single tones and import these into Multitrack view - it's then relatively easy to manipulate the levels of each for a mixdown.

  • Is it possible to create a multi provider with different info providers?

    hi all,,
    Can anyone let me know is it possible to create multi-providers from different info providers.
    thanxs
    haritha

    Hi..
    An infoprovider is an SAP BW object you can use to create and excute queries .  Info providers include  objects that physically  contain  data ,  for expale ... data target  like info cube ,  ods onjects , and info objects  ( char , att, text or hier ..)
    They also include objects   that do not represent physical data storgae :
    Remote cubes ,  sap remote cubes . and multiproviders.
    info providers are objects or views relevant to reporting ..
    info providers can include
    info cubes ( basic cubes and virtual cubes )
    ods
    char obj ( with attt or text )
    info set
    multiproviders
    with regards,
    hari

Maybe you are looking for

  • New Mac Pro for Photoshop

    Hi, I currently have a 2008 Mac Pro 2 x 2.8 Quad Core Intel Xeon that I am thinking of upgrading. My questions are as follows. Which set up would be best for photography based work, mainly Photoshops CS6 and Lightroom 4 I use a Drobo as my main worki

  • Error compiling workflow process

    Hi all, I am getting the fallowing error when I am compiling my workFlowInvoice process. I am using the same invoice.xsd file in all the transformation process. The proxy setting in my Jdeveloper is also disabled. Any suggestions. Error: [Error ORABP

  • Contact Apple with a great iTunes idea

    Does anybody have a clue how to get idea submissions for iTunes? I have a great idea that I would love to pass along to them that would hopefully get built into iTunes. I don't want money, just a better iTunes. I have about 13,000 songs on my Mac, al

  • Has anyone else had experience of BT completely ig...

    some days I spend hours on the phone with someone in india who denies I am a customer I read the customer number -- again and again -- I read my address postcode all my details they will keep asking keep denying -- THEY DON'T WANT TO DEAL WITH YOU th

  • Hw to use rcpt to and auth command in UTL SMTP

    hi can anyone provide me syntax for that or sample code?