Combine 2 Answers and divide the results
Hello,
Is it possible to further calculations of results of two-generated queries.
I created two queries. The results can I view in the dashboard. However, I am unable to carry out further calculations with the results. Now I wanted to divide a query from the other.
How can this be done?
Thanks
Joh
Hi,
Well I think what you suggest is merging the "rows" of two ansers into a new answer. This works quite well but doesn't help in our case. We have to answers:
1) A two-row-table with row1 a product-id and row2 the total costs spend to produce this product in the last quarter.
2) A two-row-table with row1 a product-id and row2 how often the product was sold.
Of cause it is now quite interesting to find out the costs per unit. I can't believe it isn't possible to do such a simple thing :-( Is there no way around it or are we simple missing it?
Unfortunately we have no way to derive these costs per unit in another way. I could eventually do this if I could self-join my Facts-table with itself but I think this too isn't possible? It would be quite easy for me to provide a regular-sql-statement to calculate these costs but since this has joins between tables of my star-schema I don't know how to translate this into a BI-Suite-SQL-Query.
Any help would be highly appreciated on this thing,
-Johannes
Similar Messages
-
I want to combine a bunch of queries and dump the results - spreadsheet
I have a bunch of SQL queries. I want to run the SQL queries and dump the results into one single spreadsheet in a formatted fashon.
Assume that one of my queries returns the following:
Week 10, Door, 15
Week 10, Window, 20
Week 10, Stair, 25
Week 11, Door, 50
Week 11, Window, 75
Week 11, Stair, 100
Week 12, Door, 1
Week 12, Window, 2
Week 12, Stair, 3
I would then want to take all these results and put them into a spreadsheet with a bunch of other results:
So header would look like:
Week 1, Week 2, Week 3, ...Week 10, Week 11, Week 12...
Then, down below there would be three rows which have the following in Col A:
Door
Window
Stair
So in row "Door", under Col "Week 10", there would be a 15
Under "Window", under Col "Week 11", there would be a 75
Under "Stair", under Col "Week 12", there would be a 3
The column headers would all be in weeks, but I want to basically make a matrix out of my SQL queries. So there would be many rows besides "Door", "Window", and "Stair", but they would all have similar results as supplied by my other queries. Anyone know how to do such mapping?Check this link --
[url http://forums.oracle.com/forums/search.jspa?threadID=&q=pivot&objID=f75&dateRange=last90days&userID=&numResults=15]Pivot Search In Oracle
Regards.
Satyaki De. -
Execute a VO '4' times and show the result in single table at once.
Hi,
I want to execute single a VO query multiple times with different parameters and show the results together in a Table at once
In Detail
I have a table to which is associated with a VO.
The VO contains SQL whose WhereClauseParameters need to be dynamically binded.say headerId and lineId
Select ... from ....where headerId = :1 AND lineId = :2
I have to pass these 4 values and show all the results in a single table
headerId lineid
H1 ............... L1
H1 ............... L2
H2 ............... L1
H2 ............... L2
I understand that i need to bind parameters dynamically and exceute the VO.
As i have 4 different set of parameters, the view object will be executed 4 times.
I want to show all the results together in a single table.
How can I do it.
thanks,
GowtamHi Mani,
Thanks a lot for the patience and detailed solution.I will try it out and tell you the status.
Meanwhile, I have 2 questions on this solution(just curious)
I will give you the snapshot of the table
Table - ModelInfo
Model......Tube..... Float....Size......Col5.....Col6.......Col7.......
M1............T1.......... F1. .....1..........C15......C16.....C17.....
M1............T1...........F1.......2..........C25......C26.....C27.....
M1............T2......... .F2.......1..........C35......C36.....C37.....
M1............T2...........F2.......2..........C45......C46.....C47.....
M2............T1.......... F1. .....1..........
M2.............T1..........F1.....2.........Cn5.......Cn6........Cn7
.<continues...>
.<till>
.Mn............Tn..........Fn.......n........Cxy.......Cpq.......Crs....
Question 1:
if you notice this data,
The Columns 5 to 7 are dependent on Combination of Model,Tube,Float and Size.
Hence will this query work properly(without mixing up data from other Pk combination) and will it be efficient?(I Know this is a stupid qst, still double checking..As your solution assumes that each row is unique for Model only..which is not true)
Select ...From....Where
Model in(M1,M2,..Mn) AND Tube in(T1,T2..Tn) AND Float in(F1,F2,....Fn) and Size in(1,2...n).
In short, will C15,C16 and C17 appear only with M1,T1,F1,1..I believe it will.
Question 2:
As I told,
Third party program will return Array of Objects.
Each object will have a variable called Flow along with
Model,Tube,Float and Size.
Flow is not stored in the database(can not be stored due to functional reasons).I want to show this Flow also along with other columns fetched from the DB for all 100+ rows.
How can I do it?
I will give u the scenario(with just 2 rows)...please check(Flow is not stored in DB)
Third Party object : ObjModel
Model......Tube..... Float....Size......Flow
M1............T1.......... F1. .....1..........100
M1............T1...........F2.......2...........200.
M1............T2.......... F1.......1..........300
M1............T2...........F2.......2..........400
My concern is,
After the VO executes and shows other 6 columns, it should show Flow appropriately.(associated with each object in the array)
I understand that I need to have a Transient attribute in VO called[b] Flow.But I don't know how to perform the two tasks simultaneously..
Task1:Your solution on showing table columns
Task2:Showing Transient data for each object returned from program.
thanks,
Gowtam -
Using Powershell Script Run simple query in MS Access 2007 and export the results of query to Excel
Hi Experts,
I have a Access 2007 DB file and 2 Big tables inside that (bigger than the size that can be easily handled by MS Excel 2007).
My requirement is automate using powershell scripts the below things.
1. Create a SQL query in Access DB and save that in access DB
2. Run the saved query and export the result in excel sheet where I can create the charts and Pivots. Thanks in advance
PrajeshDo you have to use the Access query, couldn't you just recreate the query in Powershell? Here's a link with good info that references an existing script for querying an Access database:
http://blogs.technet.com/b/heyscriptingguy/archive/2009/08/13/hey-scripting-guy-can-i-query-a-microsoft-access-database-with-a-windows-powershell-script.aspx
Once you have your dataset you can pipe it to
Export-Csv -NoType c:\pathtofile\output.csv -
<table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%" id="HB_Mail_Container"><tbody><tr width="100%" height="100%"></tr><tr><td height="1" style="font-size: 1pt"></td></tr></tbody></table><blockquote><table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%" id="HB_Mail_Container"><tbody><tr width="100%" height="100%"><td id="HB_Focus_Element" width="100%" height="250" valign="top"><p>I initiate a CR XI from a C++ routine using ShellExecute command, the report file is opened and the C++ program continues to execute, this is working fine, now I need the following two things:</p><p>1. When the report is invoked I would like it to run and print the result either to a printer or to a file.</p><p>2. I need to send the report parameters since it will not prompt for it if it runs automatically.</p><p>Thanks in advance for your help.</p></td></tr><tr></tr></tbody></table><blockquote><table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%" id="HB_Mail_Container"><tbody><tr width="100%" height="100%"><td id="HB_Focus_Element" width="100%" height="250" valign="top"><p> </p></td></tr></tbody></table></blockquote></blockquote>
Please re-post if this is still an issue to the Legacy Application Development SDKs Forum or purchase a case and have a dedicated support engineer work with you directly
-
How do I get iTunes 11 to work as the old iTunes did in this respect: after playing a song in one playlist, I click on another playlist, highlight a song, press play, and get the result of that song playing & that playlist continuing? As it goes now, one clicks on the song in the new playlist where the arrow is and then chooses 'Play Song Next.' So, it plays next, but then the song after that is back in the old playlist. I want to use iTunes smoothly without the extra clicks I've had to do in order to get the playlist to continue. This is music for background while I play the violin at restaurants, and extra clicks and hassle is quite unappreciated, especailly since it worked fine in the previous iTunes.
Thanks.At the top of the playlist where it shows the playlist title and the number of songs, there are two icons. Click the "play" triangle to add the entire playlist to "Up Next", or the "shuffle" symbol to do the same thing but in random order. But the currently playing track will stop playing, and all the songs in "Up Next" will be removed (replaced by the ones from this playlist).
If you hold down the "option" key while clicking those icons, the currently playing song will continue playing, and the new playlist will be added to "Up Next" (above the songs that were already there). -
The attached file is work inprogress, with some dummy data sp that I can test it out without having to connect to equipment.
The second tab is the one that I am having the problem with. the output array from the replace element appears to be starting at the index position of 1 rather than 0 but that is ok it is still show that the new data is placed in incrementing element locations. However the main array that I am trying to build that is suppose to take each new calculation and place it in the next index(row) does not ap
pear to be working or at least I am not getting any indication on the inidcator.
Basically what I am attempting to do is is gather some pulses from adevice for a minute, place the results for a calculation, so that it displays then do the same again the next minute, but put these result in the next row and so on until the specifiied time has expired and the loop exits. I need to have all results displayed and keep building the array(display until, the end of the test)Eventually I will have to include a min max section that displays the min and max values calculated, but that should be easy with the min max function.Actually I thought this should have been easy but, I gues I can not see the forest through the trees. Can any one help to slear this up for me.
Attachments:
regulation_tester_7_loops.vi 244 KBI didn't really have time to dig in and understand your program in depth,
but I have a few tips for you that might things a bit easier:
- You use local variables excessively which really complicates things. Try
not to use them and it will make your life easier.
- If you flowchart the design (very similar to a dataflow diagram, keep in
mind!) you want to gather data, calculate a value from that data, store the
calculation in an array, and loop while the time is in a certain range. So
theres really not much need for a sequence as long as you get rid of the
local variables (sequences also complicate things)
- You loop again if timepassed+1 is still less than some constant. Rather
than messing with locals it seems so much easier to use a shiftregister (if
absolutely necessary) or in this case base it upon the number of iterations
of the loop. In this case it looks like "time passed" is the same thing as
the number of loop iterations, but I didn't check closely. There's an i
terminal in your whileloop to read for the number of iterations.
- After having simplified your design by eliminating unnecessary sequence
and local variables, you should be able to draw out the labview diagram.
Don't try to use the "insert into array" vis since theres no need. Each
iteration of your loop calculates a number which goes into the next position
of the array right? Pass your result outside the loop, and enable indexing
on the terminal so Labview automatically generates the array for you. If
your calculation is a function of previous data, then use a shift register
to keep previous values around.
I wish you luck. Post again if you have any questions. Without a more
detailed understanding of your task at hand it's kind of hard to post actual
code suggestions for you.
-joey
"nelsons" wrote in message
news:[email protected]...
> how do I create a 1d array that takes a single calculation and insert
> the result into the first row and then the next calculation the next
> time the loop passes that point and puts the results in thsecond row
> and so on until the loop is exited.
>
> The attached file is work inprogress, with some dummy data sp that I
> can test it out without having to connect to equipment.
> The second tab is the one that I am having the problem with. the
> output array from the replace element appears to be starting at the
> index position of 1 rather than 0 but that is ok it is still show that
> the new data is placed in incrementing element locations. However the
> main array that I am trying to build that is suppose to take each new
> calculation and place it in the next index(row) does not appear to be
> working or at least I am not getting any indication on the inidcator.
>
> Basically what I am attempting to do is is gather some pulses from
> adevice for a minute, place the results for a calculation, so that it
> displays then do the same again the next minute, but put these result
> in the next row and so on until the specifiied time has expired and
> the loop exits. I need to have all results displayed and keep building
> the array(display until, the end of the test)Eventually I will have to
> include a min max section that displays the min and max values
> calculated, but that should be easy with the min max function.Actually
> I thought this should have been easy but, I gues I can not see the
> forest through the trees. Can any one help to slear this up for me. -
Is there any way to search for a term using the Firefox search field, and have the results automatically open in a new tab? When there was support for Google Toolbar, I was able to do this; now, whenever I want to search for something, I have to open a new tab to do it, and cut-and-paste my search into the search field in the new tab. I used to be able to highlight, drag, and drop something into the search field and have it automatically open in a new tab. This is enough for me to switch to Chrome . . .
Set a preference to have searches from the Search Bar (upper right) automatically open all searches in a new tab
#type '''about:config''' in the URL/Location/Address bar and press the Enter key
#if you see a warning, accept it (promise to be careful)
#Filter = '''browser.search.openintab'''
#in the lower panel, double click the item (or right-click and choose "Toggle") to change the value to "true"
#close the about:config tab and test
#See:
#*For help with opening/using about:config, also see: http://kb.mozillazine.org/About:config
#*Also see: http://kb.mozillazine.org/About:config_entries (click on "Browser", scroll down to browser.search.openintab)
'''Search Bar''': http://support.mozilla.com/en-US/kb/Search+bar
'''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
About Google toolbar............
Google decided that they will no longer produce the Google Toolbar for Firefox 5 and newer version. It is best to move on to other alternatives than to try any "hacks" to the toolbar that may or may not perform in the future. Future versions of Google toolbar will only work with IE7-9. Google Toolbar is not available on any other browser, even Google's own browser.
*http://googletoolbarhelp.blogspot.com/2011/07/update-on-google-toolbar-for-firefox.html
*https://support.mozilla.com/en-US/kb/google-toolbar-not-compatible-firefox?s=google+toolbar&r=0&as=s
*http://www.google.com/support/toolbar/bin/answer.py?answer=1342452&topic=15356%29
*Google Toolbar 8 FAQ (IE only): https://www.google.com/support/toolbar/bin/answer.py?hl=en&answer=1111588
'''''To access your Google Bookmarks visit''''' www.google.com/bookmarks.
Alternatives:
*http://kb.mozillazine.org/Using_Google_Toolbar_features_without_toolbars
*https://addons.mozilla.org/en-US/firefox/addon/googlebar-lite/
*https://addons.mozilla.org/en-US/firefox/addon/gbookmarks-google-bookmarks-fo/ -
Executing Procedure in SQL SERVER and Storing the results in Oracle 10g
Hello,
I am trying execute SQL SERVER procedure from Oracle 10g and store the results in a oracle table. When I tried executing the procedure i am getting errors.
I am using Oracle Heteroeneous Services.
Steps I followed.
1. Created ODBC DSN on Oracle Server connecting to SQL SERVER database.
2. Created Listner entry and TNSNAMES entries.
3. Created Database link and able to select the data from the SQL SERVER tables.
Here is the code i tried to execute the procedure.
BEGIN
"META"."extract"@abc;
END;
"META"."extract"@abc;
ERROR at line 2:
ORA-06550: line 2, column 1:
PLS-00201: identifier 'META.extract@ABC' must be declared
ORA-06550: line 2, column 1:
PL/SQL: Statement ignored
Please help me.
Thank You,
Seshadri ThopeHi thopevs,
Can you please tell me the right syntax of calling procedures(on sql server) from oracle?
I am getting following error:
SQL> execute "GetdateSys"@oratosql;
begin "GetdateSys"@oratosql; end;
ORA-06550: line 2, column 7:
PLS-00201: identifier 'GetdateSys@ORATOSQL' must be declared
ORA-06550: line 2, column 7:
PL/SQL: Statement ignored
SQL>
Your help will be highly appreciated.
Thanks & Regards,
M.U.N.A -
Executing Abap Queries in Abap Code and processing the result
Hi,
I want to execute ABAP Queries (designed by sq01) in an abap report and processing the result in an internal table.
How could it be work?
Thanks a lot for your responses,
with kind Regards
Reinhold StroblHello,
GO to SQ01 and select your query. Go to Menu QUERY-->More Functions->Display Report Name.
You can then take that report name and go to SE38. Copy the code before END-OF_SELECTION and then modify as per your own requirements.
Regrads
Saket Sharma -
How to input data from labview to executable application and export the results back to labview
I have a simple function written in m file under Matlab enviornment,
function [c]=myadd2(a,b)
c=a+b;
I built it into a executable file (.exe), then I want to call it in labview and get the results.
I followed this tutorial and some other information on line:
http://digital.ni.com/public.nsf/allkb/5CF9526FF069EA8E862564C400579DBA
But I didn't see any telling me how to get the Labview array data input to the EXE file and return the results data back to another indicator in labview.
Any one have some idea?
I appreciate the help very much.
ArnoldYou probably need to include some command line arguments on your executable that would be the name of a file to get the data from. You could also include a command line argument telling that exe where to store the results.
I am not familiar with Matllab to give you advice on how specifically to do that with your exe though.
Mark Yedinak
"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot -
How to convert Smart Form into PDF format and return the result in BAPI?
I want to convert a Smart Form into PDF format and return the result in BAPI.
can anyone tell me how it can be done with related example
regards
pranayhi,
smart form to pdf--
All you have to do is call your SF to get OTF and then concert it to PDF. Works like charm:
DATA: p_output_options TYPE ssfcompop,
p_control_parameters TYPE ssfctrlop.
p_control_parameters-no_dialog = 'X'.
p_control_parameters-getotf = 'X'.
CALL FUNCTION v_func_name "call your smartform
EXPORTING
output_options = p_output_options
control_parameters = p_control_parameters
IMPORTING
job_output_info = s_job_output_info.
call function 'CONVERT_OTF_2_PDF'
tables
otf = s_job_output_info-otfdata
lines = t_pdf
and if u need more u can check below links also
Check the below links..
Re: Smartforms to PDF
Re: smartform (otf) as pdf and sending as email-attachment
VISIT THIS LINK
Re: Smartforms to PDF
PLZ REWARD POINTS IF IT HELPS YOU
rgds
anver -
I would like to build a drag n drop interface and have the results sent to my email in PDF format. Is this possible?
Captivate is not really designed to do what you want in this instance. It's more targeted at allowing a user to complete an assessment and then track whether or not they passed. So it's only really set up to send information in a format that the LMS will understand and interpret as Pass/Faill and what the score was.
You really need something more flexible than that. So I think you would need to get a programmer involved and have the solution custom made. In my experience, any time you try to diverge Captivate from what it was designed to do, and you need to get other IT professionals involved, you can kiss thousands of dollars goodbye before you have a workable solution. -
Hi,
I am working on a POC that is supposed to convert indd files to pdf (i.e. using of course the indesign server). Basically I want to call the IDS Web Service (located on a different machine perhaps), pass in the input file, the conversion script and retrieve the result as part of the WebService call?
Browsing the documentation, examples, etc in the SDK, I couldn't see how the above can be achieved without the client handling the file transfer. Surely I must be missing something ...
thanks
ChrisWhat do you mean with POC?
InDesign Server is too precious (i.e. license cost) to waste its time with file transfers.
For a smaller scale, let a separate process (some http or smb server) on the same server hardware handle the files - so that the InDesign Server can access them on the fastest local volume.
If you plan for bigger, use a dedicated server for file sharing (your choice of SMB, NFS or whatever), where the input files are prepared by the client process, so that your load balancer can immediately point the next free instance of the InDesign server farm to the file. In that case be prepared for some try and error - high speed file sharing can be tricky with files written from one side not yet visible or incomplete to the other side, locking problems, Unicode file name trouble, unexpected time stamps and so forth.
Btw, there is also an InDesign Server forum which would be more appropriate for such discussions.
Dirk -
Search in Nested Tables and Insert the result into new Nested Table!
How can I search in Nested Tables ex: (pr_travel_date_range,pr_bo_arr) using the SQL below and insert the result into a new Nested Table: ex:g_splited_range_arr.
Here are the DDL and DML SQLs;
Don't worry about the NUMBER( 8 )
CREATE OR REPLACE TYPE DATE_RANGE IS OBJECT ( start_date NUMBER( 8 ), end_date NUMBER( 8 ) );
CREATE OR REPLACE TYPE DATE_RANGE_ARR IS TABLE OF DATE_RANGE;
DECLARE
g_splited_range_arr DATE_RANGE_ARR := DATE_RANGE_ARR( );
g_travel_range DATE_RANGE := DATE_RANGE( '20110101', '99991231' );
g_bo_arr DATE_RANGE_ARR := DATE_RANGE_ARR( DATE_RANGE( '20110312', '20110317' ), DATE_RANGE( '20110315', '20110329' ) );
FUNCTION split_date_sql( pr_travel_date_range DATE_RANGE,
pr_bo_arr DATE_RANGE_ARR )
RETURN DATE_RANGE_ARR
IS
l_splited_range_arr DATE_RANGE_ARR;
BEGIN
SELECT start_date, end_date
INTO l_splited_range_arr(start_date, end_date)
FROM (WITH all_dates
AS (SELECT tr_start_date AS a_date, 0 AS black_out_val FROM TABLE( pr_travel_date_range )
UNION ALL
SELECT tr_end_date, 0 FROM TABLE( pr_travel_date_range )
UNION ALL
SELECT bo_start_date - 1, 1 FROM TABLE( pr_bo_arr )
UNION ALL
SELECT bo_end_date + 1, -1 FROM TABLE( pr_bo_arr )),
got_analytics
AS (SELECT a_date AS start_date,
LEAD( a_date ) OVER (ORDER BY a_date, black_out_val) AS end_date,
SUM( black_out_val ) OVER (ORDER BY a_date, black_out_val) AS black_out_cnt
FROM all_dates)
SELECT start_date, end_date
FROM got_analytics
WHERE black_out_cnt = 0 AND start_date < end_date
ORDER BY start_date);
RETURN l_splited_range_arr;
END;
BEGIN
g_splited_range_arr := split_date_sql(g_travel_range,g_bo_arr);
FOR index_g_splited_range_arr IN g_splited_range_arr .FIRST .. g_splited_range_arr .LAST LOOP
DBMS_OUTPUT.PUT_LINE('g_splited_range_arr[' || index_g_splited_range_arr || ']: ' || g_splited_range_arr(index_g_splited_range_arr).start_date || '-' || g_splited_range_arr(index_g_splited_range_arr).end_date );
END LOOP;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
NULL;
WHEN OTHERS
THEN
NULL;
END;Or can I create a VIEW with parameters of Nested Tables in it so I can simply call
SELECT *
BULK COLLECT INTO g_splited_range_arr
FROM view_split_date(g_travel_range,g_bo_arr);@riedelme
For your questions:
1) I don't want to store in the database as a nested table
2) I don't want to retrieve data from the database. Data will come from function split_date() parameter and data will be processed in the function and function will return it in nested table format. For more detail please look at the raw function SQL.
I have a SQL like:
WITH all_dates
AS (SELECT tr_start_date AS a_date, 0 AS black_out_val FROM travel
UNION ALL
SELECT tr_end_date, 0 FROM travel
UNION ALL
SELECT bo_start_date - 1, 1 FROM black_out_dates
UNION ALL
SELECT bo_end_date + 1, -1 FROM black_out_dates),
got_analytics
AS (SELECT a_date AS start_date,
LEAD( a_date ) OVER (ORDER BY a_date, black_out_val)
AS end_date,
SUM( black_out_val ) OVER (ORDER BY a_date, black_out_val)
AS black_out_cnt
FROM all_dates)
SELECT start_date, end_date
FROM got_analytics
WHERE black_out_cnt = 0 AND start_date < end_date
ORDER BY start_date;I want to change the tables black_out_dates and travel to Nested Array so I can use it in a function with Nested Array travel and Nested Array black_out_dates parameters and the function will return Nested Array of date ranges.
Here is what I want in raw SQL:
DECLARE
g_splited_range_arr DATE_RANGE_ARR := DATE_RANGE_ARR( );
g_travel_range DATE_RANGE := DATE_RANGE( '20110101', '99991231' );
g_bo_arr DATE_RANGE_ARR := DATE_RANGE_ARR( DATE_RANGE( '20110312', '20110317' ), DATE_RANGE( '20110315', '20110329' ) );
FUNCTION split_date_sql( pr_travel_date_range DATE_RANGE,
pr_bo_arr DATE_RANGE_ARR )
RETURN DATE_RANGE_ARR
IS
l_splited_range_arr DATE_RANGE_ARR;
BEGIN
SELECT start_date, end_date
INTO l_splited_range_arr(start_date, end_date)
FROM (WITH all_dates
AS (SELECT tr_start_date AS a_date, 0 AS black_out_val FROM TABLE( pr_travel_date_range )
UNION ALL
SELECT tr_end_date, 0 FROM TABLE( pr_travel_date_range )
UNION ALL
SELECT bo_start_date - 1, 1 FROM TABLE( pr_bo_arr )
UNION ALL
SELECT bo_end_date + 1, -1 FROM TABLE( pr_bo_arr )),
got_analytics
AS (SELECT a_date AS start_date,
LEAD( a_date ) OVER (ORDER BY a_date, black_out_val) AS end_date,
SUM( black_out_val ) OVER (ORDER BY a_date, black_out_val) AS black_out_cnt
FROM all_dates)
SELECT start_date, end_date
FROM got_analytics
WHERE black_out_cnt = 0 AND start_date < end_date
ORDER BY start_date);
RETURN l_splited_range_arr;
END;
BEGIN
g_splited_range_arr := split_date_sql(g_travel_range,g_bo_arr);
FOR index_g_splited_range_arr IN g_splited_range_arr .FIRST .. g_splited_range_arr .LAST LOOP
DBMS_OUTPUT.PUT_LINE('g_splited_range_arr[' || index_g_splited_range_arr || ']: ' || g_splited_range_arr(index_g_splited_range_arr).start_date || '-' || g_splited_range_arr(index_g_splited_range_arr).end_date );
END LOOP;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
NULL;
WHEN OTHERS
THEN
NULL;
END;I must change the tables black_out_dates and travel in a way so it will be something like
FROM TABLE( pr_travel_date_range )to get the result into l_splited_range_arr so it will be something like
SELECT start_date, end_date
INTO l_splited_range_arr(start_date, end_date)
FROM (
Maybe you are looking for
-
Hi Community, I installed a new Mac running Snow Leopard and now I have a small document size in quick look. I can change the size by drag and drop the lower right corner but a) the next document is in the same small size and b) when I reopen a docum
-
I have about 30 different address books. Some of them where old but i didn't want to delete them. I no longer wanted them at the top of my list so I went to properties and added "z-" to the folder name to have them at the bottom of the list. Now I ca
-
"Document Domain could not be saved."
Evening folks, I'm working on a website and I'm trying to save and I'm getting an error that says "Document Domain could not be saved." A little background. In mid-may I wiped my drive and re-installed leopard. I reloaded iweb 09 and brought in the d
-
Hi We are developing a Azure WCF service as a webrole which uses Azure AD for authentication. This works fine when using the default BasicHTTPBinding. Client is a windows forms application using Active Directory authentication library with token in t
-
New Macbook Pro bought December 2013. T ransferred everything from Timemachine backup from Macbook Air with 10.6.8. Failed to transfer "network settings". PROBLEM: the two accounts from the Macbook Air cannot log in. It shakes and refuses (the co