How can I use SQL/CUBE to figure out total?
How can I use SQL/CUBE to figure out total?Thank you.
-JC
Of course, you can do this by using the cube. But cube will produce all the possible combinations of summary. We can filter the unnecessary summariies having clause using the group_id function which is a binary encoding of the columns that are summarized. Below for example, as applied on the table SH.sales.
Select channel_id, promo_id, prod_id, sum (amount_sold)
from the sale
Group of cube (channel_id, promo_id, prod_id)
having grouping_id (channel_id, promo_id, prod_id) (3, 5, 6, 7)
Tags: Database
Similar Questions
-
How can I use SQL to check if the receipt is taken into account?
Hi all:
How can I use SQL to check if the reception of the AR is taken into account? Because there are so many recipes to check, I can not open to see the details one by one.
My environment is: 11.5.9
database: Oracle 9.2.0.8Terry,
Run the script (11i: Oracle receivables data reception Data Collection Test [215969.1 ID]) and see if it helps.
Thank you
Hussein -
How can I use SQL to check the Version of Oracle Forms and object of the request?
Hi all:
How can I use SQL to check the Version of Oracle Forms and object of the request?
Concerning
TerryTerry,
See the following threads/docs for the version of forms.
How to find the developer version
Re: How to find the developer versionNote: 466890.1 - Script to find the Apache, Java, Jinitiator, version of forms and details of the JVM for Oracle E-Business Suite 11i
Note: 392793.1 - how to get Forms Oracle Oracle Applications 11i Command Line Version
Note: 468311.1 - Script to find the Apache, Java, JRE, Forms for Oracle E-Business Suite R12 versionWhat purpose are you talking?
Thank you
Hussein -
How can I use SQL to get a model in a field?
Hello, Frank, Solomon, ect
I am now faced with this particular scenario, I've got SQL to browse a field to search for text in the field, but I need to know what that is before he can look for her.
What I have to do is the following:
Searching through a field, a model and I do not know what data I'm looking for. Is it possible in SQL?
For example, here is my SQL date, I was helped allocate in order to get to this point.
Select table_name,
column_name,
: search_string search_string.
result
from (select column_name,
table_name,
"ora: view("' ||) " table_name | "") / LINE /' | " column_name | "[ora:contains (text ()," %' |: search_string | ")]. (%») > 0]' str
CLO
where table_name in ("TABLE1", "TABLE2")).
XMLTable (columns str result varchar2 (10) path '.')
When you run the SQL code above, you must pass a value. What I really need, is to modify the SQL code above, to make searching for a model which exist in the text of the field itself.
"" As for example, lets say that the model that I'm looking for is - this "xxxxx-xx-xxxx" and it's somewhere in a field.
I need to change the SQL to this model and searching through all the diagrams and tables to look for this pattern match.
Can we do?
SYS@ORCL > CREATE USER IDENTIFIED BY test test
2.
Created by the user.
SYS@ORCL > test ALTER USER QUOTA UNLIMITED ON USERS
2.
Modified user.
SYS@ORCL > GRANT CREATE SESSION, CREATE the test TABLE
2.
Grant succeeded.
SYS@ORCL > GRANT SELECT ON dba_tab_cols TO test
2.
Grant succeeded.
SYS@ORCL > CONNECT test/test
Connected.
TEST@ORCL > SET LINESIZE 90
TEST@ORCL > find_test CREATE TABLE
2 (find_col VARCHAR2 (60))
3.
Table created.
TEST@ORCL > INSERT ALL
2. IN find_test (find_col) VALUES ('' 111-22-3333)
3. IN find_test (find_col) VALUES (111 = 22-3333')
4. IN find_test (find_col) VALUES ('' 111-A2-3333)
5. IN find_test (find_col) VALUES ('' 111-22-33339)
6. IN find_test (find_col) VALUES ('' 111-2-23333)
7. IN find_test (find_col) VALUES ('77-777-7777 "")
8 SELECT * FROM DUAL
9.
6 rows created.
TEST@ORCL > search_string VAR VARCHAR2 (28)
TEST@ORCL > EXEC: search_string: = ' ^ [0-9]{3}-[0-9]{2}-[0-9]{4}$']
PL/SQL procedure successfully completed.
TEST@ORCL > COLUMN "Keyword" FORMAT A28
TEST@ORCL > COLUMN 'Table' FORMAT A9
TEST@ORCL > COLUMN ' column value / "FORMAT A50
TEST@ORCL > SELECT DISTINCT SUBSTR (: search_string, 1: 28) "keyword."
2 SUBSTR (table_name, 1, 14) "table."
SUBSTR (t.column_value.getstringval (), 1, 50) 3 ' / value of the column.
4 FROM dba_tab_cols,
TABLE 5
6 (XMLSEQUENCE
7 (DBMS_XMLGEN. GETXMLTYPE
8 ("SELECT" | column_name |)
9 ' FROM ' || table_name |
10' WHERE REGEXP_LIKE
11 (' | column_name |) ','''
12 || : search_string. ''')'
(((13) .extract (' LINES/rowset / * ""))) t
14 WHERE table_name IN ("FIND_TEST")
15 ORDER BY "Table".
16.
Table of the help of keyword/value of the column
---------------------------- --------- --------------------------------------------------
FIND_TEST ^[0-9]{3}-[0-9]{2}-[0-9]{4}$
77-777-7777 FIND_TEST ^[0-9]{3}-[0-9]{2}-[0-9]{4}$
111-22-3333 2 selected lines.
-
Hello
How can I use statistics for all the tables in a schema in SQL Developer? and how long will it take on average?
Thank you
Jay.
Select the connection and right-click on it and select schema statistics collection
-
How can I use variable presentation logic SQL
Hi Experts,
How can I use variable SQL logical presentation. I need the exact syntax. Kindly help me to achieve this goal.
"Time". "" Date "between the Date of 2014 '-1-17 'and Date' ' 2014-2-16
Thanks in advance
Asim
It's done... We can use it in the logical query with the same syntax where we use in converting this filter as SQL...
-
How can I use my image under license on my iPad
HHello, I have a license of an image and I try to create with it on my iPad. HOW CAN I USE MY PIC PAID TO CREATE SOMETHING? WHAT APP DO I NEED IF I CAN USE THE IMAGE THAT I PAID FOR. try find answers online created me more questions and no leads at all times no the case. PLEASE HELP SOMEONE. I tried to figure this out for a week
Hello
Please see the below help documents:
Stock FAQ: How can I learn Adobe Stock?
Stock Troubleshooting FAQ: How to solve problems with Stock images?
Hope this helps!
-
How can we use, "Create trigger and replace" using the oracle form
Hi all
How can we use the following creation or replacing the trigger in the form of oracle?
Please help me.
CREATE OR REPLACE TRIGGER app_user.after_logon_trg
AFTER LOGON WE app_user. SCHEMA
BEGIN
DBMS_APPLICATION_INFO.set_module (USER, "Initialized");
EXECUTE IMMEDIATE 'ALTER SESSION SET current_schema = SCHEMA_OWNER';
END;
Sarahuser434854:
Your information is good enough about the use of roles. This is the model of security that our customers use. Only assign us a password for roles and issues of connection of users shape the grant sql role using the password is used since in the form.
However, I agree with Andreas on the hard coding schema owner. We have several clients, and each of them has a different name for the owner of the schema. By creating a public synonym for access to our forms tables, our forms work well at all sites.
And after 325 posts, why don't give you yourself a real name on the forum?
-
How can I use my photo albums as screensaver with Apple TV 4th gen
How can I use a photo album that I created as a screensaver on the generation of Apple TV 4 because it is not an option in this sense?
What follows is the Apple TV 4 user guide...
Screensavers
Apple TV displays a screen saver when it remains inactive for a predefined number of minutes.
Air screensaver shows beautiful videos of slow motion of the places of the world, upload to an online server, making the screen saver more engaging and dynamic. For the antenna, you can control how many times Apple TV check and download new videos.
Change the frequency of aerial screensaver download. In settings, go to general > screen saver and select Download New Videos, and then select an option.
Return by using Apple TV. When the screen saver is active, press the contact surface to get to some app have been previously using.
Choose a different screen saver. In settings, go to general > screen saver and select the Type. Then select the screen saver you want to use.
Select the photos to display. Many of the screen saver options display a slide show of photos - it can include photos provided by Apple, or your own collection stored in iCloud. To choose which photos are used, in the settings, go to general > screen saver and select the Type. Then choose one of the types of screensaver-photographers.
If you choose my Photos, the Photos app opens. Follow the instructions to put photos as screensaver.
Set the screensaver time-out. In settings, go to general > screen saver and select the setting starts after, and then specify a number of minutes. This indicates to the Apple TV to start the screen saver automatically if the unit has been idle for the specified time.
Activate the screen saver immediately. Press the Home button to go to the home screen (if it isn't already), and then press the button twice.
-
How can I use Windows on the Mac desktop?
How can I use Windows on MAC desktop products? OS X El Capitan
You can install it in BootCamp or virtual VMWare, Parallels or VirtualBox machine
-
How can I use my watch to snap the shutter on my iPhone?
How can I use my watch to snap the shutter on my iPhone?
Click here > https://help.apple.com/watch/
Then click on: Remote Camera on the left.
You'll see instructions.
-
How can I use firefox to open the public sybercafe.
How can I use firefox in open public sybercafe.and what precautions should be taken.
Hi, you can use the Firefox private - browsing Mode navigate the web without saving the information on the sites you visit
The incognito on Firefox for Android
-
How can I use my instore credit for a movie
How can I use my instore credit for a movie
Hello R Larson,
I see that you are wanting to use a store credit for a movie. I'll be happy for you have said in the right direction. First of all, let's see if we can find out if the credit is a credit of iTunes gift card or a credit from the Apple Store. This article will help you determine what may be:
What kind of card do I? -Apple Support
If credit is iTunes, you can just check your balance using the instructions found in the section below and use to either rent or buy a movie to display:
See your credit balance - Apple Support iTunes
If the store is an Apple Store Gift card credit, you would not be able to use iTunes to watch a movie.
I hope this helps. See you soon!
-
How can we use this page Windows Genuine?
How can we use this page once the developers of Firefox has removed the option "Enable Java"?
Now, I downloaded this tool to check if the Windows Genuine or not! But kept getting the error message during the installation of the application.
This is not sound/look like a problem of firefox at all, but could be a problem with the integrity of your windows system (perhaps related to malicious software): http://support.microsoft.com/kb/2617842/en-us
-
How can I use my PC speakers to hear my phone iphone 6s calls?
How can I use my PC speakers to hear my phone iPhone 6s calls?
If your 'PC' was a Mac, you can use the continuity. But if your PC is a Windows PC, you're out of luck.
Continuity allows you to connect your iPhone, iPad, iPod touch and Mac - Apple Support
Maybe you are looking for
-
How can I return my "downloading" files, I have accidentally erased and deleted?
I pressed the wrong button, and modify the list of files in the download history, and they were all removed and allowed instead of one entry selected aimed.
-
HP Compaq NC 6400: updated processor
I bought a T7300 CPU. In a previous thread, it has not been mentioned as a possible upgrade. Can someone tell me if this type is possible to use, or is it save to try without destroying my laptop?
-
Update Firmware of Bloggie then dies
Hi, I've updated a Bloggie again with the latest firmware on the Sony site. After successfully, following the instructions and disconnect the USB device, I wanted to check the camera to see if it reflects the new version, so I held the Movie button a
-
Boot Camp Assistant not showing options
I want to uninstall Windows XP or just delete the bootcamp partition, but the page select the Boot Camp Assistant tasks offers only 3 choices of n/a: 1. create a Windows 7 or later install drive 2 download the latest Windows support software 3. insta
-
HP Solution Center Software - Office Jet 6700 (windows 7 and windows 8)
Hello My sister and MOM had bought the Office Jet 6700 711. My sister's computer is running windows 8 64-bit. I installed the complete software driver and hp solution center software is not included. I have search the forum for resolutions and trie