Problem returning same rows multiple times

Hi there. I have three tables called GP_T, LDMK_T, and FP_T.
GP_T is a spatial table and has the following attributes:
Location | Land - where location is of type sdo_geometry
LDMK_T has the following attributes:
Land | CFCC
FP_T has the following attributes:
Land | CFCC | Score
Each land is assoicated with only one location. As can be seen the attribute "Land" is common to all three tables and uniquely identifies the objects that I am trying to access. "CFCC" is common to LDMK_T and FP_T and each unique object has an associated "CFCC" where more than one object can have the same "CFCC". Essentially what I am trying to do is return all distinct "lands" based on a "CFCC" value and where the objects' score > 20.
My select statement looks as follows:
select a1.land, a1.location from GP_T a1, LDMK_T a2, FP_T a3
where a1.land = a2.land and a1.land = a3.land and a2.cfcc = a3.cfcc
and a2.cfcc = 'D43' and a3.feature_score > 20;
However, this query returns certain objects multiple (2 or more) times. When I run this second query it appears to return the correct number of values but without the "Location" attribute:
select distinct (a1.land) from GP_T a1, LDMK_T a2, FP_T a3
where a1.land = a2.land and a1.land = a3.land and a2.cfcc = a3.cfcc
and a2.cfcc = 'D43' and a3.feature_score > 20;
I cannot use "select distinct a1.land, a1.location...." as it throws up the following error:
ORA-22901: cannot compare nested table or VARRAY or LOB attributes of an object type
Is it a question of using GROUP_BY or can anybody else see anything wrong with the way I set up the initial query. Any help would be greatly appreciated. Joe

Hi there. Thanks a lot for your response. I tried removing the second table completely from the query as you suggested, seeming as it appears redundant, but the query still retrieves certain rows multiple times. In fact the query that you suggested actually returns the exact same results as my initial query so at least some progress has been made. However, I really have no idea how to remove duplicates without using the "DISTINCT" option. Has anybody else got any further suggestions? Any help would be great. Thanks, Joe

