Option to execute one sql at a time
Hi,
I have 10 sql's according to parameter value i have to execute one sql at a time.Currently i am using union all for all 10 sql and according to parameter it is executing one sql.I am getting performance issue while using this approach.It is executing all the 10 sql ,getting result for 1 sql .
As per requirement i can not use ref cursor or procedure.
Is there any other options for this requirement.
Thanks in advance.
is this a duplicate of this thread:
Re: problem with union all queries --urgent ?
if so, did you learn anything from the people who tried to help you?
Similar Messages
-
Hi All,
I have a simple PowerView report (Excel 2013) in which I have a hierarchy (three columns), an image column, and a Value column:
When I change the Show Levels option to "Rows - Enable Drill Down One Level at a Time", image column also hide.
I want to keep the image column displayed while drill down/up to the hierarchy.
Is it possible? If yes, then how?
Thanks & Regards,
Muhammad Ehsan
If this answers your question please mark as answer. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.Hi Muhammad,
According to your description, you have images at child level. Now you want to have the images displayed when have the child level items collapsed. Right?
In this scenario, when you show the data in a matrix in Power View, those images, Size ID and Prices have been added into a child group. If we enable drill down, all the items within the child group will be collapsed. We can't change it at all in Power
View.
For your requirement, we suggest you design your report using SQL Server Data Tools in Reporting Services. In Reporting Services, we can have specific columns toggled by the parent item.
Reference:
Add drill-down to a Power View chart or matrix
Drill-down Behaviour in Power View
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
How to execute one sql file in unix
Hi,
I need to run the follwing script in a file in unix , then run the corresponding spooled file again
SET echo OFF;
SET sqlblanklines ON;
SET feedback OFF;
SET linesize 1500;
SET trimspool ON;
SET termout OFF;
SET pagesize 0;
spool updatedfix.sql;
SELECT ' <update stmt>
spool OFF;
SET termout ON;
SET echo ON;
SET feedback ON;
How can the above script in a file be executed in unix
like
ed script
@ script
then
@ updatedfix.sql;
plz help
thanksI haven't got unix to hand but the principle is the same in windows batch files..
c:\temp>type gen_update.sql
set echo off
set sqlblanklines on
set feedback off
set linesize 1500
set trimspool on
set termout off
set pagesize 0
spool updatedfix.sql
select 'update emp set comm = -1 where comm is null;' from dual;
select 'exit' from dual;
spool off;
set termout on
set echo on
set feedback on
exit
c:\temp>sqlplus user/pass@db @gen_update.sql
SQL*Plus: Release 10.2.0.3.0 - Production on Wed May 6 12:25:10 2009
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> set feedback on
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
c:\temp>sqlplus user/pass@db @updatedfix.sql
SQL*Plus: Release 10.2.0.3.0 - Production on Wed May 6 12:25:37 2009
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
10 rows updated.
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
c:\temp>Just run one after the other in the script file. -
I can no longer close one tab at a time from the file tab. It is no longer an option
The file tab used to have an option to close one tab at a time. It is no longer available in file. If i close using the "X" it closes all of the tabs out.
Some menu entries in the main menu bar are hidden if you use the mouse and only appear if you use the keyboard to open the menu (Bug 626825).<br />
You can see the difference if you use Alt+F to open the File menu or other menus like the Edit menu (Alt+E) and Bookmarks menu (Alt+B) and compare that to what you see if you use the mouse to open the menu after you have made the menu bar visible by tapping Alt or by pressing F10.
Add code to userChrome.css below the default @namespace line.
*http://kb.mozillazine.org/userChrome.css
The customization files userChrome.css (interface) and userContent.css (websites) are located in the chrome folder in the user profile folder.
*http://kb.mozillazine.org/Editing_configuration
<pre><nowiki>@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
/* Always show menu entries with class="show-only-for-keyboard" */
#navigator-toolbox menuitem[class="show-only-for-keyboard"]:not([hidden="true"]){ display:-moz-box !important; }
</nowiki></pre> -
Execute PL/SQL statement on rendered report column only (APEX 4.02)
Hello,
i have a classic report which selects approx. 100.000 rows. For one of the columns in the sql i am executing
a rather complex PL/SQL function which generates additional html. This function slows down the query
by a tremendous amount (over one hour for the select, without this function it's 30 seconds) so i don't
want to execute it for each selected row but for the rendered ones only (15 per page).
Is it possible to do so in a report?Steven Mark wrote:
So if APEX does not give us the option to execute PL/SQL scripts on actually rendered columns onlyI have long thought that this is a major limitation of APEX. We know from Marc's post Re: Reports/Tabular Form and number of executions of a Lov Query that built-in column display operations are only performed for the rows rendered on the current page. However, there are many requirements (even relatively simple ones like row-level conditional display) that are impossible to meet using the built-in Display As/LOV, HTML Expression, Tabular Form Element, and Column Link display options. The alternatives are inefficient (context switching to user-defined functions) or poor practice (losing the separation of concerns by generating HTML/links in report queries).
The ability to call user-defined functions at the same rendering point as built-in column display operations, and to apply row-level conditions to built-in display options are long overdue enhancements. -
How to index a array to give it to for loop for one value at a time sequence to be ensured
I need to give one number from a array at a time to a for loop. means the for loop have to execute one number at a time from a array of numbers. How to do it
Ranjeet,
Ranjeet_Singh wrote:
But question is same only. is in it ?
With all due respect, NO.
Please make sure you know what you are talking about before blatantly countering someone else's comment. Can you prove that your vi and TiTou's snippet will do the same thing?
Beginner? Try LabVIEW Basics
Sharing bits of code? Try Snippets or LAVA Code Capture Tool
Have you tried Quick Drop?, Visit QD Community. -
I have a table-valued function that run in sql 2005 and when try to execute in sql 2008 r2, return the next "Conversion failed when converting date and/or time from character string".
USE [Runtime]
GO
/****** Object: UserDefinedFunction [dbo].[f_Pinto_Graf_P_Opt] Script Date: 06/11/2013 08:47:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE FUNCTION [dbo].[f_Pinto_Graf_P_Opt] (@fechaInicio datetime, @fechaFin datetime)
-- Declaramos la tabla "@Produc_Opt" que será devuelta por la funcion
RETURNS @Produc_Opt table ( Hora datetime,NSACOS int, NSACOS_opt int)
AS
BEGIN
-- Crea el Cursor
DECLARE cursorHora CURSOR
READ_ONLY
FOR SELECT DateTime, Value FROM f_PP_Graficas ('Pinto_CON_SACOS',@fechaInicio, @fechaFin,'Pinto_PRODUCTO')
-- Declaracion de variables locales
DECLARE @produc_opt_hora int
DECLARE @produc_opt_parc int
DECLARE @nsacos int
DECLARE @time_parc datetime
-- Inicializamos VARIABLES
SET @produc_opt_hora = (SELECT * FROM f_Valor (@fechaFin,'Pinto_PRODUC_OPT'))
-- Abre y se crea el conjunto del cursor
OPEN cursorHora
-- Comenzamos los calculos
FETCH NEXT FROM cursorHora INTO @time_parc,@nsacos
/************ BUCLE WHILE QUE SE VA A MOVER A TRAVES DEL CURSOR ************/
WHILE (@@fetch_status <> -1)
BEGIN
IF (@@fetch_status = -2)
BEGIN
-- Terminamos la ejecucion
BREAK
END
-- REALIZAMOS CÁLCULOS
SET @produc_opt_parc = (SELECT dbo.f_P_Opt_Parc (@fechaInicio,@time_parc,@produc_opt_hora))
-- INSERTAMOS VALORES EN LA TABLA
INSERT @Produc_Opt VALUES (@time_parc,@nsacos, @produc_opt_parc)
-- Avanzamos el cursor
FETCH NEXT FROM cursorHora INTO @time_parc,@nsacos
END
/************ FIN DEL BUCLE QUE SE MUEVE A TRAVES DEL CURSOR ***************/
-- Cerramos el cursor
CLOSE cursorHora
-- Liberamos los cursores
DEALLOCATE cursorHora
RETURN
ENDYou can search the forums for that error message and find previous discussions - they all boil down to the same problem. Somewhere in your query that calls this function, the code invoked implicitly converts from string to date/datetime. In general,
this works in any version of sql server if the runtime settings are correct for the format of the string data. The fact that it works in one server and not in another server suggests that the query executes with different settings - and I'll assume for
the moment that the format of the data involved in this conversion is consistent within the database/resultset and consistent between the 2 servers.
I suggest you read Tibor's guide to the datetime datatype (via the link to his site below) first - then go find the actual code that performs this conversion. It may not be in the function you posted, since that function also executes other functions.
You also did not post the query that calls this function, so this function may not, in fact, be the source of the problem at all.
Tibor's site -
Can we execute more than one SQL in Stored Procedure?
Please help me with this.
I am connecting to SQL SERVER
Thanks
VenuHi Venu,
>>1) Get the input parametrs for SP in from file
You can pass parameters to the SP from the payload of the message. I am not sure what do you mean by "Getting the parameters for SP in form file"..
>>2 Configure Receiver JDBC adapter(Synchronous)which executes a STORED PROCEDURE that has some processing logic containing more than one sql statment
This is no problem. You can have any number of select /update statements inside the stored procedure. But your stored procedure will not return data to XI and that will not be sent as a response to your BPM
3) Send the response from SP to a BPM
yes.You can have another Stored procedure that have only one select statement to send response to BPM. You may have to define abstract interfaces .
hence for 2) and 3) the message payload would be something like this
<StatementName1>
<storedProcedureName action= EXECUTE>
<table>realStoredProcedureeName</table>
<param1 [isInput=true] [isOutput=true] type=SQLDatatype>val1</param1>
</storedProcedureName >
</StatementName1>
<StatementName2>
<anyName action= SQL_QUERY>
<access>SQL-String with optional placeholder(s)</access>
<key>
<placeholder1>value1</placeholder1>
<placeholder2>value2<placeholder2>
</key>
</anyName >
</StatementName2>
Regards
Arul
PS: Mark usefull answers and for more info about points - read the post "Rules of engagement" at the top of the XI forum -
Creating SQL-Loader script for more than one table at a time
Hi,
I am using OMWB 2.0.2.0.0 with Oracle 8.1.7 and Sybase 11.9.
It looks like I can create SQL-Loader scripts for all the tables
or for one table at a time. If I want to create SQL-Loader
scripts for 5-6 tables, I have to either create script for all
the tables and then delete the unwanted tables or create the
scripts for one table at a time and then merge them.
Is there a simple way to create migration scripts for more than
one but not all tables at a time?
Thanks,
Prashant RaneNo there is no multi-select for creating SQL-Loader scripts.
You can either create them separately or create them all and
then discard the one you do not need. -
How can I make a pdf book (single pdf file with several pages) with "camera to pdf" option on phone? I can only convert one pic at a time. ( Or )how can I attach all those pictures converted pdf's into one pdf file which obviously results in to a single pdf file with several pages in it ?
Adobe Reader on the iPhone is a PDF reading app. It's not a creation app.
You need to get an app like Pages which is intended for page layout. It can place pictures from the phone and export PDF. -
i formatted and re-installed itunes. now it flashing massage that my ´ipod is synced with another iTunes library. An ipod can be synced with only one library at a time.´ now it is giving 2 options, 1- erase and sync, 2- transfer purchases. what to do?
Follow these instructions:
Syncing to a "New" Computer or replacing a "crashed" Hard Drive: Apple Support Communities -
Executing more than one procedures at a time
Hi,
Can any one tell how to execute more than one procedure at a time..
I am trying to run like this..but its throwing an error...can anyone please suggest?
CREATE OR REPLACE PROCEDURE HYSXM.QA_AUTO_RETURN_FINAL IS
i EVENTS_TEST_DATA%ROWTYPE;
BEGIN
DELETE FROM TEST_EVENTS;
COMMIT;
for i in ( SELECT RADIO_ID,EVENT_TYPE FROM EVENTS_TEST_DATA )
LOOP
QA_AUTO_INSTALL(i.radio_id,i.event_type);
QA_AUTO_RESOLD(i.radio_id,i.event_type);
QA_AUTO_RETURN(i.radio_id,i.event_type);
END LOOP;
END QA_AUTO_RETURN_FINAL;
/what error message is being returned??
-
I am trying to transfer my purchases from my iPhone 5 to my new Mac computer. I get the message stating that it can only be synced with one computer at a time. I have tried the 2 other ways and I get no options to transfer my purchases. Help?
If you see Devices in the big list on the left-hand side of iTunes, it should show the name of your iPhone right below it. You can right-click (or hold ctrl and left click) on the name of the iPhone there, and choose "transfer purchases from iPhone".
If you're on iTunes 11, you won't see the big list of the left until you go to the View menu at the very top (where you see iTunes/File/Edit/View/etc) and choose Show Sidebar. Then do the same thing: right-click or ctrl and left-click on the iPhone's name below Devices and "transfer purchases from iPhone".
It'll ask you to authorize the computer for your Apple ID if you haven't yet; to do that, you just type your Apple ID and password in when it asks. If it says you are not authorized but doesn't automatically give you an option to do so, then you can go to the Store menu at the very top and choose "authorize this computer". -
Only one user at the time can execute VE01 (due to blockage of VEIAV)
Hi,
As I understand it only one user at the time can execute VE01 (or MEIS for arrivals). If someone is already executing the VE01 transaction the error-message "Table VEIAV is blocked by user XX" appears. It does not matter if one tries to execute it for different legal entities - no parallel processing seems to be possible.
This is a huge limitation for a global concern with many entities operating in the same SAP instance. Does anyone recognize this problem and are there any ways to get around it? It does not make sense that dispatches (VE01) and arrivals (MEIS) cannot be executed for several organizational units at the same time in parallel?
Thanks in advance,
Mats Hanssonyes I know this problem.
One should not maintain much thru this transaction.
for me it is not more than an emergency transaction, as it is not really more than table maintenance thru SM30
You should investigate what entries/changes the users have to make.
Limit these manual entries by having better data in the system, so that SAP can itself create the entries for this table.
Organize more, less users , maybe just one per company who shall maintain VEFU manually.
Train them to prepare their entries before they start using VEFU.
Explain that they should leave VEFU as soon as possible as the block other users.
assign maintenance windows to the users. -
Execute just that one SQL statement ....
Would like to request to add running just that one sql statement in the statment worksheet which has your cursor in it without having to select the entire statement.
Updating any part of a statement deselects it ..... reselecting a larger statement is cumbersome and time consuming
Regards
RonaldThere are some problems with the statement selection (as per the other reply) but you can run just the current statement that the cursor is in, with the F9 or the Run Statement button on the SQL Worksheet.
If you are used to using TOAD where blank lines are seperators, remember that Raptor expects you to terminate your SQL statements with a ; and your PL/SQL statements with a / (on a new line).
Maybe you are looking for
-
Hi! My name is Derek Turner and I have been hacked through a friend's email message to me which I opened unsuspecting any danger. Initially, he sent me an 'attention' or warning email with a link which I tried to open but it could not be opened, so
-
Help with creating a custom table cell editor?
hi, i was reading up on various tutorials and trying to write codes that pops up a simple calendar when clicked on text of the Date class in a table, so far, i can't seem to get my classes working.. the following is some classes i've written for this
-
Compilation failed for Pro*C program in Oracle 10g
Hi, During migration from Oracle 9i to 10g, I get the followin error when compiling by connecting to 10g database. The same file is getting compiled successfully for 9i database. Could any one help me to resolve this issue. Syntax error at line 65, c
-
Using the latest version of Safari 4.04 and I was trying to listen to the audio streams on this page (http://www.walkwiththeking.org/audio.asp) and they were not working so I foolishly downloaded the latest version of Real Player (as I was using a ve
-
1 We are developing a Tabular Model. In this model there are likely to be about 15 dimension tables and 2 main fact tables. 2 One of the fact tables is very large approximately 70 million rows and will increase to 150 million rows in about 2-3 year