Viewing tables in sql plus
hai friends.,
i created a java database pgm using jdbc:odbc connectivity, that creates a table in the database and i inserted some records in that table. how can i view those table and records in the sql plus. what commands are used to view those table
regards.,
sekar
Hi sekar,
Interesting, you're able to do a 'CREATE TABLE bla...' but are not familiar with 'SELECT'? I would suggest to read some basic stuff about SQL statements. What will you do when the next task is: "Hey, I need a pgm to change these values in the table!"?
Regards,
Guido
Similar Messages
-
how can we view xml on sql*plus?
when xmltype is viewed on sql*prompt it shows incomplete xml.
example:
SQL> select xmlelement("ROOT",xmlforest(1 as A, 2 as B, 3 as C)) from dual;
XMLELEMENT("ROOT",XMLFOREST(1ASA,2ASB,3ASC))
<ROOT>
<A>1</A>
<B>2</B>
<C>3</C>
</ROOT>
but i generate an xml from table so it becomes quite huge. say a forest is populated with 6-8 tags. it shows broken output.
SQL> /
ID LIST
<DEPT>
<EMPLOYEE>
<ID>2109</ID>
<ID>3108</ID>
<ID>4107</ID>
<ID>5106</ID>
<ID
i have tried increasing bufferwidth and bufferlength tp max value (1000 and 2000 respectively) eventhen it displays the output as shown above.
how can i view my xml?use this sql plus command:
set long 2000000
You can increase\decrease the value as required. -
DISPLAY UNDEFINE TABLES IN SQL PLUS
i am using Oracle 10g
for last 1 week i seen unrecognized table names in my user while i issue following command
SQL > select * from tab;
table name like ......BIN$ and many other characters after it...
i cannot drop that table also
from DBA studio above table can't view but from SQL PLUS it display as table
what i have to do to drop such tables ? please give adviceThese are recyclebin tables. A normal 'drop table' command puts a table into the recyclebin, you can get it back through 'flashback drop' command. Use 'purge user_recyclebin' to delete the tables finally.
Werner -
Apex 4.0 - Can see view data in SQL*Plus but no data in Object Browser
Hi There,
I have just started using Apex 4.o and migrated some apps. I have an issue with a report, but see the same issue with Object browser, which is easier to describe.
I have a view:
create or replace view V_PLJ_USERDEF_CODES (
CODE_SET_ID,
CODE_SET_CODE,
CODE_SET_DESC,
CODE_ID,
CODE_SYS_CODE,
CODE_VALUE,
CODE_DESC,
DISPLAY_SEQ,
DISPLAY_FLAG,
LANGUAGE_CODE) as
select CS.CODE_SET_ID,
CS.CODE_SET_CODE,
CS.CODE_SET_DESC,
C.CODE_ID,
C.CODE_SYS_CODE,
C.CODE_VALUE,
C.CODE_DESC,
C.DISPLAY_SEQ,
C.DISPLAY_FLAG,
C.LANGUAGE_CODE
from PLJ_CODES C,
PLJ_CODE_SETS CS
where C.CODE_SET_ID = CS.CODE_SET_ID
and CS.CODE_SET_TYPE_CODE = SYS_CONTEXT('PLJUMPSTART','C_USERDEF_CODE_SET');This returns data in SQL*Plus, but no data in Object Browser OR report region based on this view.
Workspace parses in the same schema as tested in SQL*Plus.
If, in report, I swap out view, and use underlying table - no problem.
Any ideas -
thanks
PHi all,
Thanks for getting back so promptly.
It just seems weird to me, as tables are just fine, but not views.
In the underlying schema:
SQL> sho user
USER is "ICSREPORTING"
SQL> select count(*) from plj_codes;
COUNT(*)
107
SQL> select count(*) from v_plj_userdef_codes;
COUNT(*)
29And in the APEX schema
SQL> sho user
USER is "APEX_040000"
SQL> select count(*) from icsreporting.plj_codes;
select count(*) from icsreporting.plj_codes
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> select count(*) from icsreporting.v_plj_userdef_codes;
select count(*) from icsreporting.v_plj_userdef_codes
ERROR at line 1:
ORA-00942: table or view does not exist
SQL>However, in SQL browser, I can see the data in PLJ_CODES but in V_PLJ_USERDEF_CODES, just the message "This view has no data". Indeed, it is like this for all views.
I even explicitly granted access to APEX_040000 but no good.
In fact, I would like to know more about how Apex gets access to do DML against the underlying parsing schema(s).
This is a little frustrating though. It worked just fine in lots of apps in version 2.1 to 3.2
Am I missing something
paul
p.s I knew there would be a question about the context, but I had already checked that. :)
Edited by: PJ on Nov 19, 2010 4:09 AM -
Need to find out View definition by SQL PLUS
Hi,
I have a view VW_XXX, I want to know by which table this view has created. But need to use only SQL PLUS not any tool.
Please let me know how cani see the full definitio of the view by SQL PLUS.
Regs,
brijYes, it will work for both 9i and 10g. Just run the commands, and you will get the output.
These are not "Dangerous Commands!!!"
Regards
Girish Sharma
Edited by: Girish Sharma on Dec 26, 2011 5:19 PM
To solve these issues Oracle9i has introduced the DBMS_METADATA package which can be used to retrieve object definitions as DDL or XML. There are a number of ways to use the API, but I suspect the majority of people will only ever use the following functions.
Source:http://www.oracle-base.com/articles/9i/MetadataAPI.php
Edited by: Girish Sharma on Dec 26, 2011 5:36 PM
And here it is doc link :
http://docs.oracle.com/cd/A91202_01/901_doc/appdev.901/a89852/d_meta11.htm#1024701 -
Crystal view table or SQL view table
In Crystal and SQL there have lot of View tables. What kind of table called View table? What's the difference with tables without view prefix?
I think view tables are few tables linked together for designers to use instead need to link few tables by themselves.
How to create view table and the purpose using view tables?Hi,
A view tables is, in essence, a virtual table. It does not physically exist. Rather, it is created by a query joining one or more tables.
[click here|http://en.wikipedia.org/wiki/View_(database)]
You can search on the web for more samples.
Regards,
Clint
Edited by: Clint T. Pauyon on Jul 13, 2009 7:58 AM -
Populating table using SQL*Plus
Hi,
I am trying to populate my destination table from the source using SQL*Plus. I keep get error message. The source table has 6 columns and the destination table has 11 columns. Data_type are different in both table. The following is my script and the output of the script:
insert into bim_expense_element
(select table_type_id, table_code_desc,
table_value_4, table_value_6,
table_description_1 | | table_description_2
from edim_expense_element)
SQL> /
insert into bim_expense_element
ERROR at line 1:
ORA-00947: not enough values
Please let me know what I did wrong. Thanks.
EstherHi Esther,
You need to tell to Oracle what columns to fill in your insert like this:
insert into bim_expense_element(bim_type_id, bim_code_desc, bim_table_value4, bim_table_value6, bim_description)
select table_type_id, table_code_desc,
table_value_4, table_value_6,
table_description_1 | | table_description_2
from edim_expense_element
If the fields aren't of the same type you'll need to convert.
null -
Please give the query to find out primary key in table in Sql plus
Dear friends,
Please give me the query to find out the primary key in Sql plus.hi
SQL> DESC user_constraints
Name
OWNER
CONSTRAINT_NAME
CONSTRAINT_TYPE
TABLE_NAME
SEARCH_CONDITION
R_OWNER
R_CONSTRAINT_NAME
DELETE_RULE
STATUS
DEFERRABLE
DEFERRED
VALIDATED
GENERATED
BAD
RELY
LAST_CHANGE
INDEX_OWNER
INDEX_NAME
INVALID
VIEW_RELATED
SQL> SELECT constraint_name,table_name,r_constraint_name,status
2 FROM user_constraints WHERE constraint_type='P';
CONSTRAINT_NAME TABLE_NAME R_CONSTRAINT_NAME STATUS
SYS_C003141 CUSTOMERS ENABLED
PK_DEPT DEPT ENABLED
SYS_C003139 SALESREPS ENABLEDKhurram -
Can't view tables in SQL database
Hi,
I'm using DW CS4 to connect to SQL server 2005. I can connect to my database, but when I try to create a recordset, the only tables I can view or select is everything in the System Tables and System Views - not the tables that I actually want to select.
e.g.
dbo.dtproperties
INFORMATION_SCHEMA.CHECK_CONSTRAINTS
INFORMATION_SCHEMA.COLUMN_DOMAIN_USAGE
etc.
I guess this is to do with administering SQL server but even going through SQL server documentation online I can't seem to figure it out. Is it to do with Views and/or schemas in SQL server management studio? Please help!Have you connected to the database using SQL Server Management Studio and looked at the tables and fields to be sure all is in order?
Lawrence *Adobe Community Expert*
www.Cartweaver.com
Complete Shopping Cart Application for
Dreamweaver, available in ASP, PHP and CF -
I cannot see XMLType table in sql*plus
Hi,
Although I have wokred extensively with Oracle, I am new to Oracle XMLdb. My problem is I cannot see the XMLType tables created under my schema. I can see the tables when I do a select from user_xml_tables. But if I do a 'desc' or 'select from', I get ORA-04043 or ORA-00942. I can desc an XMLType table owned by xdb. I am using Oralce 10g. Please provide a solution asap as a customer is waiting on this.
Thanks,
Jayati RayRaghu !!
GREAT!!!
It was a BUG in Oracle sql developer, I installed the new version v3.0, It WORKS like a CHARM.
Thanks a million for your help!!!
Cheers
Tony -
How to insert data which contains '&' from SQL*Plus without asking prompt
Hi,
I want to insert data in table from SQL*Plus but data value contains '&' as given in below example(insert script).
There are 10000 rows. When I load from SQL*Plus it is asking for 'value for :P'.
I dont want to replace '&' with 'and' also there should not be prompt for asking value for :P.
Example
Insert into CS_Tracker (TrackId,FeedBack) values ('ARARGE034678','S&P');
Insert into CS_Tracker (TrackId,FeedBack) values ('ARARGE034676','S&F');
Insert into CS_Tracker (TrackId,FeedBack) values ('ARARGE034677','A&P');
Can anyone help me in above issue.
Thanking in Advance
Sanjeevuse
set define offbeforehand -
Can someone know how to configure login.sql to view data from SQL*Plus just like in standard MySQL output?
as to the one column per line, I would recommend increasing your LINESIZE
set linesize 1000
to get the vertical bar between things
set colsep |
to force a row of underscores between each line
set recsep each
don't think we can do the "+"
and I hope the lack of spaces (positional output) is due to the lack of "[ pre ]" tags in your post
SQL> select * from words where rownum < 10;
WORD A N UPPER_WORD SEQ_NUM SOUN
ARCADIAN ARCADIAN 1 A623
ARCHAEOLOGICAL ARCHAEOLOGICAL 2 A624
ARCHAEOLOGISTS ARCHAEOLOGISTS 3 A624
ARISTOTELIANS ARISTOTELIANS 4 A623
ARITA ARITA 5 A630
ARIZONA ARIZONA 6 A625
ARJUNA ARJUNA 7 A625
ARKANSAS ARKANSAS 8 A625
ARKWRIGHT ARKWRIGHT 9 A626
SQL>
SQL>
SQL> set linesize 1000
SQL> set colsep |
SQL> set recsep each
SQL> /
WORD |A|N|UPPER_WORD | SEQ_NUM|SOUN
----------------------------------------------------------------------|-|-|-----------------------------------|----------|----
ARCADIAN | | |ARCADIAN | 1|A623
ARCHAEOLOGICAL | | |ARCHAEOLOGICAL | 2|A624
ARCHAEOLOGISTS | | |ARCHAEOLOGISTS | 3|A624
ARISTOTELIANS | | |ARISTOTELIANS | 4|A623
ARITA | | |ARITA | 5|A630
ARIZONA | | |ARIZONA | 6|A625
ARJUNA | | |ARJUNA | 7|A625
ARKANSAS | | |ARKANSAS | 8|A625
ARKWRIGHT | | |ARKWRIGHT | 9|A626
------------------------------------------------------------------------------------------------------------------------------------ -
SQL*Plus and chinese characters
Hi all,
I have following scenario:
1. Database 10.1.0.5 with following NLS-Parameter:
SQL> select * from NLS_DATABASE_PARAMETERS;
NLS_LANGUAGE AMERICAN
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET WE8MSWIN1252
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_RDBMS_VERSION 10.1.0.5.0
SQL> select * from NLS_SESSION_PARAMETERS;
NLS_LANGUAGE AMERICAN
NLS_TERRITORY GERMANY
NLS_CURRENCY €
NLS_ISO_CURRENCY GERMANY
NLS_NUMERIC_CHARACTERS ,.
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD.MM.RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH24:MI:SSXFF
NLS_TIMESTAMP_FORMAT DD.MM.RR HH24:MI:SSXFF
NLS_TIME_TZ_FORMAT HH24:MI:SSXFF TZR
NLS_TIMESTAMP_TZ_FORMAT DD.MM.RR HH24:MI:SSXFF TZR
NLS_DUAL_CURRENCY €
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
SQL> select * from V$NLS_PARAMETERS;
NLS_LANGUAGE AMERICAN
NLS_TERRITORY GERMANY
NLS_CURRENCY €
NLS_ISO_CURRENCY GERMANY
NLS_NUMERIC_CHARACTERS ,.
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD.MM.RR
NLS_DATE_LANGUAGE AMERICAN
NLS_CHARACTERSET WE8MSWIN1252
NLS_SORT BINARY
NLS_TIME_FORMAT HH24:MI:SSXFF
NLS_TIMESTAMP_FORMAT DD.MM.RR HH24:MI:SSXFF
NLS_TIME_TZ_FORMAT HH24:MI:SSXFF TZR
NLS_TIMESTAMP_TZ_FORMAT DD.MM.RR HH24:MI:SSXFF TZR
NLS_DUAL_CURRENCY €
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
2. Windows Language is german
I should be possible to insert the chinese characters into the table from the SQL*Plus (sqlplusw.exe) and SQL*Plus should be able to show the chinese characters from that table.
Is there any Step-By-Step Tutorial for the changes, that I should provide?
Can anybody help me?
ThanksI have a table CHINESE with one column STRING
NVARCHAR2(250). There I will store the chinese
character and display the content in SQL*Plus.
Into the table I will insert with SQL*Plus with
INSERT Statement.
To store the character you could use e.g.
insert unistr(<unicode value expression>) into table But Sql*Plus does not support Unicode display. Use SQL Developer instead for displaying your table data.
You could also use select dump(column,1016) from table to verify that character data is correctly converted and stored.
Windows Codepage is 1252.
What do you mean under "what is your corresponding
NLS_LANG client char set setting" ?With acp 1252, your NLS_LANG should contain .WE8MSWIN1252 - this tells Oracle your acp setting.
Note however that windows-1252 does not define any Chinese characters.
http://www.microsoft.com/globaldev/reference/sbcs/1252.mspx
http://www.oracle.com/technology/tech/globalization/htdocs/nls_lang%20faq.htm
You can read more about Unicode string literals in Oracle in chapter 7 Programming with Unicode, Globalization Support guide in 10.2. Also you probably should read about NCHAR literal replacement (available only in 10.2 and above).
http://download.oracle.com/docs/cd/B19306_01/server.102/b14225/toc.htm
Message was edited by:
orafad -
Viewing Binary data in SQL*PLUS
hi all,
when i select a table to view the content, i received an error which i shown below.
SP2-0678: Column or attribute type can not be displayed by SQL*Plus
the error seems that the binary data cannot be view thru SQL PLUS.
do anybody have idea to solve this issue.
thanks in advance
karthik.JProbably you are trying to view BLOB data. Try this to view the data:
SQL> CREATE TABLE t (a BLOB)
2 /
Table created.
SQL> INSERT INTO t
2 VALUES (UTL_RAW.cast_to_raw ('Hello World'))
3 /
1 row created.
SQL> SELECT UTL_RAW.cast_to_varchar2 (a) a
2 FROM t
3 /
A
Hello World -
Cannot see table in sql developer or sql plus
I have created a record in application designer. I have then built the table. I can close the record and then find it again in application designer. But if I go to sql plus or sql developer, I cannot see it. Am I missing a step?
You probably can see all the tables of sysadm because someone else give you proper grant for that on existing sysadm's objects.
For the new or modified object (drop+create) you should :
1. connect as sysadm and run
grant select on new_table_name to your_own_user;2. connect with your own user and run
create synonym new_table_name for sysadm.new_table_name;Then you'll be able to query that table without using schema name alias.
Some admin have also a ddl trigger to make it automatically.
You could also work through a role and public synonym if more than one user needs to access sysadm's objects.
Nicolas.
Maybe you are looking for
-
Sharing Preference Pane no longer works.
Hi, I can no longer open my Sharing pref pane. When I try to open it I have a message telling that pane loading failed. In console.log I have this : 2006-09-03 01:08:00.023 System Preferences[22750] * -[NSBundle load]: Error loading code /System/Libr
-
Editable / Non editable input field CELL (individually) on ALV dynamically
Hi again, I need more help with an issue. I have an ALV table with three columns that is necessary put values into input field cell editors, but these cells should be editable or not depending of business logic. I've got make editable or non in entir
-
To call a bean function to set a property value with hx:ajaxRefreshRequest
I have an input box I need to output some text onto an output box,When the input box value changes I am using Ibm jsf implementation and RSA 7.0,JSF 1.1 implementation I know how to call a bean property's setter method using this hx:refresh submit an
-
How to reset the Terminal Count indicator on the PXI-6608
Dear Community, Is there any way to reset the terminal count indicator on the PXI-6608? When I Use Get Attribute.vi I get the correct value the first time, but unfortunately (unlike DAQmx) reading the value doesn't reset it... I'd like to keep track
-
Hey, there. I'm searching for a FM which checks if a customer is locked by another user or not. I have a FM which makes a batch input of XD02 transaction and I want to know before the BI proccessing if sombodey is editing the customer data at the sam