Similar Messages

  • Insert same row multiple times

    Hi,
    I've this table TAB1:
    COD.........TYPE........DESCRIP
    1..............RED..............MY COLOR
    I'd like to insert into table TAB2 this record 10000 times
    How can I write my insert or procedure to insert this row multiple times?
    Thanks in advance!

    Hi,
    Assuming tab1.col is unique:
    INSERT INTO tab2 (col_a, col_b, col_c)
    SELECT            cod,   type,  descrip
    FROM    tab1
    START WITH  cod = 1
    CONNECT BY  cod = 1
           AND  LEVEL <= 10000;If tab1.cod is not unique, use whatever is unique in the START WITH and CONNECT BY clauses. You do not have to SELECT the unique key.
    This does not assume that tab1 contains only the row you want to copy.
    As shown, this only works for making multiple copies of a single row.
    The multi-row version isn't much more complicated.

  • 11g DBAdatper returns 1st row multiple times

    We have a db adapter that was built using the adapters-db-102-select pdf as a guideline. When we test the query being executed by the adapter in the database it returns ten rows. When we test the BPEL process from the soa-infra console with debugging turned on and view the audit trail we see the following discrepancy. After the invoke operation I view the payload and see that the returned collection does in fact contain ten elements. The issue is that instead of returning the same ten rows as when we execute the query in the database it returns only the first row ten times. Can anyone suggest a possible resolution?
    Thank you.

    Ryan -
    I've always had to work to get a row repeated ten times, e.g. iterating through with a while loop and not putting the loop variable as a subscript in the assignment. You may have found a labor-saving new feature! :-( Being suspicious of new releases, I would try interating through the output variable, to see if maybe the person who coded the console display made that "not putting the loop variable as a subscript" error. If you confirm that you really do have the first row ten times, then you have two possibilities: (1) even though you think it's the same, the SQL you defined in the BPEL DB adapter wizard is not exactly the same as what you ran in the database, OR (2) the SQL in BPEL is right but returns repeated rows ("undocumented feature").
    If you aren't positive the DB adapter SQL is perfect, you might post the SQL you ran in the DEB and the SQL from the Toplink mappings (assuming 11G still has those). In 10.1.3 it would be in the JDeveloper BPEL project directory {JDevProjectName}/toplink/{DbAdapterPartnerlinkName}/descriptor, in the file named {DbAdapterPartnerlinkName}.{TableName}.ClassDescriptor.xml, in the XML element (tag) called query. It may be in a different place in 11G, but you get the idea. Compare what you think you coded with what the BPEL designer actually coded.
    If you're sure the SQL is right, you may want to open an SR. They'll probably ask for the SQL anyway, so posting it first won't hurt unless you're in a hurry.
    Good luck, Andy

  • Avoid opening same Form Multiple times

    hi
    Can anyone help me , how to put restruction not to open the same form multiple times .
    regds/sanjay

    I'm not suggesting that the following is great idea but..
    You could start a timer and keep updating the row in the table with a timestamp and then have a job which checks if there are rows in the table that have timestamps older than the timer interval.
    I actually think that that is really bad idea.
    I think its more important to ask why this is a requirement? I currently write sytems for police officers and even they can grasp the concept that someone else might be updating the same data at the same time as them and can work multiple sessions. Its hard for them, and sometimes I think they may just be hitting their keyboards with a truncheon, but they do get it.

  • HT1689 Billed for same app multiple times

    We were billed for the same app multiple times, how do I contact apple iTunes to get this fixed?

    FOR ASSISTANCE WITH ORDERS - iTUNES STORE CUSTOMER SERVICE
    For assistance with billing questions or other order inquiries, please refer to our online support page by clicking here: http://www.apple.com/support/itunes/store/. If you cannot find the answers you are seeking in our robust knowledge base, you can contact us by visiting the following URL http://www.apple.com/support/itunes/store/, clicking on the appropriate Customer Service topic, then using the contact button or email form at the bottom of the page. Responses to emails will be provided as soon as possible.
    Phone: 800-275-2273 How to reach a live person: Press 0 four times
    Hours of Operation: Mon-Fri: 9am-5pm ET
    Email: [email protected]
    How to report an issue with Your iTunes Store purchase
    http://support.apple.com/kb/HT1933
    iTunes Purchase Problems: How to Report a Problem to iTunes Support
    http://tinyurl.com/7tscpa7
    iOS: Troubleshooting applications purchased from the App Store
    http://support.apple.com/kb/TS1702?viewlocale=en_US&locale=en_US
    How to Get a Refund from the App Store
    http://gizmodo.com/5886683/how-to-get-a-refund-from-the-app-store
    Getting Refunds for your iTunes Store Purchases
    http://www.labnol.org/software/itunes-app-store-refunds/13838/
    Canceling a Digital Subscription
    http://gadgetwise.blogs.nytimes.com/2011/10/14/qa-canceling-a-digital-subscripti on/
     Cheers, Tom

  • Why is Apple TV showing the same computer multiple times for Home Sharing?

    Why is my Apple TV showing the same computer multiple times for Home Sharing? Also have connectivity issues. Sometimes will lose signal.
    JonRod's music
    JonRod's music
    JonRod's music
    JonRod's music
    JonRod's music
    I recently updated to Yosemite and never had this issue before.

    I'm not 100% sure of the ins and outs, but it's some sort of known issue between Yosemite, Airport and wifi. All you can do is wait for a fix and keep restarting your equipment as and when needed, unless you have the ability to connect your Mac via ethernet.

  • Can I gift the same app multiple times to multiple users?

    Can I gift the same app multiple times to multiple users?
    Like, if I wanted to buy iMovie for 3 friends, could I buy the app as a gift 3 times?

    You should be able to gift it multiple times
    Gifting content : http://support.apple.com/kb/HT2736

  • Is it possible to copy the same database multiple times simultaneously?

    This is the setup of my environment.
    I have a 'master' database that contains the full schema plus some pre-populated data such as default settings. When database schema changes are made, they get made to the master database. When a new customer signs up for the service, I make a copy of this
    master database (using SMO) that will now be the database containing all of the customer's information. The database is rather large, and the copy operation can take a couple minutes.
    Everything works fine as expected, unless I try to provision two new customers at the same time. It appears that Azure only allows for one DB copy operation at a time. Is there a way to allow for copying the same database multiple times simultaneously?
    Thanks for you input. I understand that this is likely not the optimal setup, and that there is many better ways of doing this, but I am somewhat heavily invested in the current process and I would like to find out how to make it work if I can.

    BTW, you can do this programatically by using PowerShell (https://msdn.microsoft.com/en-us/library/ee210569.aspx), SqlPackage (http://www.benday.com/2012/12/18/deploy-a-sql-server-database-projects-dacpac-with-sqlpackage-exe/)
    or the SQL Server binaries for .NET (http://www.vijayt.com/Post/Deploying-a-data-tier-application-in-SQL-Azure-programatically)
    Hope this helps.
    Alex

  • Same parameter multiple times in Execute SQL Task

    Hi all,
    i have a fairly long parametrized query that needs to be run within an Execute SQL task. It has only 2 unique parameters, but these need to be used multiple within that query. The connection is OLEDB.
    ill simplify my requirement by making up an arbitrary T-SQL "where" clause that will illustrate what i need:
    where
    x = @param1
    and y = @param1
    and z > @param2
    and w > @param2
    moving this into an SSIS execute SQL task will require the following:
    where
    x = ?
    and y = ?
    and z > ?
    and w > ?
    I know i need to specify 4 parameters and remap the same variables multiple times.. like so:
    User:aram1   -> 0
    User:aram1   -> 1
    User:aram2   -> 2
    User:aram2   -> 3
    isnt there a better way? i ask this because in my real task i have 2 params, each is reused 4 and 5 times respectively and it seems stupid to repeat params like this.

    @ _proffy_
    you can pass the same variable or value as parameter multiple times sql task.
    follow the steps below.
    1) type the sql query with parameters in SQL statement tab of sql task editor
    2. in the parameter mapping, select the variables.
      you can select the same variables more than once.
     give the parameter name as 0,1,2,3..... based on variables you require.
    do not forget to chooose the appropriate Datatype.
    ex:
    select * from table1
    where a= ?
    and b=?
    and c= ?
    parameters:
    Var name               param Name
    user::Var1               0   
    user::Var1               1
    user::Var2               2
    so the value becomes a=var1, b= var1 and c= var2

  • TS3276 how do I get Mail to stop downloading the same email multiple times?

    My mail keeps downloading the same email multiple times.  I've had as many as 10 of the same emial.  How do I stop this?

    Me too - did you ever figure it out?
    You can't even delete from the server in mountain lion.... I did it from my old mac, but it didn't work. I keep having 11,000 new emails that can not even be deleted in blocks!!!
    Was it a gmail account? Mine is, and my other 2 are fine...

  • How to automate saving the same image multiple times?

    Hello. I wish to save the same image multiple times in a folder... is there a way to automate this function? I also need the flexibility of determining the starting number in this image sequence. Thanks.

    Good day!
    I would recommend asking for help over at
    Photoshop Scripting
    And going into more detail about what you want to achieve (maybe post a screenshot, diagram, mock-up to illustrate it).
    Regards,
    Pfaffenbichler

  • Address book has same entries multiple times how can I go back to original cesium

    Address book has same entries multiple times how can I go back to original cesium

    After a couple of days, I'm noticing that the repeat(ing) offenders have more than 10 episodes, and seem to keep repeating them every time I sync.
    They only show once in my phone and in the iTunes Podcasts, but through iTunes and looking at what's in my phone is when I see the repeats.
    Even after I've marked a podcast as played, and deleted it from within my phone, as well as telling iTunes to delete the played episodes, it still shows multiples of the played episodes.
    There doesn't seem to be any rhyme or reason to it either. They aren't the newest ones either.

  • Running the same code multiple times with different paramters automatica​lly

    Hi guys,
    I want to run the same code multiple times with different paramters automatically. Actually, I am doing some sample scans which takes around 2 hours n then I have to be there to change the paramters and run it again. Mostly I do use folowing paramters only
    X_Intial, X_Final, X-StepSize
    Y_Intial, Y_Final, Y-StepSize
       Thanks,
    Dushyant

    All you have to di is put all of the parameters for each run into a cluster array. Surround your main program with a for loop and wire the cluster array through the for loop. A for loop will autoindex an input array so inside the for loop you just have to unbundle the cluster to get the parameters for each run.
    Message Edited by Dennis Knutson on 07-13-2006 07:50 AM
    Attachments:
    Cluster Array.JPG ‏9 KB

  • Provision same resource multiple times

    All,
    I have a scenario to provision same resource multiple times for the same user.
    How to make a resource to allow provisioning multiple times in OIM 11gR2. I am not seeing th option "allow multiple" in resource object in the design console.
    Please help.

    In OIM 11g R2 you can assign same resource multiple time.
    The account which gets assigned first time will be marked as primary and the rest others will be marked as "other"
    HTH

  • Repeating the same region multiple times

    Hi,
    We have requirement where the same region gets repeated multiple times depending on the data.
    Functionally: QA -- Question Area , it has couple of questions
    Supplier1 has 1 QA assigned . Then in the page it gets displayed as
    - QA { ShowdetailHeader }
    -- Questions { tree table}
    Now that if Supplier1 is assigned with 3 QA's then
    - QA1
    -- Questions of QA1
    - QA2
    -- Questions of QA2
    - QA3
    -- Questions of QA3
    i.e the regions to be displayed will depend on the data.
    ================================
    To explain the same tech...
    We have the following requirement { Consider 2 VO's and a VL between them }. In the page we display it in this manner
    <showdetialHeader VO1>
    < Tree table VO2 >
    This region will be repeated depending on the result of VO1. That is say VO1 returns 3 rows then it should be displayed as
    <showdetialHeader VO1.row1>
    < Tree table VO2 [VO1.row1] >
    <showdetialHeader VO1.row2>
    < Tree table VO2 [VO1.row2]>
    <showdetialHeader VO1.row3>
    < Tree table VO2 [VO1.row3]>
    =========================================================
    Please guide me in I building this page.
    Thanks,
    Suresh.
    Edited by: user758041 on Dec 27, 2010 3:11 AM

    Hi,
    JDeveloper 11g does not yet support dynamical creation of ADF Region instances. So any attempt to create a region in an af:forEach or af:iterator loop wont work.
    Frank

Maybe you are looking for

  • M602n Laserjet - How to print 66 lines in DOS

    Running an old DOS program in virtual XP mode and need to print 66 lines instead of 60.  On older HP Laserjet IIIsi, I could just change the setting on the printer manually at the printer itself.  How do i change this setting on an  M602 printer?

  • File- to -IDoc   scenario  EXPLINATION   in a  INTERVIEW

    Hi  ,     What are the configurations done on XI, on R3, on XI's SLD, what is the protocol used for File, Content Conversion, Serialization , etc I know how to  do the step by step procedure... but plz let me know how can we explain  the same thing i

  • Registering Adobe Photoshop Album Starter 3.2

    I have completly filled out the registration form, but when I click on "Resgister" I get three consecutive pop-up message boxes with the last one saying, "internet send failed" and this is as far as I can get. I have not been able to get the "unlock

  • Need to find out the Cost center for one location, one cost center

    /* Formatted on 2015/02/27 08:34:29 AM (QP5 v5.215.12089.38647) */ SELECT DISTINCT cost_centre   --  INTO l_cost_center   FROM (  SELECT DISTINCT                                 --pap.name position,                  haou.organization_id org_id,      

  • Back flushing with MFBF and MF42N

    Hi, On backflushing with any of the above transaction, if we see the Material document, on Doc. info tab transaction code is displayed as MFBF. I wants to trace whether the backflushing is done against the Planned Order. In matl doc we can see the in