How to make aliases of multiple columns?
Hello gurus of Pl/SQL.I have a sql query as follows-
SELECT A as AA, B as BB, C, CC, D like DD, E, EE, F for FF
Of
TABLE A
TABLE B
TABLE C
WHERE THE...
......
Now, I want to give some Alias say AAA to already a column alias, AA, BB and BBB to CC DD and EE and FF want CCC print values only at the level of AA, BB, CC, DD etc...
so now, it will be two layer hierarchy AAA, BBB, CCC and FF under this AA, BB, CC, DD, EE, and, respectively, where the top layer (AAA, BBB, CCC is a representation) and AA, BB, CC, DD etc will have the actual values.
Something like -
AAA || BBB || CCC
AA BB CC DD EE FF
How can I do?
Kindly help me
so this means that I can't do this using the SQL query?
This isn't that SQL can't do it. Its just SQL should not do.
SQL SELECT statement only objective is to extract data to the client as a table. And how the relational model defines a table. A table (relationship) has the set of tuples (rows) that have the same attributes (columns). Model relational does not define any subset of column.
Tags: Database
Similar Questions
-
How to make reference to a column name in the domain constraint
When specify us a constraint check (for SQL Server) in a field, we need to enter an expression in the syntax, for example
Len (Phone) > 7
Later, the Modeler will exactly this expression in the SQL code. But it would be wrong as a constraint to refer to a column name in the table (which would not be 'phone').
So, how to make the data name Modeler to a real column in the constraint domain?Hello
Use the % COLUMN as a placeholder column name - len (%COLUMN%) > 7
Philippe
-
How to make reference to a column name in the form report
Hello
How can I make reference to a column name in the form report. My problem is that "I have a form report that I have the column name when using click on the column name, it must get to the next page with the corresponding values of the column".
Here, I realized that when I click on the name of the column (in page 1) it brings me to the next page (page 2). but in the next page (P2) I want to display (display only) the corresponding values of the column (page 1) selected, but the values are not editable and shouldn't be in the text box must be in display area.
So, how can I write a SQL to display single source field. That is to say, how can I consult report form (page 1) in name column.Hello
If you use the link in the column when you click on the need of the column value, you need to navigate to the next page and all the data accordingly select value here.
Modify the report form and see the top of the page and click on report attribute.
So now you have the attributes of the columns is to say what are the columns are available in the reports form.
Click on change column what you need Ie the column when you click on its passage to the next page this column, for example, as mentioned in the previous post "Empname".
Check the link column and give perspective of values according to your need and click on apply chages.
Thank you & best regards
Srikkanth.M -
How to make a non-editable column
Hye,
I want to create a table with 2 columns:
the first column should not be editable, where the 2nd is,
I found how I can dim the entire table, but not so as to reduce intensity of a column.
How can I do so?
Thanks in advance,
AJ.
SetTableColumnAttribute (panel_handle, control_id, column_index, ATTR_CELL_DIMMED, 1);
-
How to make FUNCTION returns several columns and several outputs line
Hi all
Kindly share your idea; Thanks in advance;
I have the demo of the Table.
DEMO table:
name identity
1 to 10
1-a11
1-a12
2-b10
2-b11
3 ccc
and the function is like:
create or replace function (number of p1) return varchar2 as
number of vid;
VNAME varchar2 (20);
Start
SELECT id, name in vid, vname from demo where id = p1;
return v1;
end;
/
This function returns the output for the id = 3;
BUT,
I need output like (input 1)
VNAME vid
1 to 10
1-a11
1-a12A function returns a single data type.
This type of data can be a type of atomic data (varchar2, number etc.) or it may be a type of data object to save, or even a type of collection data.
Where will you use this feature? In PL/SQL or SQL?
If you are wanting to use it in SQL, need you a pipeline for example function
SQL> CREATE OR REPLACE TYPE myemp AS OBJECT 2 ( empno number, 3 ename varchar2(10), 4 job varchar2(10), 5 mgr number, 6 hiredate date, 7 sal number, 8 comm number, 9 deptno number 10 ) 11 / Type created. SQL> CREATE OR REPLACE TYPE myrectable AS TABLE OF myemp 2 / Type created. SQL> CREATE OR REPLACE FUNCTION pipedata(p_min_row number, p_max_row number) RETURN myrectable PIPELINED IS 2 v_obj myemp := myemp(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); 3 BEGIN 4 FOR e IN (select * 5 from ( 6 select e.* 7 ,rownum rn 8 from (select * from emp order by empno) e 9 ) 10 where rn between p_min_row and p_max_row) 11 LOOP 12 v_obj.empno := e.empno; 13 v_obj.ename := e.ename; 14 v_obj.job := e.job; 15 v_obj.mgr := e.mgr; 16 v_obj.hiredate := e.hiredate; 17 v_obj.sal := e.sal; 18 v_obj.comm := e.comm; 19 v_obj.deptno := e.deptno; 20 PIPE ROW (v_obj); 21 END LOOP; 22 RETURN; 23 END; 24 / Function created. SQL> select * from table(pipedata(1,5)); EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ---------- ---------- ---------- ---------- -------------------- ---------- ---------- ---------- 7369 SMITH CLERK 7902 17-DEC-1980 00:00:00 800 20 7499 ALLEN SALESMAN 7698 20-FEB-1981 00:00:00 1600 300 30 7521 WARD SALESMAN 7698 22-FEB-1981 00:00:00 1250 500 30 7566 JONES MANAGER 7839 02-APR-1981 00:00:00 2975 20 7654 MARTIN SALESMAN 7698 28-SEP-1981 00:00:00 1250 1400 30 SQL> select * from table(pipedata(6,10)); EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ---------- ---------- ---------- ---------- -------------------- ---------- ---------- ---------- 7698 BLAKE MANAGER 7839 01-MAY-1981 00:00:00 2850 30 7782 CLARK MANAGER 7839 09-JUN-1981 00:00:00 2450 10 7788 SCOTT ANALYST 7566 19-APR-1987 00:00:00 3000 20 7839 KING PRESIDENT 17-NOV-1981 00:00:00 5000 10 7844 TURNER SALESMAN 7698 08-SEP-1981 00:00:00 1500 0 30 SQL> select * from table(pipedata(11,15)); EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ---------- ---------- ---------- ---------- -------------------- ---------- ---------- ---------- 7876 ADAMS CLERK 7788 23-MAY-1987 00:00:00 1100 20 7900 JAMES CLERK 7698 03-DEC-1981 00:00:00 950 30 7902 FORD ANALYST 7566 03-DEC-1981 00:00:00 3000 20 7934 MILLER CLERK 7782 23-JAN-1982 00:00:00 1300 10 SQL>
If you use it in PL/SQL and then just filling a data type of collection and return that will make. Although you should question why you want to pass large amounts of data around like that first.
Explain your purpose and what you intend to do and we can recommend the best way.
{message: id = 9360002}
-
How to make the lines dynimac columns in Oracle PL/SQL?
I have this request:
The result of this query is the following:select cso.branch, decode(NVL(cso.YES,0)+ NVL(cso.NO,0)+ NVL(cso.NA,0),0,'N','Y') ||' - '|| NVL(cso.officer,0) AS CSO_YN from ( SELECT A.BRAN_CODE_PK as branch, a.emp_code_pk as officer, COUNT(CASE WHEN D.STATUS = 1 THEN D.STATUS ELSE NULL END) YES, COUNT(CASE WHEN D.STATUS = 2 THEN D.STATUS ELSE NULL END) NO, COUNT(CASE WHEN D.STATUS = 3 THEN D.STATUS ELSE NULL END) NA FROM sales_team_accounts A, users U LEFT OUTER JOIN daily_check_lists D ON (D.USER_ID_PK = U.EMP_OFFICER_CODE and to_date(D.CHECK_LIST_DATE, 'DD-MON-YYYY') = '08-JUL-2010' ) -- date should be the parameter date) WHERE 1=1 AND A.EMP_OFFICER_CODE = U.EMP_OFFICER_CODE AND A.sale_type_fk = 101 -- CSO AND A.SUPV_EMP_CODE_FK != 0 and a.BRAN_CODE_PK = 1001 group by A.BRAN_CODE_PK, a.emp_code_pk ) cso;
The scenario is, there could be maximum 7 officers in a branch,BRANCH CSO_YN -------------------------------------- 1001 Y - 321 1001 N - 335 1001 Y - 90050 1001 N - 303
the total number of columns must therefore 7, and employee Y or N must be shaped in these 7 columns.
So for each branch, it will always be 1 row to have 7 columns:
So I want that it resembles the following:
Need to do using only the PL/SQL queryBRANCH CSO1 CSO2 CSO3 CSO4 CSO5 CSO6 CSO7 ----------------------------------------------------------------------------------------------------------- 1001 Y - 321 N - 335 Y - 90050 N - 303
Published by: imation3m on October 22, 2010 12:21http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:766825833740
http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:15151874723724
http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:7644594042547 -
How to make the Web Gallery with 3 columns of thumbnails?
Hi all
I used the gallery photo web to build a few sites, but always with thumbnails in a single, vertical, column within a framework that scrolls. and I have never mch liked this scroll bar.
I came across this page:
http://www.mariannekolb.com/recent.html
that, as I look at the code, cannot even make use of web photo gallery, but is very similar.
in any case, someone in this group has an idea how this miniature of multiple column (without scroll bar) is completed?
Thank you
the person that I'm building the site hate scrolling.
In this case, choose a skin different (several to choose) and / or modify the CSS code to meet your needs. jAlbum forums can help you.
Nancy O.
ALT-Web Design & Publishing
Web | Graphics | Print | Media specialists
http://ALT-Web.com/
http://Twitter.com/ALTWEB -
Original title: Messages a suddenly begin to appear new downstairs; How can I make them appear at the top? In addition, the columns for messages sent and deleted no long appears. How to make a comeback?
It's the Windows Mail 06 comes with Vista.
Hello
Step 1:
Follow these steps and check if that helps.
(a) open Windows Mail.
(b) click on view
(c) select sort by , click on to.
Do you view recent messages on top.
Step 2:
(a) in Windows Mail.
(b) click on view
(c) select Layout.
(d) under the basic click toolbar. (To display the toolbar if it disappears).
(e) click on customize the toolbar and add Send/recv current toolbar features.
See also:
http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-problems-with-Windows-Mail
Hope this helps,
-
How to make the color of the sky, exactly the same thing in multiple images?
How to make the color of the sky, exactly the same thing in multiple images?
Bengt Nyman wrote:
I'm not trying to replace the sky. I want to talk to a group of photos BIF where the percentages of red, green and blue in the sky varies from a few percent, but enough to disrupt continuity within the group. I like t would be able to use the percentages of color to one of the pictures and replicated in others.
Because the brightness of the sky probably varies from image to image using percentages RGB will not work. What you can use are the values of a and b the laboratory values . Right-click in the inside of the develop module histogram and tick 'Show Lab Color values.' You can ignore the value of L, which is the value of Luminance or brightness. Adjust the blue sky s a b valueusing the Temp WB and sliders dyed until they are the same as your first reference image file. The value determines the color red/green balance if you use the Tint slider to correct the value. The b value determines the color yellow/blue balance if you use the slider Temp to correct its value.
Remember that setting the base Panel WB with 'fixed' values of b for photos taken under lighting conditions different sky will be the color of the other objects in the image look incorrect (birds, trees, buildings, etc.). In this case, you will need to use the brush setting to paint in the region of the sky and then use its temperature sliders and tinted to change just the color of the sky.
To be honest I don't know why you feel it's necessary. Maybe you can post two screenshots: 1) with the sky that they way you want to and 2) an image that you want to resolve to match.
-
How to make a percentage of the value of a column and then insert this value in a column
The table below should be the result I want to achieve. This means according to what value is in Column1 which corresponds to the percentage and what value is in Column2. Column1 will make a percentage of Column2. Like 80% of 1000 = 800, what will change in Column2 of 2nd record.
Currently my code only select the current record and insert another copy that will duplicate the same record. But now I need to calculate and replace the values in column 2 according to the perentage. I did not have my code select here because I'm afraid of you all will get confused. I only put my code insert here, pls tell me how to make the formula in the code for the percentage of Column2 thanks.
Orginal 1st record-> column1 column2
80 1000
Inserted copy records which is 2nd record(what I want to achieved) column1 column2
80 800My codes
INSERT INTO table1 (column1, column2) VALUES (tran.column1, tran.column2);
Did it using this, thanks.
INSERT INTO table1 (column1, column2) VALUES (tran.column1, tran.column2 * tran.column1 / 100 );
-
How to make two of my red columns please
I would like to know how to make my column savings on my red page please so it stands out.
www.bristolequestrianservices.co.uk/TestPage.html
Thanks for expectations.
karenserjy1 wrote:
Red text
{TD:nth-Child(3)}
color: Red;
}
-
How can I create sequential shooting (1 for each 'row') numbers in a script in multiple column?
Sorry, but for now there no such function to put sequential numbers in the column number drawn.
-
How do you count multiple columns of a field in a table
How do you count multiple columns of a field in a table
Select count (*)
of user_tab_columns
where table_name = 'YOUR_TABLE '.
-
How to make a non editable report column in a master form / details
Hi all
I created a form master / detail. The detail columns are created in the form of report columns instead of creating as components. I need to make a non-editable column. Please let me know how to achieve this.
Thanks in advance.
simple just go and change the attribute of report and make the field display type as > "Standard report column.
-
How to make a percables column.
Hello
How to make a percables column even if this isn't a dimension hierarchy level.
Thank you
ShilIt is not possible to use the descent without hierarchies Dim touch drill. But you can navigate from one report to another using the "Navigation" of interaction of values feature in 10g (action link in 11g)
taking column is requested in the reports in detail, but he will see the result in a separate window, not as if the results are shown in the same window with hierarchies dim drill feature.you can set up bread crumbs to return to the previous page to see the high level.
Maybe you are looking for
-
Immediately after that I downloaded the updates of security of firefox that my computer cannot access the internet. I still have a connection without wire fine but Firefox, Internet Explorer, Itunes and other programs no longer have internet access,
-
Satellite P300D - 21 K - no MESSAGE or start
I'm trying to fix a Satellite P300D-21 K, who got to the tea in. I cleaned up with IPA, but go to the post OFFICE not tea or not begins to start. Many of the lights will light and the optical drive and the fans turn up.The screen or on an external mo
-
UPDATE CODE 80072EFE/80072F78 ERROR MESSAGE
SOMEONE ME SAY WHAT THEY MEAN? AND HOW TO FIX? SPIN WIN7/64 BIT
-
Y430: Not sure that turn off hard disks is no...
I have a Vista-based Y430. I am now on feeding management of Lenovo on Vista (thanks to this forum) but I'm not 100% sure what the selection of "turn hard drives off" does, well, obviously it turns off hard disks but which live the user when this hap
-
Matter of drivers HP Pavilion a6230.gr
Hello. I have the HP Pavilion a6230.gr for over a year now and I want to buy a new WD 670 GB internal HDD. Well, I also have my original Windows XP Professional boot drive of my old pc, and I want to install them in the internal drive of tnew without