Problem with plsql block
Hello All,
I have a sql query which i am trying to put it in plsql block.It throws me an error saying i cannot have group function as my two select strings gives me more than one row. How to tackle this??
declare
uuid varchar;
stat_date date;
begin
select 'I'||Lower(docfamily_uuid) into uuid, max(status_date) into stat_date from document_status where status_code=303 or status_code=305 group by docfamily_uuid;
end;
Thanks
In addition to being mal-formed it is likely your problem stems from the fact that your query is returning more than one row. Now perhaps you are expecting only one row and your GROUP BY might be getting in the way. Try changing your GROUP BY to include the LOWER function that is in your SELECT statement. But realize that this in itself will not guarentee one row returning from the SELECT statement.
WITH document_status AS
SELECT 'xxx' docfamily_uuid, sysdate status_date, 303 status_code from dual
UNION ALL
SELECT 'XXX' docfamily_uuid, sysdate status_date, 303 status_code from dual
SELECT 'I'||Lower(docfamily_uuid), max(status_date)
FROM document_status
WHERE status_code=303 or status_code=305
GROUP BY docfamily_uuid;
Ixxx 05-FEB-09
Ixxx 05-FEB-09
WITH document_status AS
SELECT 'xxx' docfamily_uuid, sysdate status_date, 303 status_code from dual
UNION ALL
SELECT 'XXX' docfamily_uuid, sysdate status_date, 303 status_code from dual
SELECT 'I'||Lower(docfamily_uuid), max(status_date)
FROM document_status
WHERE status_code=303 or status_code=305
GROUP BY LOWER(docfamily_uuid);
Ixxx 05-FEB-09Greg
Similar Messages
-
Problems with file block settings
We manage file block settings via group policy. I have run into problems with the file block settings not working as advertised.
I've run into a couple of issues:
First, in Excel 2010 I would like to open Web Page and XML files in protected view rather than blocking entirely. Our "Set Default File Block Behavior" in the GPO is set to "Blocked Files are not opened." According to the
documentation, the settings for individual file types should be able to override this behavior but this is not the case in my testing. If I set "Web pages and Excel 2003 XML spreadsheets" to "Allow editing and Open in Protected View"
the files are still blocked and the Trust Center list the file as Do not open, not the GPO setting of open in protected view. I have verified via GPresults that the GPO applied successfully, rebooted the PC, etc. The "Set Default File Block
Behavior" is NOT overridden by individual file type settings.
According to the "plan file block settings" technet article:
The “Set default file block behavior” setting specifies how blocked files open (for example: does not open, opens in protected view, or opens in protected view but can be edited). If you enable this setting, the default file block behavior you specify applies
to any file format that users block in the Trust Center UI. It also applies to a specific file format only if you both enable its file format setting (for more information about individual file format settings, see the tables in this article) and select the
Open/Save blocked, use open policy option. Otherwise, if you configure an individual file format setting, it overrides the
Set default file block behavior setting configuration for that file type.
Second, even if I do change the set default file block behavior to open in protected view, I still cannot open XML spreadsheets. The trust center says that the file format is set to open in protected view but when I attempt to open a file it behaves
as if the setting was still set to block entirely.
The only thing that works is setting it to "do not block" which is not where I'd like to go - I would for security reasons like these types of files to open in protected view but there doesn't seem to be any way to do this contrary to the Technet
documentation.Hi,
I had opened a case at Microsoft in 2012 about the «Open/Save Block, use open policy» parameter about HTM/HMTL files... Here is the answer I got from the support.
Hope it will help
Thank you for contacting Microsoft regarding your recent Office 2010 Hotfix request (SR 112022071246968) in reference to File Block settings on web pages. We have conducted a thorough investigation into this matter
and while we recognize the impact the issue is having on your business, we cannot accept this Hotfix request because it is acting as designed.<u5:p></u5:p>
Office will block any files that are explicitly set in the File Block UI by an Administrator when there is no built in validator. The Office File Validation scans and validates certain kinds of files and will
only display those applicable files in Protected View. We could provide a safe experience in Protected View for HTM, but it wouldn't be a useful experience. Linked content of the web page is not available (images, stylesheets, javascript, etc), so the
user would effectively see plain text. This is not the experience we want in Protected View, and it would encourage users to leave Protected View, putting their machine at risk. So HTM/HTML files are blocked.<u5:p></u5:p>
<u5:p></u5:p> -
Problem with DECODE block in WHERE clause
Hi,
I'm facing problem with DECODE statement. I just simulated my problem in the simple way as follows. If I execute this following query, I should get "hello", but I'm not getting anything (ZERO rows returned).
SELECT 'hello' FROM DUAL
WHERE 'sample1' in (DECODE(1, 1, '''sample1'', ''sample2'', ''sample3''',
2, '''sample4'', ''sample5'', ''sample6'''
I think some problem is there in my WHERE clause.
But When I'm exeucting the following query as a seperate query, then I'm getting the value of DECODE block properly, but didn;t understnad why its not returning the same way when I'm putting the same DECODE statement in WHERE clause.
SELECT DECODE(1, 1, '''sample1'', ''sample2'', ''sample3''',
2, '''sample4'', ''sample5'', ''sample6'''
FROM DUAL;
Please help me to get out of this problem. Thank you so much in advance.
Thanks,
Ramji.The value returned by SELECT DECODE(1, 1, '''sample1'', ''sample2'', ''sample3''',2, '''sample4'', ''sample5'', ''sample6''') FROM DUAL;
'sample1', 'sample2', 'sample3' is a single string. Consider it x.
SELECT 'hello' FROM DUAL WHERE 'sample1' in ( DECODE(1, 1, '''sample1'', ''sample2'', ''sample3''',2, '''sample4'', ''sample5'', ''sample6'''));
is like SELECT 'hello' FROM DUAL WHERE 'sample1' in ('x');
or
SELECT 'hello' FROM DUAL WHERE 'sample1' in ('''sample1'', ''sample2'', ''sample3''') and not
SELECT 'hello' FROM DUAL WHERE 'sample1' in ('sample1', 'sample2', 'sample3');
For this same reason SELECT 'hello' FROM DUAL WHERE 'sample1' in (select '''sample1'', ''sample2'', ''sample3''' from dual);
also does'nt work.
Please use INSTR to find whether 'sample1' exists in the string 'sample1', 'sample2', 'sample3'. -
Hi, Gurus.
i have a strange problem with blocks (parallel processing).
My Wf contain of:
1. Dialog step, where user choose actors.
2. parallel block for actors, the first step in the block - no-dialog step for getting instance of actor object.
When I test this WF, and choose more than 5 actors, the parallel processing not working,
all non-dialog task for each actor are in READY state, and not processing.
But when I delete dialog step and set actors manually, its working fine, and when I chosee less than 5 actors, it's working.
I check mapping, everything ok. Thank you for advise.
Regards,
Oleg.Thank you for your reply.
I have no rule in this Workflow, the processor of first dialog step is wf_initiator.
This step base on standard method - WF_TASK.DISPATCH.
Initiator chooses actor's (in my case it's org. units) and the table seem's like:
O 01000000
O 02000000
O 03000000
Then, I try to make paralllel steps for each line of this table. In WF Log, I see that parallel blocks is created,
but the first step in this blocks (it's no-dialog step to generate instance of orgunit object), is in ready state (the line (object key) is transfer to this step, and the instance is not generated). As I said, when I delete the step with agent chose, and fill this table manually, its working fine... -
A problem with plsql trigger in my form
i created two text field and a button(insert) to take the value of the text feild at run time and insert it in the table
this is my procedure
CREATE OR REPLACE PROCEDURE insert_value
(brn_id_in_p IN branch.brn_id%TYPE,
brn_name_in_p IN branch.brn_name%TYPE)
IS
BEGIN
INSERT INTO branch (brn_id,brn_name)
VALUES (brn_id_in_p, brn_name_in_p);
END insert_value;
and in the form button trigger (when button pressed ) i wrote this
EXECUTE insert_value(:BRANCH.BRN_ID_TF,:BRANCH.BRN_NAME_TF);
but it gave me plsql error but i dont know why?
note BRANCH is the datablock name and BRN_ID_TF,BRN_NAME_TF is the name of the itemsOnly write
insert_value(:BRANCH.BRN_ID_TF,:BRANCH.BRN_NAME_TF);
and then give me the error which is prompted...
another problem may occur with the data type which you declared in the properties of the text items
:BRANCH.BRN_ID_TF and :BRANCH.BRN_NAME_TF
in your forms. -
Problem with ForEach block in BPM
Hi,
I have a scenario as follows:
Collecting Idocs and send them separately via file channel (Does not make so much sense but I want to get used using the forEach Block)
Loop (as long as "control" != false)
Fork
1. branch: Wait step 1 minute and container operation assign "control" = false (if no more idoc is received, loop stops after 1 minute)
2. branch: receive step with correlation, container operation with append to multiline message, container operation assign "control" = true
Mapping
multiline message to single line message (same interface)
ForEach Block
Send Step with single line message
My problem:
x idocs get collected by the BPM and my file channel posts x idocs to the directory but it is always the same idoc and not x different ones.
Any idea on that?
Regards.
Oliver.Yes, that's the blog I used.
I have used the same interface for Send/Receive Steps, the Multi-Line Element and the Current Line Element. I restricted the Current Line Element to the block. Any other definition would not show up in the dropdown list, anyway.
These are my settings for the Block:
Step Name: Block1
Description: [Blank]
Mode: ForEach
MultiLine Element: Idoc_Multi
CurrentLine: Idoc_Local
End Condition, Exceptions and Local Correlations: [Blank]
Here are the settings for the Send Step:
Step Name: Send1
Description: [Blank]
Mode: Asynchronous
Create New transaction: [Not marked]
Message: Idoc
Ack: None
Receiver from: Send Context
All others: [Blank]
I don't see any error?
Regards.
Oliver. -
Hi everibody
I am nephiew with labview and i am trying to use "to variant" block.
In the atteachment there is a picture of my VI.
Where am i wrong?!
Best regards
Giovanni
Attachments:
variant.png 39 KBYou are right but the problem is more complex.
This is only a short vi.
I am communicating with a PLC and to do that i have used a .NET library.
The problem is that the library gives me some data from the plc in a To string variable. See the atteachment.
Trhough the variable datatype i select the corrisponding case. In the case of boolean is not a metter. In the case of an int16 i don't know how i can do. I would like to make a different thing for all type of variables...
is it clear?!
in the atteachment there is the vi and two screenshot of it.
Attachments:
variant2.png 14 KB
variant.png 11 KB
Untitled 2.vi 33 KB -
I just installed oracle 10g and all works fine.... except the web server i made a simple web procedure called hello
when i tried to execute it:
127.0.0.1:7777/app/hello
returned this message on the browser:
"Service Temporarily Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
Oracle-HTTP-Server/1.3.28 Server at oraunix Port 7777"
My dad is:
"<Location /app/mio>
SetHandler pls_handler
Order deny,allow
Allow from all
AllowOverride None
PlsqlDatabaseConnectString 127.0.0.1:1521:tsh1
PlsqlAuthenticationMode Basic
</Location>"
any ideas?????This is how I configured my dad
# ============================================================================
# mod_plsql DAD Configuration File
# ============================================================================
# 1. Please refer to dads.README for a description of this file
# ============================================================================
# Note: This file should typically be included in your plsql.conf file with
# the "include" directive.
# Hint: You can look at some sample DADs in the dads.README file
# ============================================================================
<Location /pls/chukws>
SetHandler pls_handler
Order deny,allow
Allow from all
AllowOverride None
PlsqlDatabaseUsername chukws
PlsqlDatabasePassword ikechi
PlsqlDatabaseConnectString chiana.kymp.net:1521:orcl ServiceNameFormat
PlsqlDefaultPage htmldb
PlsqlDocumentTablename wwv_flow_file_objects$
PlsqlDocumentPath docs
PlsqlDocumentProcedure wwv_flow_file_manager.process_download
PlsqlAuthenticationMode Basic
PlsqlNLSLanguage AMERICAN_AMERICA.WE8MSWIN1252
</Location>
And it worked fine. -
Repaint() - problems with queueing/blocking
hello,
im writing a game as an applet using awt, but i cant get the repaint() method to execute where i would want it to.
import java.applet.* ;
import java.awt.* ;
import java.awt.event.* ; //depreciated
import java.util.* ;
public class matches_applet extends Applet
implements ActionListener , MouseListener , ItemListener {
// var declarations
// init
// reinit for starting new game
// waiter for simulating "thinking"
public void move( int srcX , int srcY , int destX , int destY ) {
//check if vaild move...
// mode : 1 = single player , 2 = mulitplayer
// player: 1 = human , 2 = human/computer
if (mode == 1 && player == 1 ) {
waiter() ; //simulate computer player "thinking"
//add move to list of done moves...
System.out.println("repaint attempt");
try {
Thread.currentThread().sleep(2000);
field.repaint();
Thread.currentThread().sleep(2000);
} catch ( Exception e ) {}
System.out.println("repaint succsessful");
if (mode == 1 && player == -1 ) {
//send human move to ai...
//receive ai move
//write ai move to vars fromX , fromY , toX , toY
move( fromX , fromY , toX , toY ) ;
// listeners
// move invoked from mouseClicked( MouseEvent mouse ){}
public class CentrePanel extends Canvas {
@Override
public void paint( Graphics g ) {
System.out.println("repaint in");
// paint stuff
System.out.println("repaint out");
}now when i attempt to move a pawn, my console prints :
repaint attempt
repaint succsessful
repaint attempt
repaint succsessful
repaint in
repaint out
for the part inside the move.
insted it should print ( correct me if im wrong ) :
repaint attempt
repaint in
repaint out
repaint succsessful
repaint attempt
repaint in
repaint out
repaint succsessful
i know that the
if (mode == 1 && player == -1 ) {...}is blocking the queue, but i dont know how to get it not to.
thx for any answers in advance,
westernmagic
Edited by: westernmagic on Feb 1, 2009 5:36 AMPete_Kirkham wrote:
An alternative approach is to bypass the event queue and call paint directly with the components Graphics object whilst in the loop.
Pete[http://forums-beta.sun.com/thread.jspa?messageID=2065345]
thanks Pete.
@ admin/mod : feel free to close.
Edited by: westernmagic on Feb 1, 2009 1:26 PM -
Problem with CVI blocking UART Callback
Hi,
I have been using LabWindows CVI 9.0 since a few years now and I have seen a problem that didn't blocked me until now.
My LabWindows Software freezes, the code is no longer executed, when I hold a click on the interface, on a string for example.
The problem is that I use a device that emits data continuously on a COM port. When I decide to drag the software window or simply hold a left click on the interace the software stop acquiring data from the COM callback and my software misses data.
Do you have a solution for this problem ?
Thank youHI Penou,
In fact it is a good idea using multiple Threads to avoid this kind of behavior.
Maybe you are using ProcessSystemEvents to handle events, on the same main thread.
If it is the case, when ProcessSystemEvents handles an event that starts a tracking loop, such as the user pulling down a menu, ProcessSystemEvents does not return until the tracking loop completes. In the case of pulling down a menu, the tracking loop does not complete until the user dismisses the menu.
You have several inforrmations about ProcessSystemEvents here.
Regards,
Rémi D.
National Instruments France
#adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
>> Les rencontres techniques de NI - Mesures et acquisition de données : de la théorie à la mise en ... -
Dear All,
I am doing a BDC for a particular transaction. The BDC program defaults some values. The problem is , at a particular screen the coding blocks screen was popping up..I did n't code this coding block screen..I want to supress that coding block screen. Client does n't wants the coding blocks screen.. Can some one help me to supress these coding blocks...
Thanks in advance,
King.BDC behave differently in background, so where ever coding block page comes out just key-in enter, you cannot surpress this value.
Ex: BDC_OKCODE "=ENTE"
It will solve your problem.
Reward points if useful.
Regards,
SaiRam -
Problem with slide block puzzle
Hello:
I am doing a project that solve slide-block puzzles. My program take two common line arguments. One is a file specifying the initial configuration while the other specify goal configuration. My idea is to use an arrayList<block > to represent a configuration with each element being a block, for each block, I stores all possible configurations after moving the block in a Hashset and Stack. I check if the goal has been reached after each move, if not, go moving next one. If the configuration has been seen before, which indicates a dead end, I pop the stack to backtrack the most recent the branch and take another path.
Unfortunately, the algorithm I came up does not work.
Can anyone propose a psudocode for me?
Also, my program should print out all moves directly towards the goal but I can not figure out how to only print out the moves directly towards the goal and avoid printing those leading to dead end.
You can see specification http://nifty.stanford.edu/2007/clancy-slidingblocks/proj3.html.
I will be really really appreciated.Well, that was harder than I thought!
Anyway, the algorithm can be quite simple: a BFS finds a solution pretty fast. Here's some pseudo code:
public class Solver {
private Set<Integer> alreadyFormedTrays; // A set of already formed trays
private List<Block> goalList; // The final goal(s)
private boolean foundSolution = false; // A flag flipped to true once we find a solution
private Tray startTray; // The initial tray
public Solver(String[] tray, String[] goals) {
alreadyFormedTrays = new HashSet<Integer>();
goalList = new ArrayList<Block>();
buildTray(tray);
buildGoals(goals);
private void buildGoals(String[] goalsData) {
// Fill the 'goalList'.
private void buildTray(String[] trayData) {
// Create the first tray: 'startTray'.
private boolean goalsReached(Tray aTray) {
// Check wether we have reached our goal(s).
public void solve() {
alreadyFormedTrays.add(startTray.hashCode());
System.out.println("START=\n"+startTray);
solve(startTray);
private void solve(Tray aTray) {
IF we found a solution, stop looping END IF
IF 'aTray' reached our goal(s)
foundSolution <- true
print the path 'aTray' has taken
stop looping
END IF
'nextTrays' <- all next trays that can be formed from 'aTray'
FOR every Tray 'T' in 'nextTrays' DO
'hash' <- a hash of 'T'
IF 'hash' is not yet present in 'alreadyFormedTrays'
add 'hash' in 'alreadyFormedTrays'
make a recursively call with 'T' as a parameter
ENDIF
ENDFOR
public static void main(String[] args) {
String[] trayFile = {
"5 4",
"2 1 0 0",
"2 1 0 3",
"2 1 2 0",
"2 1 2 3",
"2 2 1 1",
"1 2 3 1",
"1 1 4 0",
"1 1 4 1",
"1 1 4 2",
"1 1 4 3"
String[] goalFile = {
"2 2 3 1"
Solver s = new Solver(trayFile, goalFile);
s.solve();
}As I said: the algorithm isn't that hard, the tricky part comes in finding all possible Trays from a given Tray X and making copies based on X.
Here are some UML diagrams of the classes I used:
| |
| + Tray |
|______________________________________|
| |
| ROWS: int |
| COLUMNS: int |
| - freeSpaces: byte[][] |
| blocks: List<Block> |
| path: List<Atom[]> |
|______________________________________|
| |
| + Tray(r: int, c: int): << constr >> |
| + Tray(tray: Tray): << constr >> |
| + addBlock(b: Block): boolean |
| + generateNextTrays(): List<Tray> |
| + removeBlock(b: Block): void |
|______________________________________|
| |
| + Block |
|__________________________________________________________________________________________|
| |
| HEIGHT: int |
| WIDTH: int |
| name: char |
| atoms: List<Atom> |
|__________________________________________________________________________________________|
| |
| + Block(n: char, height: int, width: int, startRow: int, startColumn: int): << constr >> |
| + Block(b: Block): << constr >> |
| - buildAtoms(startRow: int, startColumn: int): void |
| + getUpperLeft(): Atom |
| + move(m: Move): void |
|__________________________________________________________________________________________|
| |
| + Atom |
|______________________________________|
| |
| row: int |
| column: int |
|______________________________________|
| |
| + Atom(r: int, c: int): << constr >> |
| + Atom(a: Atom): << constr >> |
| + move(m: Move): void |
|______________________________________|I removed the equals(...), hashCode() and toString() methods for clarity, you should implement them, of course.
The Move class you see in there is an enum, and looks like this:
public enum Move {
UP (-1, 0),
RIGHT ( 0, 1),
DOWN ( 1, 0),
LEFT ( 0, -1);
final int deltaRow, deltaColumn;
private Move(int dr, int dc) {
deltaRow = dr;
deltaColumn = dc;
}If you have any questions about the methods/variables in the class diagrams, feel free to post back.
Good luck. -
Problem with payment block code in MIRO
Hi experts,
I've a problem during invoice verification, the system doesn't set the payment block code R -Invoice verification but another payment block code and in this way the transaction MRBR doesn't show the invoice blocked.
Is there in customizing an option for setting a specify payment code block for a company code?
I've verified the OMR6 and OMR9, but the problem not solved.
Thanks.
Best regards,
GaetanoYou can Block the invoice by
1. By defining the Block in payment terms
2. By setting tolerance limits in OMR6 trxn
3. and using Stochostic Block -
Problem with multirecord block
Hi every one
I have multirecord block in form conten 2 textitem A & B
and i have checkbox .
i need when i check the checkbox set instance item A Enable and item B Disable
and vice versa
the problem is when i check the checkbox all instance of item enable or disable
but i want that instance what I foucs on .You can't disable/enable an individual instance of a multi-record item.
What you CAN do is use SET_ITEM_INSTANCE_PROPERTY to set INSERT_ALLOWED, UPDATE_ALLOWED and VISUAL_ATTRIBUTE. To disable, set up a visual attribute that mimics a disabled field, and set INSERT_ALLOWED and UPDATE_ALLOWED to false. If you don't want them to be able to click or tab the cursor into the field create a pre-text-item trigger on the items that checks the value of the checkbox and raises form_trigger_failure if this field should be disabled. -
Hi,I place in an outline a simple formula: a = 100 and calculate database, Essbase doesn't create new blocks. The member 'a' is in the sparse dimension. I've marked "Create Blocks on Equations" option of course. The same problem I had on the other machine. I had to reinstall Essbase to get properly calculations.Anyone knows what is the reason of.Essbase 6.51, w2k sp2.ThanksAdam
Just to be sure - is the formula a=100 on the "a" member? Also, are you running the default calc, or a custom script? If you are running the default calc, try creating a calc script as follows:SET UPDATECALC OFF;CALC ALL;This will ensure that Intelligent Calc is not preventing the blocks from being created.Regards,Jade-----------------------------------Jade ColeSenior Business Intelligence ConsultantClarity [email protected]
Maybe you are looking for
-
[Solved] Kmix krash on kde startup
I have archlinux with kde and phonon-vlc. Every time i've logged in i see a KDE crash report from kdeinit4, sometimes there is also a KMix crash report. Sound in all application is perfect. I tried to install pulseaudio, after that there is no report
-
Combobox behavior inside a datagrid cell
How do you control the width of a combobox that resides inside a datagrid cell? Merely setting cb.dropdownWidth = "some value" does not work.
-
Hello, I created a new layout for pages but is not appearing in the list of Weblogic Portal Administration Console layouts. You know tell me if you need some action to appear? Thank you.
-
Hi Experts, When i run the processchain i can see the error message in the activation DSO, the message was Request DTPR_D4J1LUH7I2ENMRUL6MDA777CS no longer exists in DSO XX system is inconsistent .. The request was deleted from the DSO and it is ava
-
DELETING THE RECORDS IN THE FORM
Dear Friends I have a problem for deleting the records in my form on the form I have button for deleting the record and this button has when-button-pressed trigger And it has this contains Do_Key('DELETE_RECORD'); COMMIT_FORM; The system displayed th