determination of the data type of an existing column in a table
HelloI did some googling on this, and I know I've done it before, but I can't find / remember how to determine the data type of a column in an existing table... I have tried select dump (column_name) table, but it didn't work.
any suggestions?
Thanks in advance
data type field in
select * from user_tab_cols where table_name= and column_name=
Ravi Kumar
Tags: Database
Similar Questions
-
Dynamically find the Integer and the Data Type of a Decimal column
Table: test (INTE number, DECISION number (7.2)) of the
Try to dynamically determine the type of column.
Use select user_tab_columns data_type. It returns only the NUMBER that does not indicate whether the column is an integer or a decimal data type.
Is there a way to dynamically determine whether a column is around or type decimal?
Thank youcreate table test (INTE, DECI number number (7.2));
Select column_name, data_type, data_precision from dba_tab_columns where table_name = 'TEST '.
COLUMN_NAME DATA_TYPE DATA_PRECISION
------------------------------ ---------------------------------------------------------------------------------------------------------- --------------
NUMBER OF INTE
DECI, NUMBER 7 -
Change the data type of number (1) to number (3)
Y at - it a command to change the data type for an existing column? I just need to go long number 1 to 3... or I have to delete column and then use Edit to add the new field?
Thank you
MarkHello
alter table
modify NUMBER(3); Kind regards
-
How to determine if a data type is used in the comic book?
Background:
I am currently planning to install GoldenGate proof of Concept and have questions about the data types supported by the capture mode (pg 1-5, 1-6 in the installation guide). Is not in itself a matter of GoldenGate.
Our source and target databases are 11.2.0.2
The GG server will be 11.2.0.3
I'm new to the environment and want to confirm that we needn't upgrade the source and target the DBs to 11.2.0.3 in order to use the integrated capture mode. This forces me to know if 3 specific types of data are used in the comics. The problem is, Oracle docs aren't clear to me, when they refer to 3 specific data types.
Here's the question:
Does anyone know how I can confirm that the following 3 data types are used in the DB by querying the dictionary: "XML stored in binary form',"XML stored as object-relational","abstract data Type "?
If I select the types of data separate from dba_tab_columns, I see no data enumerated type that indicates, for example, that an XML string is stored as a ' binary '.
For me, when Oracle made reference to a "stored as binary XML" on page 1-6 on the installation guide, I guess that makes Oracle refers to a BLOB that contains an XML reference, but I can't be sure.
Someone has an idea that they could share? I just want to confirm that we do not have to upgrade our source and target DBs at 11.2.0.3 by searching in the database is possible to confirm that the above 3 data types are not used by the application.
Thanks in advance for any help.
Tony GYou should find XML columns stored in binary form or CLOB using the DBA_XML_TAB_COLS view referenced in http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb01int.htm#g644983.
You should find XML tables using storage relational object in the view DBA_OBJECT_TABLES with:
select owner, table_name, table_type from dba_object_tables where table_type='XMLTYPE';
To abstract data type, you can query DBA_TAB_COLUMNS using ADT as literal for DATA_TYPE column:
SQL> select * from v$version; BANNER -------------------------------------------------------------------------------- Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production PL/SQL Release 11.2.0.2.0 - Production CORE 11.2.0.2.0 Production TNS for 32-bit Windows: Version 11.2.0.2.0 - Production NLSRTL Version 11.2.0.2.0 - Production SQL> drop table t purge; Table dropped. SQL> drop type adt; Type dropped. SQL> -- SQL> create type adt is object 2 ( 3 c1 number, 4 c2 varchar2(30) 5 ) final 6 / Type created. SQL> show errors No errors. SQL> create table t 2 ( 3 c adt 4 ) 5 / Table created. SQL> show errors No errors. SQL> -- SQL> column table_name format a10 SQL> column column_name format a10 SQL> column data_type format a10 SQL> select 2 table_name, 3 column_name, 4 data_type 5 from user_tab_columns 6 where 7 table_name='T'; TABLE_NAME COLUMN_NAM DATA_TYPE ---------- ---------- ---------- T C ADT
Edited by: P. Forstmann on 8 Apr. 2013 20:28
Edited by: P. Forstmann on 8 Apr. 2013 21:05
-
To change the data type of control/led
Is it possible to change the underlying data type of the indicator or a control? I a VI that I want to use that accepts any type of data (essentially data varriant) and display it accordingly. I have different controls selected to display data of different types in the sense of data vs decimal boolean data vs integer, but certain types of data will be of type uint32 vs int16 vs uint64 etc.. Is it possible to programmatically change the data type, so I need to have all the combinations of indicators?
The short answer is no. The long answer is that LabVIEW has not 'generic' controls that allow you to display any type of data (apart from the variant of course). There are several ways to address this problem, but all require you as the programmer to manage explicitly each type of data you could possibly meet. Here are some possibilities (in no particular order), please let me know if you would like to help a particular implementation of these.
- Force incoming data to variant, use the info option to determine the data type of the original data in a case structure (open G can do this VERY easy), have an indicator on the front panel for each type of data you want and hide those unused
- Use a sub-group of experts on the front panel and sub - vi call of to view specific types (that lends itself very well to encapsulate your data in a class and you leave OOP allows to expand into different types of data)
- Use a tab with the variant (similar to option 1) control put each kind of data in its own tab, enable only the current
- Do a Control-X to accept a Variant option 1 under the hood
- Just as a string of format and use a string indicator
That's all I can think of right now, once again, let me know if you need more information/help on the options.
-
Hello
I am train to write a procedure where I would spend the table as a parameter name and then the code would determine it is column names, and then he would insert records in each column depending on the data type. could someone help me with this.
Thank you
SM
Hello
Perhaps you need to dummy data just for the table.
Here is my exercise
create or replace procedure generate_rows(p_table_name varchar2, p_count number) is -- function insert_statement(p_table_name varchar2) return clob is l_columns clob; l_expressions clob; l_sql clob default 'insert into p_table_name (l_columns) select l_expressions from dual connect by level <= :p_count'; begin select -- l_columns listagg(lower(column_name), ',') within group (order by column_id), -- l_expressions listagg( case when data_type = 'DATE' then 'sysdate' when data_type like 'TIMESTAMP%' then 'systimestamp' when data_type = 'NUMBER' then replace('dbms_random.value(1,max)', 'max', nvl(data_precision - data_scale, data_length) ) when data_type = 'VARCHAR2' then replace(q'|dbms_random.string('a',data_length)|', 'data_length', data_length ) else 'NULL' end, ',') within group (order by column_id) into l_columns, l_expressions from user_tab_columns where table_name = upper(p_table_name); -- l_sql := replace(replace(replace(l_sql, 'p_table_name', p_table_name), 'l_columns', l_columns), 'l_expressions', l_expressions); -- debug dbms_output.put_line(l_sql); -- return l_sql; end; begin execute immediate insert_statement(p_table_name) using p_count; end; / -- test create table mytable( id number(4,0), txt varchar2(10), tstz timestamp with time zone, dt date, xml clob ) ; set serveroutput on exec generate_rows('mytable', 10); select id, txt from mytable ; drop procedure generate_rows ; drop table mytable purge ; Procedure GENERATE_ROWS compiled Table MYTABLE created. PL/SQL procedure successfully completed. insert into mytable (id,txt,tstz,dt,xml) select dbms_random.value(1,4),dbms_random.string('a',10),systimestamp,sysdate,NULL from dual connect by level <= :p_count ID TXT ---------- ---------- 3 WnSbyiZRkC 2 UddzkhktLf 1 zwfWigHxUp 2 VlUMPHHotN 3 adGCKDeokj 3 CKAHGfuHAY 2 pqsHrVeHwF 3 FypZMVshxs 3 WtbsJPHMDC 3 TlxYoKbuWp 10 rows selected Procedure GENERATE_ROWS dropped. Table MYTABLE dropped.
and here is the vision of Tom Kyte for the same https://asktom.oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:2151576678914
Edit: to improve my code, it must use p_count as bind as Tom.
-
Returns the data type of XMLTYPE 1111 rather than 2009
I'm trying to retrieve the metadata of a stored procedure that has a parameter of type XMLTYPE oracle.
I use the oracle jdbc version 2 drivers support SQLXML of JDBC 4.0. I see that the setting and the extraction of the SQLXML works very well, but I am facing the problem when I try to extract the metadata.ResultSet rs = dbMetaData.getProcedureColumns(conn.getCatalog(), null, "%", "%"); while(rs.next()) { // get stored procedure metadata String columnName = rs.getString(4); int columnDataType = rs.getInt(6); String columnReturnTypeName = rs.getString(7); }
Here's the getint (6) SQL type from java.sql.Types. However, if the data type is XMLTYPE, it returns 1111 that is not defined. As far as I know, The JDBC for XMLTYPE type should be java.sql.Types.SQLXML which corresponds to 2009. So I thought it should be back in 2009.
Can someone let me know if I'm doing something wrong or if there is another way to extract the metadata correctly under JDBC 4.0 (i.e. without explicitly using the XDB)
Thanks in advance.
Véronique
Published by: user7897488 on July 27, 2011 04:21Hello. 1111 is oracle extension, oracle\jdbc\OracleTypes.java: public final static int ANOTHER = 1111
You need to open an official driver bug for his changing the SQLXML JDBC 4.0 value.
I would first check that the problem exists with the latest ojdbc6.jar...
Joe -
The number of bytes is the data type of "pixel"?
I'm relatively new to use Pixel Bender to process audio data, so I'm sorry for my lack of understanding of what follows.
I had a question about the data types 'pixel' and 'image' Pixel Bender.
I'm trying to understand code Kevin Goldsmith has written for his mixer 2 channels of audio and there seems to be a gap between the amount of data sent to the shader of PB, and the amount received when the buffer is sent to her for treatment.
Here is the link to the code:
http://blogs.Adobe.com/Kevin.Goldsmith/2009/08/pixel_bender_au.html
At the top of the code, it says a "BUFFER" of 2048 constant:
private public static var Buffer_size : uint = 0 x 800;
Then, in the processSound() function, he implemented an byteArray with a size of 16 384 bytes:
shaderBuffer. length = BUFFER_SIZE * 2 * 4; <---(échantillons stéréo 2048 * 2 * 4 octets/échantillon)
However, I am confused about the part where it defines a hypothetical image and sends the data to the shader:
effectShader. data ["source"] . width = BUFFER_SIZE / 1024; <---(2048 / 1024 = 2)
effectShader. data ["source"] . height = 512 ;
From the code above, one can easily see that the size of the image is only 1024 "pixel" (2 * 512), and on the receiving end there is a "image.4" of variable entry expected to receive. So far, I was under the assumption that a data type "image4" consists of a variable amount of pixels (determined by the size of the image that is food inside), each composed of 4 layers of color of 1 byte. In this logic, each pixel in a data type "image4" should consist of 4 bytes. Now, let's do the math: 4 bytes * 1024 pixels = 4096.
4096 is not equal to 16 384!
How can feed you a 16 384 'byteArray' bytes in a variable "image4" of 4096 bytes?
I'm sorry to seem presumptuous to the explanation above, but I can not understand what is happening here!
The number of bytes is a 'pixel' in PB? He holds float or integer values or both?
I've scoured the web to find these answers, but nothing helps! Maybe I'm off the mark with my current understanding of the pixels and images in PB, but I need to understand this before I can move with the application that I do.
I am very grateful of any advice or information that someone can give.
Thank you
Matt
This is the Pixel Bender Language Reference:
"pixel1: represents the value of a single channel of an image." The name distinguishes this
single element pixel of a pixel which contains several channels. The pixel values are
considered as 32-bit floating-point numbers. »32 bits = 4 bytes
If a channel is four bytes rather than that you have accessed. If this should explain the difference.
-
Problem with the DATA types, in a UNION
Hello
I m trying to disply a custom message when no data found using the structure below. Unfortunately I ve you have a problem with the data types I im trying to union
I tried different types of data in the 2nd SELECTION tool but the rest of the problem. Help, please.
SELECT HOSP_NAME 'HOSPITAL' DOC_SUR 'NAME', 'NAME' DOC_NAME, d.DOC_ID ID, diagnosis
H., DOCTOR d, (SELECT d.DOC_ID, COUNT (d.DIAGN_ID) diagnosis
OF PATIENT_DIAGNOSIS d
GROUP BY d.DOC_ID)
WHERE diagnosis > 1
UNION ALL
SELECT TO_CHAR ('test'), TO_CHAR ('test'), TO_CHAR ('test'), TO_CHAR ('test'), 0
OF THE DOUBLE
If NOT EXISTS (HOSP_NAME 'HOSPITAL' 'NAME' 'NAME' DOC_NAME DOC_SUR, d.DOC_ID ID, diagnosis
OF ΝΟΣΟΚΟΜΕΙΟ h, ΙΑΤΡΟΣ d, (SELECT d.DOC_ID, COUNT (d.DIAGN_ID) diagnosis
OF PATIENT_DIAGNOSIS d
GROUP BY d.DOC_ID)
WHERE diagnosis > 1);
ORA-01790: expression must have same type of data, matching expression
01790 00000 - "expression must have the same type of data, matching expression.DOC_SUR 'NAME' DOC_NAME 'NAME', ID d.DOC_ID, HOSP_NAME "HOSPITAL", diagnosis
What is the data type for these columns
To_char('test'), to_char ('test'), to_char ('test'), to_char ('test'), 0
What you're doing here 'test' is already a character. Why do you use TO_CHAR?
-
I'm working my way through my first vi producer consumer and I have two questions.
1 I am the queue data x, y samples acceleration waveform type z. The code snippet shows how to set the data type in the queue to get. It is rather ugly and disturbing, even if it seems to work. Is there a way more elegant and beautiful to set the data type?
2. the sampling frequency of the accelerometer is 5120 Hz. The DAQmx Read buffer is 1024 length samples. Therefore, it takes 200 [ms] to fill the buffer. I put the metronome 100 [MS] to ensure that the producer is not without samples. This means that the loop While producer will spend much of its time waiting. Right? Given the wait cost anything?
In ProducerConsumerExample.vi of LabVIEW, the sampling frequency is 10000. The size of the read buffer is 1000. And the metronome is set to 100 [ms]. The sampling frequency of the device comes from the hardware device in the cDAQ. 100 [ms] interval comes from the PC. It will not be a mismatch? I would like to understand this before I put my metronome to 200 [ms].
Arizona_Joe wrote:
Then, can shed you some light on the behavior of the loop while you mentioned is not a metronome that is is punctuated by DAQmx? I think it would do a lot of rotation.
It is not spinning as he waits inside the DAQmx Read for samples N must be obtained. This isn't a request for data. It takes time to collect these samples. That length of time depends on your sampling rate and how many samples you request. So because he is waiting inside the DAQmx Read, there is no need to add an additional wait. Let the DAQmx Read limit the rate of the loop.
It's actually like the loop of consumer for the consumer to the producer. Playback of the queue will limit the rate at which that loop runs. It should therefore no waiting.
-
Is it possible to get the data type of element of a queue to itself?
Hello world
I have a Q which has a cluster as data type of element.
now when I want to enqueue
I will use bundle-default-
and for this I have to have my current data type
(long cable as (perhaps after where I got the Q).
My question is,
If there is a method/property-node/something that allows me to
the queue of wire inside Refnum and receive the data element type.
If I can get into the top of bundle-default?
(I really want to have this cable in all directions)
is this the reason why I'm asking here
aid for the Refnum of outgoing queue to get a queue, the method
indicates the data type of element and so I hope that there could be a solution.
thx for your time
and soon
j
Get queue status must be output with the type of data (more precisely an array of the data type and an array of clusters if the data is itself a table). If you do not set the items back to entry to T, this should not even cost anything.
That said, I agree with others that it is better to what actually a typedef.
-
Change the Data Type to node e/s on PXI-7841R FPGA
I would like to change the data type for the node FPGA of e/s on my card FPGA 7841R (simulation). So far, I have raw data (I16). I want to test something with the calibrated data (FXP).
The cRIO, you usually go to the properties of module to change the calibration mode...
I searched 7841R documentation and could not do any weather information this calibration mode was also available on this map.
Any tips?
Vincent
The new maps in the series R offer node fixed point IO (for example, the SMU-7858R), but as mentioned all the old PXI based cards R-series offer only modes of measurement I16.
Page 22 manual R series is about how to do this conversion: http://www.ni.com/pdf/manuals/370489g.pdf#page=22
Specifically, it notes that you can calculate the voltage by (output Code I16) * 10.0V / (32 768).
Even if this can use FPGA resources, it records the host do the same conversions. RT old target with slow processors doing the conversion of I16 or FXP to SGL on the FPGA has saved a lot of time CPU
-
Modification of the data types of the custom shared variables
My application includes a library containing a number of shared single process variables. I use type defs to create the shared variable "of the custom control." I know that shared variables do not-automatic update since the type defs, so I'm updating shared variables (data type, do a right click, properties) whenever I update the type definitions. However, if I make a change to a type design that does not change the data type, for example to change the labels controls, these changes will be reflected in the shared variable. The data types of variable window shared list contains entries for each previous update, which indicates he uses the previous entries. How can I make the window of properties of shared variables 'forget' my previous defs type wandering without deleting the variable total? Withdrawal and replacement would be troublesome because the done variable references throughout my project.
Thank you
Wes
The variable is not in the Distributed System Manager, or Manager of the Variable, and cancellation of the deployment has not been resolved. However, I found Labview from closing completely and reboot clears the memory of the previously used custom data types that sees the library. Thus, the effective workaround I found is:
1 make a significant change to the data type of the type (per your suggestion) FED. Record.
2 - redefine the variable screw-notice type FED.
3. save the project. Close and restart labview.
4 - the old def type is now disabled.
5. return the significant change of the def type, implement trivial change and save.
6 redefine the variable using the type correct now def. Viola!
Thank you!
-
What is the minimum value for the data type double?
... a more academic question: what is the minimum value of the data type double? I thought 'double', it is the 8-byte IEEE standard and what I remember, it's + - 1.7E + - 308. The more different number of 0 should be 1.797E - 308.
This is why I was a little surprised when I looked at the data output of my calculation of CVI, where I found the numbers with exponents of E-319 or E-324 as the smallest value...
But I'm sure there's an explanation :-)
Thank you for sharing with me,
Wolfgang
The largest number is indeed the order of + 1.7E + 308; There are a smaller number of - 1.7E + 308. Note that this is in fact the most negative number, which is the smallest by some reckoning. For the small beach of the Exhibitor, things get a little more complicated. 1E-308 can be represented with complete accuracy and resolution, but if you're willing to lose a few bits of precision, you can go down even further. For example:
Double x, y, z:
x = 1E-300;
y = 1E7;
z = x / y; Give 1.000000000000000E - 307
y = 1E8;
z = x / y; Give 9.999999999999999E - 309
y = 1E18;
z = x / y; Give 9.999987484955998E - 319
y = 1E23;
z = x / y; Give 9.881312916824931E - 324
So, as you can see, values less than 1E-308 are possible, but they become increasingly more inaccurate and should not be relied upon.
JR
-
Hello friends, I want to know what the data type can be declared in pl/sql, but cannot be declared in sql?
Hello friends, I want to know what the data type can be declared in pl/sql, but cannot be declared in sql?
That question is ambiguous: there is NOT a SINGLE type of data that can be declared in pl/sql, but not in sql.
The Oracle documentaton is your friend.
The doc of the SQL language treats the SQL data types.
http://docs.Oracle.com/CD/B28359_01/server.111/b28318/datatype.htm
The doc PL/SQL does PL/SQL data types. Because PL/SQL is a language of proceedings (and sql is NOT) there are several types of data, as shown in this doc, PL/SQL-specific:
PL/SQL scalar data types are:
- SQL data types
BOOLEAN
PLS_INTEGER
BINARY_INTEGER
REF
CURSOR
explained in "Cursor Variables"- User-defined subtypes
ALWAYS start with the Oracle documentation for these fundamental questions.
Several times, as with this question, the question is too general to give a simple answer.
Maybe you are looking for
-
dv6-6c11sa after only a gentle chipset drivers windows 8 installed after the hard disk crash
Hello I hada hard drive failure, then installed windows 8 on a new disc, everything was kind of ok, after the download and installation of http://h10025.www1.hp.com/ewfrf/wc/softwareCategory?os=4132 & lc = in & cc = uk & dlc = in & sw_lang = & produc
-
Product number: D5E81PA #ABG does not match all want dv6 models
Hello I made the mistake of buying a Windows 8 machine which does not reliably connect to the internet. I see connections and you connect to them but just have 'limited' connectivity and can't get online. I am following this thread for update firmwar
-
TouchPad has stopped working in Satellite L300
Hi Xaxer, Hi, as I Don t know how to post a new topic, I just replied (I apologize this way). The touchpad on my L300 stopped working. (Vista 32 bit). FN and F9 does nothing.USB-mouse works fine. Downloaded new driver for touchpad. Touch pad is not d
-
Pavilion 17-f184ca: HP Pavilion f184ca 17
Support HP @ darlings team, Pavilion 17-f184ca support MSATA solid state drive? Best respect Ahmad
-
Halo 2 will not let me play.
OK my halo 2 game does not work when I try to open it. It keeps saying that something works already as the dedicated server halo2 I tried everything I can think of any suggestion?