With the help of SCORE on top of view with UNION

Hi guys,.

I explain what I'm trying to do it quickly:

2 tables: table1 and table2 with the same structure and have both a multi_column_datastore ctxsys.context.

1 view: View1

Select * from table1

Union

Select * from table2

If I run:

Select * from View1 WHERE contains (view1. Column1, '% textext %', 1) > 0;

It works fine, I get the correct result.

If I try to use the PARTITION function, I got an error:

Select * from View1 WHERE contains (view1. Column1, '% textext %', 1) > 0 ORDER by SCORE (1);

ORA-29921: auxiliary operator not supported with query to configure block

I understand the problem is in the UNION inside the view, is it possible to keep work, filtering the VIEW?

Thanks in advance

There is no score in the view, so you cannot reference the score when you query the view.  In order to put the note in the view, you need a contains the clause, which requires a value.  A method to do this is to use sys_context.  Please see the reproduction of the problem and solution below.

Scott@orcl12c >-reproduction of the problem:

Scott@orcl12c > create the table1 table:

2 (column1 varchar2 (30))

3.

Table created.

Scott@orcl12c > insert into table1 values ('textext")

2.

1 line of creation.

Scott@orcl12c > create table table2

2 (column1 varchar2 (30))

3.

Table created.

Scott@orcl12c > insert into table2 values ('textext")

2.

1 line of creation.

Scott@orcl12c > start

2 ctx_ddl.create_preference ('test_ds', 'multi_column_datastore');

3 ctx_ddl.set_attribute ('test_ds', 'columns', "column1");

4 end;

5.

PL/SQL procedure successfully completed.

Scott@orcl12c > create index table1_idx on table1 (column1)

2 indextype is ctxsys.context

3 parameters ("test_ds of the data store")

4.

The index is created.

Scott@orcl12c > create index table2_idx on the table2 (column1)

2 indextype is ctxsys.context

3 parameters ("test_ds of the data store")

4.

The index is created.

Scott@orcl12c > create or replace view View1

2 as

3 select * from table1

4 union

5 select * from table2

6.

Created view.

Scott@orcl12c > select * from View1 where contains (view1.column1, '% textext %', 1) > 0

2.

COLUMN1

------------------------------

textext

1 selected line.

Scott@orcl12c > select * from View1 where contains > 0 (view1.column1,'%textext%',1) order by score (1)

2.

Select * from View1 where contains > 0 (view1.column1,'%textext%',1) order by score (1)

*

ERROR on line 1:

ORA-29921: auxiliary operator not supported with query to configure block

Scott@orcl12c >-solution:

Scott@orcl12c > create or replace view View1

2 as

3. Select the partition (1) score, table1.* from table1

4 where contains (table1. Column1, sys_context ('text_query', 'query_value'), 1) > 0

5 union

6 select score partition (1), table2.* from table2

7 where contains (table2.column1, sys_context ('text_query', 'query_value'), 1) > 0

8.

Created view.

Scott@orcl12c > create or replace context text_query using text_proc

2.

Context that is created.

Scott@orcl12c > create or replace procedure text_proc

2 (p_val in varchar2)

3 as

4 start

5 dbms_session.set_context ('text_query', "query_value", p_val);

6 end text_proc;

7.

Created procedure.

Scott@orcl12c > text_proc exec ('% textext %')

PL/SQL procedure successfully completed.

Scott@orcl12c > set autotrace on explain

Scott@orcl12c > select * from View1 by score

2.

MARK THE COLUMN1

---------- ------------------------------

3 textext

1 selected line.

Execution plan

----------------------------------------------------------

Hash value of plan: 4090246122

----------------------------------------------------------------------------------------------

| ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

----------------------------------------------------------------------------------------------

|   0 | SELECT STATEMENT |            |     2.    60.     8 (0) | 00:00:01 |

|   1.  SORT ORDER BY |            |     2.    60.     8 (0) | 00:00:01 |

|   2.   VIEW                          | VIEW1.     2.    60.     8 (0) | 00:00:01 |

|   3.    UNIQUE FATE |            |     2.    58.     8 (50) | 00:00:01 |

|   4.     UNION-ALL |            |       |       |            |          |

|   5.      TABLE ACCESS BY INDEX ROWID | TABLE1.     1.    29.     4 (0) | 00:00:01 |

|*  6 |       DOMAIN INDEX | TABLE1_IDX |       |       |     4 (0) | 00:00:01 |

|   7.      TABLE ACCESS BY INDEX ROWID | TABLE2.     1.    29.     4 (0) | 00:00:01 |

|*  8 |       DOMAIN INDEX | TABLE2_IDX |       |       |     4 (0) | 00:00:01 |

----------------------------------------------------------------------------------------------

Information of predicates (identified by the operation identity card):

---------------------------------------------------

6 - access("CTXSYS".") CONTAINS "(" TABLE1".»)" Column1', SYS_CONTEXT ('text_query ',' query_v)

Alou '), 1) > 0)

8 - access("CTXSYS".") CONTAINS "(" TABLE2".»)" Column1', SYS_CONTEXT ('text_query ',' query_v)

Alou '), 1) > 0)

Note

-----

-the dynamic statistics used: dynamic sampling (level = 2)

Scott@orcl12c >

Tags: Database

Similar Questions

  • I accidentally deleted my toolbar with the help of file my homepage etc view internet explower and I can't get him back because of not knowing how. Please help me.

    See above for more information on remove me my toolbar and not knowing how to retrieve

    Right-click on an empty area other toolbars and make sure that the menu bar. Bruce Hagen
    MS - MVP October 1, 2004 ~ September 30, 2010
    Imperial Beach, CA

  • With the help of Vista on the laptop. Receive 3 updates on initialize to the top & stop. Do not install. Party at 3 x through process 80070002. How to fix?

    With the help of Vista on the laptop. Receive 3 updates on initialize to the top & stop.  Do not install.  Party at 3 x through process 80070002. How to fix?  3 updates failed to install: KB2779562, KB2705219 and KB2722913.  Constantly configures updates during startup and shutdown.  Takes a long time for the two workers.  Can anyone give advice?

    To decode 0 x 80070002. X 0 means that it is a hexadecimal number, 8 , error, the first 7 means it a windows error and the rest of Eastern 2, the number, the Windows error.
     
    To search for the error message we need to decimal format. Start the Calculator (Start - All Programs - Accessories - calculator) and choose the menu display - scientific, then the menu display - Hex. Enter 2 Menu display - decimal. It will say 2.
     
    Start an command prompt (Start - All Programs - Accessories - command prompt) and type
     
    net helpmsg 2
     
    and it will say
     
    The system cannot find the specified file.
     
    Use Notepad to search for FATAL and 80070002 in C:\Windows\Windowsupdate.log.
  • With the help of Windows to the top. -J' changed my settings on the page to backup several times, and now when I try to back up my computer it keeps default.

    TODAY, I CHANGED MY SETTINGS ON THE BACKUP OF THE PAGE WITH THE HELP OF WINDOWS BACK UP TO SEVERAL TIMES AND NOW WHEN I TRY TO BACK UP MY COMPUTER AGAIN, HE GUARD DEFAULT.
    I HAVE WINDOWS VISTA PREMIUM 64 BIT.
    I WOULD APPRECIATE YOUR RESPONSE

    Hello

    1. do you receive any error messages?
    2. what exactly happens when you try to backup data?
    3 have. what settings you changed?

    Please answer these questions. This will help us assist you better.

    Try to perform the clean boot.

    Refer; http://support.Microsoft.com/kb/929135

    Thanks and greetings
    Umesh P - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.
    [If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message.] [Marking a post as answer, or relatively useful, you help others find the answer more quickly.]

  • Keep the help and support window always on top

    It's amazing to me the problem is often to find information to help on a simple topics in Microsoft Help and Support.  For example, as new Vista, I spent over an hour looking for the Protocol parameters to keep my window help and Support, always on top while I'm trying to follow his instructions on a topic.  All the variations of 'always help and support window always on top' I used, in the help on the computer, offline were in vain.

    So, can someone answer for me I do this?

    Hello

    1. you try to set this option on any particular application or with Microsoft word?

    If you try to set this on Microsoft word, you can read the following article and check if it helps:

    http://Office.Microsoft.com/en-us/Word-help/work-with-the-Help-window-HA010062279.aspx

    If you need additional support regarding keeping this option in Office programs, you can post your request in the bodies of the Office.

    Check out the link:

    http://social.answers.Microsoft.com/forums/en-us/Group/Office

    Hope this information is useful.

    Jeremy K
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Has anyone recently had an experience with the help of MS which seemed inappropriate in the way it was handled?

    I talked about what I thought, it was the 'answer Desk' many x since 2/2013. The first time, I agreed to pay a fee of $99.95 for their support of prem. My space available on my C: drve (my primary internal HD) had suddenly disappeared from aprx 30 GB less than 7 GB and I was getting warnings in order to free up more space for the OS to work (Win 7 Hm Prem). I was unable to do a restore and ended up opting for the help I thought may be some kind of malware... I sat down and typed chat w the tech until the store has been w / I 10 minutes from closing. He said to go ahead and that it would update me when I got home. When I got home, he said that I had nearly 200 cases to be a site where a virus or something like that. He also had somehow freed more than 80 GB on my C: drive. I was exhausted and overwhelmed by the upheavals which went down while I was gone for 15 min. I made the mistake of thinking I could get additional clarification of all cela the next day when I had little sleep. I've never been able to get a detailed account of what he wanted by 200 close to infections or how he had gotten me 7 GB when I left at more than 90 GB, when I got home fr store. I found w / I a few days I still had serious w problems my free space on the drive internal dissapating too low levels and still not the ability to do a restore. I tried a recovery when the restore has failed twice. I had to do several laps when I got a computer laptop w Vista as a model of HP for my 1st purchase computer - a laptop given to nine (w. XP). As we know, Vista was raided in MS * until they came out SP1 SP2 for the confused, tired of the masses. In any case, I haven't had any apprehension on the restorations - bk to the top of your list of files, the software U wanted to reinstall. When I tried it on Windows 7 in 2/2013, I learned, I was given a key to sting that was incorrect because of sm. I bought 7 online after that Vista would not even restart files en lost because the registry (where they went are beyond me, maybe Costa Rica). Forgive my black humor, but it's what has kept me sane while devoting my life to constantly face w Windows for 1 reason or another. Fast forward to February. I was assigned 6 diff cases impossible since then because after I received a regenerated prod key and the reciovery, I had lost my CD burning ability. The last 2 times I called 'Office of response', literally, I spent 5 -7 w h. Tech that didn't charge me but also left me w no solution after having exhausted me while they were just travelling. All this has a cumulative effect and they play you w. that to mind. Following the last was a guy named Alex who swore that he would call me the next afternoon at 16:00 and I never heard from him again, haven't had no case, said that no Alex was there, etc... Finally, yesterday I called and when I unbalanced young woman in its attempts to prelim to guide the conversation, she got her suervisor, a type of very vigorous hyperconfident, which all of my history w recent them and resolutely focused on sell me either one another session extraordinary $ 99.95 w simply ignored another tech or an extended warranty program to cover me for mos how. I do not know. After refusing not to recognize my recent w purchase offers even no follow-up, no help to solve the problem at all - I said that, although it was of course polite to its mandate - closest high-power, he ignored the very relevant inconsistencies that I did clearly too many times and with a less-than-slick method called simply ignore the objection and try to talk me into submission. I have rfealize many of you in the forum must have had some formal w MS Assoc. and I am not condemning the whole anything. I don't get what support degenerated. The guy went yesterday to a few administrative event viewer screen and "showed me where I had turned off many vital MS service components, including 1 thatr makes no sense whatsoever - I told my update of Windows (which is set to auto-install every day without any special authorization) DO NOT to INSTALL ALL the DRIVERS...". Who does not at all any H2O. Why I set the update I have described and then send it to not do very well the tasks he would have apparently if necessary to update? If anone can begin in any sense of the madness, I really see how it was me that I screwed up over and over again. Thanks to all of you who have really tried to help me. At this point, I decided to save my $ for a refurbished MacBook Pro and pretend this never happened. SLO

    What you're missing is in the hands of the manufacturer of computers, OEM, not Microsoft Windows OEM support.

    Microsoft support is more oriented to businesses, not individuals, and $99 fees to home users...

    Forum support is much better than Microsoft or any other company could never muster anyway.

  • With the help of the Shot or Index on Panasonic AF100 prelude or first CS6 brand

    I want to shoot images with my AF100 and using the Index or mark for on the device - and then somehow see these markings when I arrived to import or edit pictures in prelude or Prime Minister. I want to be able to score my takes good. I also want to make marks on the clip, while he drives. The manual of the camera says he has the function, but I can't find where in CS6, this info is revealed. Someone knows how to do this?

    My application practicle turns speakers from the back of the room--this with the help of note when they flip to the next PowerPoint slide that is out of the frame...

    Thank you!

    Mike

    Mike Berlin wrote:

    I want to shoot images with my AF100 and using the Index or mark for on the device - and then somehow see these markings when I arrived to import or edit pictures in prelude or Prime Minister. I want to be able to score my takes good. I also want to make marks on the clip, while he drives. The manual of the camera says he has the function, but I can't find where in CS6, this info is revealed. Someone knows how to do this?

    I can't find any information that Index or Shot brand works with non-linear editing software. This is probably a unique in-camera feature. Sorry, I don't think that this is supported.

  • My AirPort Extreme end not implemented with the help of AirPort Utility

    Bought a used AirPort Extreme (Genesis 4) of a person who showed me that he worked at home. When I try to set up as a Wireless extender to my last existing AirPort Extreme, he will not carry out synchronization upward with AirPort Utility. It appears as a new extreme, but get a message 'unexpected error' before or after the name. Have you tried to reset the two while it is powered and turning the as explained in the help.

    When I try to set up as a Wireless extender...

    Gen 4 airport will connect to your existing AirPort Extreme wireless... or... it will connect using wired Ethernet wired, Permanent?

    .. .it will not accomplish the synchronization upward with AirPort Utility.

    Which version of AirPort Utility?  If it's on your Mac... and you don't know what version you have...

    Open AirPort Utility

    Click the AirPort Utility menu in the upper left corner of the screen

    Click on about AirPort Utility

    Report on the version number you see here

    You have an iPhone or a handy iPad that could be used to implement the 4th Gen airport if the problems continue with the help of your Mac?

  • With the help of iPhone 6 s. try to copy the text message with a tap double and get a bubble with icons. How can I copy the message to paste in another?

    Try to copy a text to paste in another. When I double tap, as I always have, all I get is a bubble with icons on it. With the help of OS 10.0.2.

    maryml wrote:

    Try to copy a text to paste in another. When I double tap, as I always have, all I get is a bubble with icons on it. With the help of OS 10.0.2.

    Press and hold on the text and wait for the copy/more pop up.

  • With the help of Club running on the Nike watch +.

    Hello

    This is something I have tried to work for a while and have not yet been able to find an answer. At the moment I use Nike + management club on my iPhone to follow the tracks that I find that gps is better than just using the application of the workout on my watch. However, something that really bothers me is that I start the race on my phone, but I can't then view my stats while running without having to press on and tap the watch and wait for the application to load, very irritating to race. I want to be able to lift my wrist and live stats are there to watch me, not listening and not get my phone out of my pocket. Surely this is something that can make the original watch?

    As a separate issue with the new app, Nike +, it does not recognize the songs I downloaded on my phone of Apple music in my playlists, then I have to play the separatelay of music through the application of music as opposed to go with Nike +? The ides on how to fix or is this a known problem with the latest Nike + app?

    Hello

    You may find it useful to consult the support resources of Nike and/or contact Nike for assistance with the help of their application:

    More information:

    https://iTunes.Apple.com/us/app/Nike+-run-Club/id387771637?Mt=8

  • With the help of old gear series noon on El Capitan

    I have a Vox Tonelab SE effects audio Board (around 2004), there the old serial midi on the back ports. I hung with the help of a USB MIDI interface cable. While the USB Midi interface to the show in Audio / Midi set upward and also in the profile system for USB port it does not detect the Vox Tonelab so no communication lunch.

    There is a POWERPC application called ToneLabSE SoundEditor which I downloaded and installed in the hope he would install a driver but I guess that this obviously doesn't work on INTEL in any case. Using Wine I can run the PC version, but still no communication via midi.

    Someone at - it ideas, would like to get this Panel communicating effects via MIDI.

    Thank you

    Solved! Using the WINE app I've run the version of the PC of ToneLab SE editor application. So pretty unintuitively by changing the serial midi to USB, SERIAL interface cables that went to the and out on the Tonelab SE. Now of the Se ToneLab editor I can write banks of programs to hardware Tonelab, but unable to empty the banks since the material Tonelab to software. My main desire was to use Expression pedals on the Tonelab as Midi Ableton controllers and some of the switches to the control of the Looper stomp. Now I can do it all. Hooray!

  • With the help of Yosemite, I like Photos app in general; have big Aperture library, although I use rarely opening Tools. Advantages, disadvantages and pitfalls related to the migration of Photos?

    With the help of Yosemite, I like Photos app in general; have big Aperture library, although I use rarely opening Tools. Advantages, disadvantages and pitfalls related to the migration of Photos?

    Opening was a pro the Pro amateur-oriented or serious app, usually shooting Raw, probably on a digital SLR.

    If that's you then pictures will miss a lot for you.

    If this isn't the case, then opening was probably overkill for your needs.

    If you like the pictures then this is the way to go.

  • Thunderbird will only connect if stop then reopened. (With the help of Mac 10.9.4)

    With the help of Mac 10.9.4
    If I open Thunderbird, I can connect to my e-mail address and download the messages. If I select "Get Mail" once again, Thunderbird crashes and fails to connect to my emails. If I then close Thunderbird and re-open it, I'm able to immediately connect to my mail.

    It seems to have sorted itself after a few days. (Fingers crossed). Until today it worked properly. Will keep an eye on things for the next week and the report does so again.

  • Anyone having problems with messages of script with the new version of GMail and Yahoo Mail? All the others seem fine and no problems with other browsers. With the help of FF25

    Gmail and Yahoo mail are very slow to load. I get a message from the script almost whenever instruct me to continue or to stop the script. Everything I have shut down or restart the browser goes blank and hangs. So, I have to restart Firefox. I followed suggestions on the help pages for the slow e-mail accounts or issues. (cleared cache etc, reset etc.) nothing solves the problem. I only noticed the problem since the first update of FF25. Scripts to stop even on these pages is not acceptable, because you are directed to the pages who insist you must restart scripts. It's a nightmare! Gmail both Yahoomail are very slow to respond to clicks more.

    Your list of details of the system shows that you have a user.js file in the profile folder to initialize some preferences at each start of Firefox.

    The user.js file appears only if you or another software created, therefore, normally, he wouldn't be here.
    You can check its contents with a text editor if you do not create this file yourself.

    The user.js file is read whenever you launch Firefox and initializes the preferences to the value specified in this file, so set of preferences via user.js can be changed temporarily for the current session.

    You can rename or delete the prefs.js file and numbered possible prefs-# .js and the file user.js to reset all default prefs.

    You can use this button to go to the Firefox profile folder:

    • Help > troubleshooting information > profile directory: see file (Linux: open the directory;) Mac: View in the Finder)

    Note that the folder "Application Data" in XP/Win2K and the "AppData" folder in Windows Vista and Windows 7 and later versions are hidden folders.

  • ABP is blocking content from Ticketmaster, I tried to turn it off but it doesn't. I use Ticketmaster on my iPod, so I know that the problem is with the help of PBA.

    Tried different options of disabling with no joy. Don't know what else to do

    Try to start Firefox in safe mode. If there is no problem, then while
    a course in Firefox > Modules and delete the PBA. Then restart
    FF. If there is still a problem, Ad-Block can be reinstalled.

    ======================================
    

    Try Firefox Safe mode to see if the problem goes away. Safe mode is a troubleshooting mode, which disables most of the modules.

    (If you use it, switch to the default theme).

    • Under Windows, you can open Firefox 4.0 + in Safe Mode holding the key SHIFT key when you open the desktop Firefox or shortcut in the start menu.
    • On Mac, you can open Firefox 4.0 + in Safe Mode holding the key option key when starting Firefox.
    • Under Linux, you can open Firefox 4.0 + with leaving Firefox then go to your Terminal and running Safe Mode: firefox-safe-mode (you may need to specify the installation path of Firefox for example/usr/lib/firefox)
    • Or open the Help menu and click on the restart with the disabled... modules menu item while Firefox is running.

    Once you get the pop-up, simply select "" boot mode safe. "

    If the issue is not present in Firefox Safe Mode, your problem is probably caused by an extension, and you need to understand that one. To do this, please follow article Troubleshooting extensions, themes and problems of hardware acceleration to resolve common Firefox problems .

    To exit safe mode of Firefox, simply close Firefox and wait a few seconds before you open Firefox for normal use again.

    When find you what is causing your problems, please let us know. It might help others who have the same problem.

    Thank you.

Maybe you are looking for