SELECT with the matter in that statement based on the procedure returning a Boolean
Hi allI try to build a select statement with a case where the condition.
SELECT COL_ID, COL_TITLE, COL_COMMENT,
( CASE WHEN COL_IT = :USER_ID THEN 'Y'
WHEN COL_USER = :USER_ID THEN 'Y'
WHEN REGEXP_LIKE(COL_IT_ADD, '(^|:)(' || :USER_ID || ')(:|$)') THEN 'Y'
ELSE 'N' END ) MY_COL,
FROM MY_TABLE
WHERE ( CASE WHEN MY_PACKAGE.AUTHORIZE('IT') = TRUE THEN 'Y'
WHEN MY_PACKAGE.AUTHORIZE('IT') = FALSE AND COL_USER = :USER_ID THEN 'Y'
WHEN MY_PACKAGE.AUTHORIZE('IT') = TRUE AND REGEXP_LIKE(COL_IT_ADD, '(^|:)(' || :USER_ID || ')(:|$)') THEN 'Y'
ELSE 'N' END ) = 'Y'
The case for the calculation of the value of the column works fine. Run this query without the where also works in condition.But in the condition, I get the following error: SQL error: ORA-00920: invalid relational operator 00920. 00000 - "invalid relational operator.
The MY_PACKAGE procedure. AUTHORIZED (pValue) returns a Boolean value. Is it possible to use a case statement in the WHERE condition to calculate a value and check for this? If not, is there another way to do something like this in a query?
Thanks for your help
Chrissy
The Boolean data type is unknown in SQL... you cannot use functions that return Boolean values in SQL.
You can add a function overloaded in the package which returns a 'Y' or a 1, or something else that is a data type in SQL.
Tags: Database
Similar Questions
-
Cannot set keyframes in the audio clip selected with the pen tool - cannot see even the line volume control more to set keyframes on having developed the clip. What could be the problem? I use the first CC pro @.
You can use the Ctrl key and then click with the regular selection tool, clicking with ctrl will make a new keyframe. in this way, have no need for the tools. CTRL has other great shortcuts that will stop you having to spend retouching pads tools too.
If the automation keyframe line is missing, you can switch on and off in the menu sequence.
-
Steps to follow:
BB10 device--> settings--> Notifications--> Applications--> [name of your application]--> all alerts [Toggle button]I have an obligation to check whether or not 'All alerts' is allowed through settings when the application is running. To check if we can synchronize permission selected with the settings of operating system Notifications BB10 for my application. How to get javascript code if alerts permission is on / off, while the application is running.
I tried adding the blackberry.system function and tried to hasPermission (blackberry.push) also, I can't determine if permission is allow / prohibit... Please suggest how to get that.
I don't see a WebWorks API for this. If I expected to be anywhere, it's here:
https://developer.BlackBerry.com/HTML5/APIs/beta/BlackBerry.notification.html#jbo1385148829097But it seems that this API has not been fully implemented; It may be useful to connect a developer Issue Tracker JIRA to get this feature added.
At the same time, there is this API of Cascades that looks like what you're looking for:
https://developer.BlackBerry.com/native/reference/Cascades/bb__platform__notificationapplicationsett...Write an extension for this feature should allow you to access this feature:
https://github.com/BlackBerry/WebWorks-community-APIs/tree/master/BB10-Cordova/templateAt the same time, a colleague is currently working on an extension that should open many features of Qt, and I think that the API above should be accessible through this extension. He must be released over the next week or two, so you can wait for that as well.
EDIT: On this last point, see this extension which provides a mechanism for attaching in the majority of the Qt APIs.
https://github.com/BlackBerry/WebWorks-community-APIs/tree/master/BB10-Cordova/QtBridge
-
The Central handle on the rectangle isn't gone when I select with the black arrow (v) tool. See the bounding box and the edges is both. Dd intermediate anchor to go?
haggyabeken,
I'm afraid that you have come across the Rectangle Live bug, which is limited to MAC versions starting from 10.7 and 10.8, but not 10.9 (Mavericks), see this thread linked below.
https://forums.Adobe.com/thread/1595973
Thus, a switch for the Mavericks with a reinstall might be the way to solve it here and now.
To get around it, in each case, it is possible to develop direct Rectangles to get the normal old shaped rectangles or Pathfinder > unit, or use the scale tool.
A more permanent way round that is to create normal old shaped rectangles, after running the free script created by Pawel, see this thread with download link:
-
White on white selection with the magic wand of refining
I'm trying to remove the background of a picture of BW - one model posing in front of a white background.
Select with the magic wand works fine except on the area where the light on the model wears the white skin. When I choose, I get the hand and the lower part of the arm (see below) but miss the box top, completely white. I tried all kinds of settings and also tried to increase the contrast with a brightness/contrast layer, but nothing I I understand allows me to keep the arm and remove the bottom with the arm. FWIW, the image cannot be redone.
How can I do? Thanks for any help.
EdB
Learn how masking... Also in white when mixed in a layer with the blending mode multiply does not change. So, if you add a new layer on top of your image and set its blending mode to multiply. You will see your arm starts to show through. Add a maske layer to this layer and paint with black to show the lower arm of the layer by hiding the top layer on the arm area.
-
problem with the definition of a boolean as output parameter type
Hi, I have a problem with the definition of type boolean as output parameter and it must return true if the query procedure retrieves one line else it shouuld return false
Hi, I have a problem with the definition of type boolean as output parameter and it must return true if the query procedure retrieves one line else it shouuld return false
And what are the issues? Its simple.
SQL> create or replace procedure is_emp_exist 2 ( 3 p_empno in emp.empno%type 4 , p_result out boolean 5 ) 6 as 7 l_empno emp.empno%type; 8 begin 9 select empno into l_empno 10 from emp 11 where empno = p_empno; 12 13 p_result := true; 14 exception 15 when no_data_found then 16 p_result := false; 17 end; 18 / Procedure created. SQL> declare 2 l_result boolean; 3 begin 4 is_emp_exist (7788, l_result); 5 6 if l_result then 7 dbms_output.put_line('Employee Exist'); 8 else 9 dbms_output.put_line('Employee does not Exist'); 10 end if; 11 end; 12 / Employee Exist PL/SQL procedure successfully completed. SQL> declare 2 l_result boolean; 3 begin 4 is_emp_exist (1000, l_result); 5 6 if l_result then 7 dbms_output.put_line('Employee Exist'); 8 else 9 dbms_output.put_line('Employee does not Exist'); 10 end if; 11 end; 12 / Employee does not Exist PL/SQL procedure successfully completed. SQL>
-
How to manage the selection with the box in a table
Hello
JDev 11.1.2.4
I have a table with an attribute of EO/VO, transitional to manage the selection. This attribute is displayed as a check box. The user makes a selection by clicking on the checkbox. Then, the user clicks on a button that displays a pop-up window. Inside of this pop-up window, that user can create, insert, delete, or update values in a table based on an other EO/VO.
When the user clicks OK, the pop-up window is closed, then the data is committed.
When the user clicks Cancel, the popup is closed and the changed data are ignored. To remove the data, I call a Rollback. It works fine, but all the transitory values are lost which is correct because of the discount after the cancellation.
It's a problem because the user must be able to open the pop-up window several times with the same selection. This means that the restoration is not appropriate in this case.
How to ignore data edited inside the pop-up window and keep the selection?
Thank you
You can try to put the popup in his own taskflow and define a backup point before entering the taskflow. When the user cancel the editing restore you to previous backup. This should dispel the changes.
Or you save the selected rowkeys, call rollback and backward selection later.
Timo
-
SELECT with the combination of two columns query
I need the research to write a nested select statement that would achieve the following.
Support I have a table as follows
TestTable
Name: Age: country
Test1: 10: USA
Test2: 11: us.
Test3: 12: us.
Test4: 11: Canada
Test5: 12: Canada
Now, I want to select in the table above gives the following information.
Get all the names of people who do not belong to this combination (10:USA, 11:Canada, 12:Canada). The list can be huge.
The result should be
Test1:10:USA
Test1:12:USA
If it was a combination, I can write
Select * from TestTable
the age where <>10 and <>country Canada
Also, I can also do
Select * from TestTable
the age where NOT IN (10,11) and country NOT IN (USA, COUNTRY)
But I do have that he would give me a correct result.sush_msn wrote:
Is there a way I can move the age and the country as a list on the query?You asked the right question.
Three things you need to know:
(1) your test data cover all combinations. This is the most comprehensive test data:
create table test_table1 as WITH AGES AS ( SELECT LEVEL+10 AGE FROM DUAL CONNECT BY LEVEL <= 3 ), COUNTRIES AS ( SELECT 'USA' COUNTRY FROM DUAL UNION ALL SELECT 'CANADA' COUNTRY FROM DUAL ) SELECT 'Test' || ROWNUM NAME, AGE, COUNTRY FROM AGES, COUNTRIES; NAME AGE COUNTRY -------------------------------------------- ---------- ------- Test1 11 USA Test2 11 CANADA Test3 12 USA Test4 12 CANADA Test5 13 USA Test6 13 CANADA
(2) now, here's the answer to your question. You can go back two or more values in an expression by putting parentheses around them.
SELECT * FROM TEST_TABLE1 WHERE (AGE, COUNTRY) NOT IN ( (11, 'USA'), (12, 'CANADA') ); NAME AGE COUNTRY -------------------------------------------- ---------- ------- Test2 11 CANADA Test3 12 USA Test5 13 USA Test6 13 CANADA
That's what made the Etbin above, but he used a select instead of a list of values.
(3) can AGE or COUNTRY ever be NULL? You want to return the records that have NULL values in them? If so, you must use NOT EXISTS instead of NO po WARNING: Etbin code needs a bit of change: "where (age, country) = (t.age, t.country)" should be "where (age, country) = ((t.age, t.country)) '. You must always additional brackets on the right side.
-
LabVIEW 2009 SP1 crashes when moving large selection with the arrow key
If I select a lot (10 or 15) diagram components and try to move some distance with the arrow button, I'm often a program crash. Because a reduced number of components seems to hang after a longer distance traveled, it looks like some sort of buffer overflow error. I don't see this problem when you use the mouse to move selections.
I checked to make sure I have the latest version of the video driver for my NVIDIA Quatro FX570. I also tried to work with no hardware acceleration and no handset, written. What happens on Windows XP SP3 with all current updates.
It became so bad that I have to do a save as every fifteen minutes to avoid losing data.
Why not use my mouse for all movements? Because it is not as specific and not so easy to limit to only one dimension of the movement. My hand is not as stable as it once was.
I'm hoping someone will have a suggestion that will clear up this problem.
As I have indicated, I had the same problem with 8.5 and just DID a new install of Labview 2009.
Since it is possible that my three monitors configuration, which of course requires more memory video, may be at the origin of the problem, I am satisfied with workaround by dragging the objects closer to their final destination and then using the arrow keys.
Three monitors are ideal for the front, block and help/Internet/probe damaged. When I got to work in the field with a single monitor, I felt severely handicapped.
You can consider the issue closed.
Thank you for trying to reproduce the failure.
-
Excel cells don't no shading when non-adjacent cells are selected with the Ctrl key
When cells not adjacent are selected in any spreadsheet Excel 2007 that normal cell shading shows which cells are considered for avg, sum count etc works in the lower tray of Excel. Unexpectedly when I now select cells not adjacent no shading appears and I have no idea of cells that have been selected. Is this some sort of setting usless that I inadvertently threw it or is this a real Excel error?
http://www.Microsoft.com/Office/Community/en-us/flyoutoverview.mspx
Above is the link with the Office discussion groups.
And Excel Newsgroup.
There are different groups of discussion Excel listed in the main link.
Hope that helps.
See you soon.
Mick Murphy - Microsoft partner
-
Lasso tool polygon binding angles trying to add to the selection with the SHIFT key
Since upgrading (downgrading?) of Photoshop CS6 Extended Photoshop CC I have a problem with the lasso tool of polygon limited at certain angles when you try to add to a selection.
Here's the scenario, I select a color background with the magic wand tool, then I would like to add a few things to the selection, so I click on the polygon lasso tool and hold the SHIFT key to add to the playlist and then start to use the polygon lasso tool... often very randomly the polygon lasso tool will limit his movements to a 90 degree angle Sometimes something that seems like an angle of 30 degrees and sometimes he'll do any.
I'm doing something wrong or is this a bug?
The SHIFT key has two functions in the creation of a selection. The first is as you know to add to any selection using another selection tool. The second is forced to angles in drawing and selection, but also rotation tools. So for your example, you have to hold down the SHIFT key when you click on to add to your selection using the polygon lasso tool, but after making the first click with the tool, Photoshop knows that you want to add to the selection. So do not hold the SHIFT key after the first click, otherwise Photoshop assumes that you also want to compel the angles drawing of your choice. (Unless that's what you really want to)
-
I used Photoshop since version 2.5 when it came to 16 disks. In all versions I've bought over the years (many) up to CS3, I've always been able to use CTRL + H (Windows) or CMD + H (Mac) to hide the "mobile dash" edge of the selection. This is extremely useful when doing all sorts of adjustments where the outline of the selection must be considered while "fiddling with the buttons" (so to speak). Without being able to hide the limits of selection ("mobile dash"), I often have to get a better idea, cancel the selection, get disgusted that the edge is not what I want, then have to cancel, select new, try again... over and over again. It is a SIMPLE feature, but the lack of it, driving me crazy. HELP, I tried, but it doesn't have the height of the promise. If there is a way to hide the dotted moving line, where is the menu item, and what the shortcut?
You can assign Ctrl/Cmd-H to hide the edges of the selection (Edit > keyboard shortcuts) only, if you want to hide everything, but you will be notified if any other function has the shortcut.
-
Removal of the track selected with the Lasso (Q) tool
I am running the tool lasso through some ovals (diagram below), and I want to just delete these forms that I run the lasso tool, however, seems Lasso to select anything within its space tent 'bridge '.
(I understand his choice of anchors in this form). Is it possible to choose the oval shapes only (fast) it seems that I must now select them individually (like a bird with crumbs).
This is the direction of drag lasso
This is the result of the selection of this movement of lasso.
I use illustrator CS6 Version 16
BlueFire,
I fear this is how it works (imagine your movement (part of) the lasso loop).
For your purpose, you can better off ShiftClicking/ShiftClickDragging with the selection direct tool, hold Alt/Option If you want to catch all paths.
-
I have a list of selection with the value yes and no
I am 10 select list with the value yes or no
I need to launch a dynamic action, and so I have a variable that indicates the number of selection selected list which has been chosen as Yes or no...
How can I realize this is apex 4.2 db 11g...
Thank you
Published by: zycoz100 on March 4, 2013 12:05Brute force method:
Dynamic Action using a PL/SQL block with something like:
count := 0; Begin If :P1_Select_List_1 = 'yes' count := count + 1; End If; If :P1_Select_List_2 = 'yes' count := count + 1; End If; If :P1_Select_List_3 = 'yes' count := count + 1; End If; . . . End;
???
Howard -
type of CS5.5 Illustrator editable, no selectable with the text tool
Hi people, working on a poster in Illustrator. Added the type of area, using the text tool. Now I would like to increase the size of a single line. I can't select or change any type with the text tool. I have moved into a new layer, registered, closed type Illustrator, restarted my Mac (OS X 10.7.4).) Looked in preferences, in which case there is a problem. No luck.
Furthermore, I don't see two handles when selecting the tool more. Don't know if that is related.
Display > display the edges
View > see the bounding box
Maybe you are looking for
-
Cell vs at &; T or Verison
The last time I bought an iPad, I had to say AT & T or Verison. But I'e noticed that when looking at refurbished iPad mini, the mini 2 indicate cellular service so that the mini 3 stipulates that "cell."
-
Vista constantly crashes whenever I turn on Satellite A300
Hello I have a Satellite A300 and every month or so I have the problem that Vista freezes constantly whenever I turn on the laptop. I made 2 HARD drive Recovories who have always allowed the fault, but this time, when I tried a restore from the HARD
-
System recovery: keyboard and mouse do not work
HP 300-1025, Win7x64. Trying to do a restore of system of hard drive or CD, takes 3 to 6 hours to charge Cyber utility, but equipped with standard wireless keyboard and mouse do not work and can not select the option to retrieve! Tried to use the wi
-
Sync blackBerry with Exchange of Smartphones
First time synchronization with Excahgne to the BProfessional server. I don't see new emails. Non of my existing emails in all folders are coming on... need help.
-
Fragments of complex page with many entity with composition objects
Hi, I use JDeveloper 12.1.3,Now, I wonder about your personal experience when working on / page fragment that shows mutiple composite EO. In this case, it is recommended to keep them on the page/fragment of monkey to stop invalid owner Exception.Howe