Select all the values of column except the specific columns in all tables
HelloI want to display all the column values for all tables in the database, with the exception of 3 columns that exist in all tables...
Can someone give some advice?
See you soon,.
Jin
How are you going to display all columns of all tables?
Thank you
Baskar.l
Tags: Database
Similar Questions
-
Cannot install Windows on this disk selected disk.the has a MBR partition table.
On EFI systems, windows can be installed only on GPT disks.
When I try to install WS2008R2 in my turn lenovo G580 i5-3210 as a dual-boot option.
Hello Pratap ReddyBh,
As you try to install Windows Server 2008 R2, it would be better for you to ask your question in the TechNet Windows Server forums.
Click on the link here for TechNet.Thank you
Marilyn
-
Retrieve two values of column in a table
Hi I want to retrieve two values of column in a table and store the values as a single column value in another table... How to do with it?Use in this way:
Insert in tab2 (col1) select col1 | col2 from tab1; -
Select cursor for update: multiple columns of different tables
Hello
I have two tables test1 and test2. I want to udpate the column (DEPT_DSCR) from the TEST1 and TEST2 using select for update and current tables of the... with the cursor.
I have a code drafted as follows:
DECLARE
v_mydept1 TEST1. TYPE % DEPT_CD;
v_mydept2 TEST2. TYPE % DEPT_CD;
CURSOR C1 IS SELECT TEST1. DEPT_CD, TEST2. DEPT_CD OF TEST1, TEST2 WHERE TEST1. DEPT_CD = TEST2. DEPT_CD AND TEST1. DEPT_CD IS 'AA' FOR THE UPDATE OF TEST1. DEPT_DSCR, TEST2. DEPT_DSCR;
BEGIN
OPEN C1;
LOOP
FETCH C1 INTO v_mydept1, v_mydept2;
WHEN EXIT C1% NOTFOUND;
UPDATE TEST1 SET DEPT_DSCR IS "PLSQL1" WHERE CURRENT OF C1;.
SETTING A DAY TEST2 SET DEPT_DSCR = 'PLSQL2' WHERE CURRENT OF C1.
END LOOP;
COMMIT;
END;
The code above when it is run, declares that it runs successfully. But it does not update the columns you want [DEPT_DSCR].
It works only when we want to update one or more columns of the same table... i. e by providing these columns after ' to UPDATE THE.
I don't know what exactly is the problem when you want to update several columns of different tables.
Can someone help me on this?user12944938 wrote:
But it's more the notion of compensation and understanding.See the link below:
http://download.Oracle.com/docs/CD/B10501_01/AppDev.920/a97269/pc_06sql.htmSee the section RESTRICTION in the link above.
Twinkle
-
Select all tables with specified trigger
Hello
I have a newbie question :)
How can I get all tables with a specified trigger?
Thank you
Ioana.ru looking for...
Select * from user_triggers where trigger_name = upper ('blahblahblah')Ravi Kumar
-
using a Case statement to display the values of column even as table headers
I have a database that has been set up kind of tricky, in that some tables are made up of columns that are field names and one link to another table that contain the data for these field... also names there ID displays as many lines instead of as a row of data. I would like to write a query to extract that information and display it as one line for each ID.
example: table 1
ID, name, itemresponse and itemcode, Description
Dee Jones Childrens Hospital 123 SITE location
123 dee Jones, Date of appointment next NEXTAPPT 22/04/2014
123 dee Jones was on bedrest NOSHOW reason do not show
I would like to have the display of data as a record on this same patient, instead of as 3 separate registers (with the Description column in table 1
Table 2
ID, name, place, Date of the next meeting, show no reason
123 dee Jones Childrens Hospital 22/04/2014 was the bed rest
I have included the code I worked on below my question, for me to get the desired results should I use the Case statement and it's the right way to do it below?
(SELECT
PAT.ID "PATIENT ID."
PAT. FIRST | » '|| PAT. "PATIENT FIRST NAME."
PAT. "PATIENT DOB," DATE_OF_BIRTH
DS. Date 'Date of inpatients ',.
Dai. ITEM_CODE "Item Code",
Dai. DESCRIPTION "Description."
Siad. ITEM_RESPONSE,Max (CASE WHEN dai. ITEM_CODE IS "SITE" THEN DAI. Decription
ANOTHER NULL
END) AS "name of the hospital."
Max (CASE WHEN DAI.) ITEM_CODE IS 'NEXTAPPT' THEN DAI. ITEM_Description
ANOTHER NULL
END) AS 'next Appt Date. "
Max (CASE WHEN DAI.) ITEM_CODE IS "LASTDATE" THEN DAI. Description
ANOTHER NULL
END) AS 'last visit Date.
Max (CASE WHEN DAI.) ITEM_CODE IS 'NOSHOW' THEN DAI. Description
ANOTHER NULL
END) THAT "the reason has not shown".
Of
(PAT.ID "IDENTIFYING PATIENT",
PAT. FIRST | » '|| PAT. "PATIENT FIRST NAME."
PAT. "PATIENT DOB," DATE_OF_BIRTH
DS. Date 'Date of inpatients ',.
Dai. ITEM_CODE "Item Code",
Dai. DESCRIPTION "Description."
Siad. ITEM_RESPONSEOf
dm_sessions Ds,
dm_session_assessments dsa,
DAS dm_admin_sections,
dm_session_assessment_items Siad,
Dai dm_admin_items,
Po Patient_Orders,
Inventory inv,
Patients_Table PAT
dm_admin_categories CAD
where dsa.session_Id = ds.session_Id
and PAT.ID = ds. Patient_ID
and dsa.excluded_assessment =' no
and dac.category_code = 'OPEN'and dsa.section_id = das.section_id
and das.category_id = dac.category_id
and das.section_code = 'northwest'
and dai.section_id = das.section_id
and dsai.item_id = dai.item_id
and dsai.session_assessment_Id = dsa.session_assessment_Id
and dsai.excluded =' no
- and Dai.ITEM_ID = Dsai.ITEM_ID
and Dai.ITEM_CODE IN ('SITE', 'NEXTAPPT', 'LASTDATE', 'NOSHOW')
and po.patient_ID = ds.patient_ID
and in. NDC_NO = inv. NDC_NO
and inv. TDRUG_ABBREV = in. DRUG_ABBREV
PAT.ID GROUP, PAT. FIRST | » '|| PAT. LAST, PAT. DATE_OF_BIRTH, ds. Date, dai. ITEM_CODE, dai. DESCRIPTION, Siad. ITEM_RESPONSE))Hello
DATE is not a very good name for a column. Use something like EVENT_DATE, that will not be confused with a keyword from Oracle, instead.
I don't see something like this column in the CREATE TABLE statement. He will always be the same value on all lines?
Here's a way to get the results you requested:
SELECT id
first name | ' ' || LastName AS name
Date of birth
MAX (CASE WHEN item_code = "NEXTAPPT", THEN item_response END) AS next_appointment,
MAX (CASE WHEN item_code = "LASTDATE" THEN item_response END) AS last_visit_date,
MAX (CASE WHEN item_code = "SITE" THEN item_response END) AS location
FROM mytable1
GROUP BY id, firstname, lastname, dob
;
Of course, I can't test it very well until you post INSERT statements for the sample data.
I guess that 2 or more lines of the entry have the same id, then they will necessarily be first name last name, the name and date of birth, too. No doubt they are standardized in your actual tables.
-
Hello
Please let me know how to query the table and get the records that are less than the other column.
ID item_id item_type
3 1 r1
2 4 r2
1 5 r3
6 5 r4
I need to get all the lines in which item_id < id
o/p
ID item_id item_type
3 1 r1
6 5 r4
SELECT ID, ITEM_ID, ITEM_TYPE
Of
WHERE ITEM_ID<>
-
the selection of the PL/SQL nested block table error...
SQL > create type string_table is the table of the varchar (100);
2.
Type of creation.
declare
v_names string_table: = string_table();
Start
v_names. EXTEND (3);
v_names (1): = "Name1"
v_names (2): = "Name2";
v_names (3): = 'name3 ';
dbms_output.put_line (v_names (1));
dbms_output.put_line (v_names (2));
dbms_output.put_line (v_names (3));
dbms_output.put_line (v_names. COUNT());
Select * from table (v_names);
end;
/
Select * from table (v_names);
*
ERROR on line 12:
ORA-06550: line 12, column 7:
PLS-00428: an INTO clause in this SELECT statementSelect * from table (v_names);
I guess, here you have tried to put the contents of the NT NT one another, or simply trying to print it.
But I don't think that INTO Clause is mandatory here.Please check your modified code (w/o INTO) and the output:
DECLARE TYPE string_table IS TABLE OF VARCHAR (100); v_names string_table := string_table (); v_test string_table := string_table (); BEGIN v_names.EXTEND (3); v_names (1) := 'name1'; v_names (2) := 'name2'; v_names (3) := 'name3'; DBMS_OUTPUT.put_line ('Old collection - '||v_names (1)); DBMS_OUTPUT.put_line ('Old collection - '||v_names (2)); DBMS_OUTPUT.put_line ('Old collection - '||v_names (3)); DBMS_OUTPUT.put_line ('Old collection - '||v_names.COUNT ()); DBMS_OUTPUT.put_line (CHR(10)); /* SELECT * FROM TABLE (v_names); */ v_test := v_names; DBMS_OUTPUT.put_line ('New collection -- '||v_test (1)); DBMS_OUTPUT.put_line ('New collection -- '||v_test (2)); DBMS_OUTPUT.put_line ('New collection -- '||v_test (3)); DBMS_OUTPUT.put_line ('New collection -- '||v_test.COUNT ()); DBMS_OUTPUT.put_line (CHR(10)); /* Printing using FOR LOOP */ FOR i IN v_test.FIRST..v_test.LAST LOOP DBMS_OUTPUT.put_line ('In FOR Loop --- '||v_test (i)); END LOOP; EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.put_line ('Error ' ||SQLERRM|| DBMS_UTILITY.format_error_backtrace); END;
gives o/p:
Old collection - name1 Old collection - name2 Old collection - name3 Old collection - 3 New collection -- name1 New collection -- name2 New collection -- name3 New collection -- 3 In FOR Loop --- name1 In FOR Loop --- name2 In FOR Loop --- name3
See this link - http://docs.oracle.com/cd/E11882_01/appdev.112/e17126/tuning.htm#CIHGGBGF
Published by: Vanessa B on 26 December 2012 14:29
-modified codePublished by: Vanessa B on 26 December 2012 14:45
LOOP FOR-updated - added 'again' code -
Check which table has no column with the specific name number of tables
Hello
Inside my diagram I have 66 tables, each column last_update_date. Although all do not have the program_update_date column. The problem is that I want to go through all the tables and tables that don't have the program_update_date column. It should be noted that if the table does not have the column 2 program_update_date query will be used instead of the query 1.
Query1:
----------
Select last_extract_date,
TO_CHAR (min (largest (nvl (*last_update_date*, January 1, 10 '), nvl (*program_update_date*, January 1, 10 '))), "DD-MON-YY HH24:MI:SS") mi.
TO_CHAR (max (greatest (nvl (*last_update_date*, January 1, 10 '), nvl (*program_update_date*, January 1, 10 '))), "DD-MON-YY HH24:MI:SS") my
of table_names
Last_extract_date group
last_extract_date desc order;
query2:
----------
Select last_extract_date,
TO_CHAR (min (NVL(last_update_date,'01-Jan-10')), "DD-MON-YY HH24:MI:SS") mi.
TO_CHAR (Max (NVL(last_update_date,'01-Jan-10')), "DD-MON-YY HH24:MI:SS") my
of mispa_events
Last_extract_date group
last_extract_date desc order;
Please find the PLSQL code that must be used:
Declare
Cursor C_1 is
Single select table_name from user_tables; table_names varchar2 (240); BEGIN C_1 open; Loop Fetch C_1 in table_names; WHEN THE EXIT C_1% NOTFOUND;
EXECUTE IMMEDIATE ('select last_extract_date)
TO_CHAR (min (largest (nvl (last_update_date, "1 January 10"), nvl (program_update_date, "1 January 10"))), "MON-DD-YY HH24:MI:SS") mi.
TO_CHAR (max (greatest (nvl (last_update_date, "1 January 10"), nvl (program_update_date, "1 January 10"))), "MON-DD-YY HH24:MI:SS") my
of ' | table_names | »
Last_extract_date group
order of last_extract_date desc');
End loop;
Close C_1;
COMMIT;
End;
Help, please.
Thanks in advance.
Published by: P.Sam on June 14, 2010 17:00Try this
SELECT table_name FROM (SELECT table_name, SUM (CASE WHEN column_name = 'PROGRAM_UPDATE_DATE' THEN 1 ELSE 0 END) cnt FROM user_tab_columns GROUP BY table_name) WHERE cnt > 0
This will give you all the tables that has no ' PROGRAM_UPDATE_DATE in a column
-
Hello
I have a table (on a custom page) which includes the columns MessageStyledText and MessageCheckBox column, I want to put the MessageCheckBox to read-only if the value of the column MessageStyledText of the line is "XYZ", could someone give me some advice on how this can be achieved?
Oracle EBS: 12.1.3
JDEV: 10.1.3.3.0.3
Kind regards
CarlSorting using SPEL (according to https://forums.oracle.com/message/1815932#1815932).
-
Make a visible selection during the withdrawal in a drop-down list
I am putting together a form where I have a drop-down list that contains 3 choices. When one of these choices is selected in the drop-down list, a table becomes visible to the user to fill out.
The question I have is when the user selects in the drop-down menu, the table is not visible unless the user clicks in the fall down once again.
I tried an event ' click and exit "and came with the same question.
Here is the code I use. I would appreciate help with this.
Chomp
if (this.rawValue == '5') { }
term_select. Presence = 'visible';
}
if (this.rawValue ! = '5') { }
term_select. Presence = 'hidden';
}
if (this.rawValue == '6') { }
temp_select. Presence = 'visible';
}
if (this.rawValue ! = '6') { }
temp_select. Presence = 'hidden';
}
if (this.rawValue == '7') { }
act_select. Presence = 'visible';
}
if (this.rawValue ! = '7') { }
act_select. Presence = 'hidden';
}
You must use xfa.event.newText to get the selected value.
The change event:
var newValue = this.boundItem(xfa.event.newText); if (newValue == "5") { term_select.presence = "visible"; } //etc.
-
Adding a single column to multiple tables
I have to add a column to 664 tables.
I can copy the column of the table, in that it was originally created.
Is it possible to paste the column in all the remaining tables?
It doesn' t work by selecting all tables in the design ('Ctrl + ", do a right click 'paste').
He works if I click on each individual table ('Ctrl', left click) but I don't want to have to click on each 664 tables.
Thank you
NICWatch demo in the: [use a Transformation Script | http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldevdm/r30/dm30desrule/dm30desrule.htm#t4]
so easy :).
I think, model table is the solution for you :D -
Select the records from the first n distinct values of column
I need to write a query in plsql to select records for the first 3 values distinct from a single column (example below, ID) and all lines for the next 3 distinct values of column and so on until the end of the number of distinct values in a column.
for example:
Age of name ID
1 abc 10
1 def 20
2 IA 10
2 20 JKL
2 mno 60
3 10 pqr
4 the RST 10
4 10 TÜV
5 vwx 10
6 10 XYZ
hij 6 10
7 lmn 10
.
.
.
so now... (up to a few County)
Result must be
1 the application should result->
Age of name ID
1 abc 10
1 def 20
2 IA 10
2 20 JKL
2 mno 60
3 10 pqr
Query 2 should lead to->
4 the RST 10
4 10 TÜV
5 vwx 10
6 10 XYZ
hij 6 10
Query 3 should lead to->
7 lmn 10
.
.
9... ..
so now...
How to write a query for this inside a loop.Hello
Thus, a panel will consist of the lowest id value, the 2nd lowest and the 3rd lower, reggardless of how many lines is involved. The next group will include the 4th lowest id, the 5th lowest and the 6th lowest. To do that, you must assign the numbers 1, 2, 3, 4, 5, 6,... for the rows in order by id, with all lines with the same id, getting the same number and without jumping all the numbers.
This sounds like a job for the analytical DENSE_RANK function:WITH got_grp_id AS ( SELECT id, name, age , CEIL ( DENSE_RANK () OVER (ORDER BY id) / 3 ) AS grp_id FROM table_x ) SELECT id, name, age FROM got_grp_id WHERE id = 1 -- or whatever number you want ;
If you would care to post CREATE TABLE and INSERT statements for your sample data, then I could test it.
See the FAQ forum {message identifier: = 9360002} -
How to create a value to select all the dashboard command prompt values
Dear Sir/Madam,
OBIEE version is 10g.
I create a dashboard promt to act as a filter option. It includes all the values in the target column. I wonder how to add value to this prompt to select all of the values in this column?
For example:
Table has a column 'product '. Total of 3 values in this column: "product produced b","", "product c '. When I create a dashboard command prompt to include all the choice of 'product '.
Show sql result: I press "select A product".
Ok. This message now includes "product produced b","", "product c ' fall down meun. But the problem also. If the user wants to choose all the values in this column? How he/she can do that? I would also add a value 'All products' to include ' product produced b "," "," product c "drop menu drop-down. If the user choose this option. Displays all the results of the product?
Thank you.June wrote:
I'm sorry that I have no idea about this idea.
Do you mean the dash prompt has a functional to the list of the values of all options as check boxes? Please would you give me a simple example if you are convenient?
Thanks anyway.When you create the dashboard, as David T say, simply leave the values at all rather than send the SQL query. This will give you the list of all values for the prompt. When the user wants to run the report with all values, it will need check all the boxes in the list, to get the report with all products.
Kind regards
-Laurence. -
Single request for the display of all, but the values of 1 column for all tables
Hello
All tables have the column SYS_CREATION_DATE.
But I don't want to not display the value of this column
Can anyone suggest a way in which I could achieve this?
Oracle version: 11 GR 1 material
OS: SunOS
See you soon,.
Malika
Published by: user9131570 on July 6, 2010 19:57user9131570 wrote:
@TubbyI * table-wise display the values of all but 1 columns (SYS_CREATION_DATE) in my database.*
I need it to compare to another data base for all these values.
I would like to make a wild guess at what you are getting.
In view of these two tables
create table emp (empid number, empname varchar2(15), empaddr varchar2(15), sys_creation_date date); -- create table dept (deptid number, deptmgr varchar2(10), sys_creation_date date);
you want to combine somehow
select empid, empname, empaddr from emp;
with
select deptid, deptmgr from dept;
in a single sql statement?
Maybe you are looking for
-
Cannot access the Word file that is saved to the location of the temporary file.
Original title: can see a downloaded Word attachment file in the temporary internet files by mistake, but can not access When I open IE5 content in the temporary internet files in windows XP Explorer I can't see the contents of its subfolders. I'm
-
Please tell me how to move contacts from Hotmail and MSN for an ipad lists
-
OfficeJet 6700 cannot find the printer on the wireless network
Printer is connected to my wireless network. Print diagnostic shows PASS for everything and I have ip (DHCP 192.168.2.19) The printer is able to connect to the internet to download updates and pull content for apps (colouring etc...) I disabled my fi
-
How to secure the network after reset of the router WRT54G2
Hello I could reset the WRT54G2 router with no problems, I have the IP address as 192.68.2.1 right now, but when I try to record things in the wireless security mode to make my secure system loses connectivity, fall of red zone. Then I can not connec
-
Last backup completed in September - how can I save now please