generate the table with a column of numbers from 1 to 999999999
Hi all, I'm about to generate the table like this:Select 1 double t
Union of all the
Select 2 double t
Union of all the
Select 3 t double
But I need up to 999999999. Could you please find more simple decision?
858774 wrote:
But I need up to 999999999. Could you please find more simple decision?
Don't know exactly what you are looking for, but if you want to just set the number from 1 to 999999999, query below would:
select level from dual connect by level <999999999;
Vivek L
Tags: Database
Similar Questions
-
By selecting the table with UDT columns
Hello!
I have:
How can I select from table j_table to the output as:create type j_t as object ( num number, str varchar2(10) ); create table j_table ( ident number, j j_t ); insert into j_table (ident, j) values (1, j_t(1, 'one'));
ident num str ----- --- --- 1 1 one
Is there something similar to ' SELECT * FROM ' for use with objects?
You can create an additional array type, for example j_t_tab:
SQL> create type j_t as object ( num number, str varchar2(10) ) / Type created. SQL> create type j_t_tab as table of j_t / Type created. SQL> create table j_table ( ident number, j j_t ) / Table created. SQL> insert into j_table (ident, j) values (1, j_t(1, 'one')) / 1 row created. SQL> select ident, t.* from j_table j, table(j_t_tab(j)) t / IDENT NUM STR ---------- ---------- --------------- 1 1 one 1 row selected.
?
-
Hi all
Here is the structure of the table with two expression of virtual columns associated highlighted, now I want to delete these expressions with virtual columns (but must keep my VIRTUAL columns as it is).
Is it possible the alter or I need to raise the table, make a new structure and copy content back to newly structured table... Pleae help!
CREATE TABLE TEST_COL)
SAGE_TRADE_TYPE VARCHAR2 (50 BYTE),
LOCAL_TZ VARCHAR2 (20 BYTE),
ACE GMT_CONV_ENTERED_DT_TS (SAGEDBO. FN_CONVERT_TIMEZONE (LOCAL_TZ, ENTERED_DT_TS)) VIRTUAL,.
ACE GMT_CONV_EXECUTION_DT_TS (SAGEDBO. FN_CONVERT_TIMEZONE (LOCAL_TZ, UPSTREAM_EXECUTION_TS)) VIRTUAL,.
EOD_IND VARCHAR2 (10 BYTE)
);
Thank you very much
Arpit
Try this
ALTER table test_col change gmt_conv_entered_dt_ts (0) virtual;
ALTER table test_col change gmt_conv_execution_dt_ts (1) virtual;
-
GetLength errors on CLOB. Retrieves the size of a table with CLOB columns
Hello
I try to find the size of a CLOB to a table column and get the error
PLS-00306: wrong number or types of arguments in the call to "GETLENGTH.
When you try to use dbms_lob.getlength. Here is the code
declare
number num.
Start
for rec in (select xmlupload from FILE_TABLE where file_table_id = 33635) loop
NUM: = dbms_lob.getLength (rec.xmlupload);
end loop;
dbms_output.put_line (num);
end;
Database version: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
I'm actually trying to find the size of a table with CLOB columns, is there an easy way to do this Besides using getlength and without having to contact the Administrators (they are outsourced)?It works fine on my computer, the version is also 10g.
SQL> declare 2 num number; 3 begin 4 for rec in (select cntnt from ims_toms_msge where rownum<3) loop 5 num := dbms_lob.getLength(rec.cntnt); 6 dbms_output.put_line(num); 7 end loop; 8 9 end; 10 / 3837 3837 PL/SQL procedure successfully completed.
You should check if xmlupload is the CLOB data type.
In addition, if you just want to get the CLOB size, you can use LENGTH() as well, you will get the same result;SQL> select length(cntnt), dbms_lob.getLength(cntnt) from ims_toms_msge where rownum<2; LENGTH(CNTNT) DBMS_LOB.GETLENGTH(CNTNT) ------------- ------------------------- 3837 3837
Published by: PhoenixBai on September 24, 2009 13:40
-
Creating table in the model with 80 columns
Hello
I am trying to create a model to display 80 columns, but in Word format, I get the message "you cannot create a table with more than 63 columns.
Can how I put the 80 columns in the Template.rtf?
Env: Suite Oracle E business 12
Output required: Excel
Thanks in advance.It's the MSword limitation and no BEEP, but indirectly there is a limitation of the BEEP ;)
MSWord supports only maximum of 63 columns.
As MS Word supports only the width of page maximum of 22 inches wide and 22 inches high.Option 1:
Create a table with two columns
Insert a table with 63 columns in the first cell,
Insert a table with 63 columns in the second cell,
How we can get rid of limitations columns.Option 2:
If you want to use more than 63, then you use templates other than RTF. I recommend XSL.
-
Insert into the table with the help of the string
Hi all
I have a string with commas.
Is it possible to insert the values of string directly in the table in each column.
For ex:
v_str = "10,20,30,40";
insert into v_tab (col1, col2, col3, col4) values (10,20,30,40);
I would like to pass v_str instead of numbers in the insert statement.
Thank you
I try with this simple block
How can achieve us ifDECLARE v_char VARCHAR2(1000) := '10,20'; v_query VARCHAR2(3000); BEGIN v_query := 'INSERT INTO week_bkgs(week_num, product_bkg) VALUES (:x)'; EXECUTE IMMEDIATE v_query USING v_char; END; /
the column a. data types are the NUMBER
b column data types are VARCHAR2
Published by: polasa on October 30, 2008 21:20Try this
SQL> set lines 100 SQL> desc student; Name Null? Type ----------------------------------------------------- -------- ------------------------------------ NAME VARCHAR2(100) STUDENT_NUMBER NUMBER(10) SQL> declare 2 str_v varchar2(100) :='''abc'',1'; 3 begin 4 execute immediate 'insert into student values ('|| str_v ||')'; 5 end; 6 / PL/SQL procedure successfully completed. SQL> select * from student where student_number=1 2 ; NAME STUDENT_NUMBER -------------------- -------------- abc 1 SQL>
-
Gears - error when you try to insert values into a table with multiple columns
Hello
I started playing with the gears and SQlLite today and I get an error when I try to insert values into a table with multiple columns.
I have:
var db = google.gears.factory.create('beta.database'); db.open('developerSet'); db.execute('create table if not exists Developers (DeveloperName text, DeveloperAge int)'); var devName = "Davy" var devAge = 32; try { db.execute('insert into Developers values (?, ?)', [devName, devAge]); alert('success'); } catch (e) { alert(e); }
I get the error:
net.rim.device.api.database.DatabaseException; insert into developers values (?,?): SQL logic error or missing database.
I use this reference: http://code.google.com/apis/gears/api_database.html
Everything works if I have only one field as:
var db = google.gears.factory.create('beta.database'); db.open('developerSet'); db.execute('create table if not exists Developers (DeveloperName text)'); var devName = "Davy" var devAge = 32; try { db.execute('insert into Developers values (?)', [devName]); alert('success'); } catch (e) { alert(e); }
I use the plug-in Visual Studio 2.0 for 2008 that are running Windows XP SP and Simulator 2.13.0.56
Thank you
Davy
Yes, a SQLite database will persist between battery pulls. The database is registered either to internal MEM or removable media (not the device memory), depending on which is available on your device.
In general, its not considered a best practice to remove your table as soon as it is empty and re - create it again when you want to add data. This adds extra overhead fresh for the final, delete and insert first for a given table. Instead, define and finalize your drawing before you create your table. Once created, review the static schema.
That being said, for development purposes, it may be easier to provide an easy way to drop your tables while you develop your schema.
See you soon,.
Adam
-
Export an ADF table with default column order
Hello
Jdev 11.1.1.5.0
We have ADF Table with column drag and drop option. Also we have implemented ADF Table with excelHTMl type of export.
Everything works as expected. Only problem is if we try to exchange a few columns by drag-and - drop option and then export the table, we receive the order of the columns with brewing. But our demand is, the user must obtain the export with the initial order table by default.
It would be great, if you can suggest an idea to export the ADF table with default column order.
Thanks in advance,
MSR.
I realized the required functionality. We can restore the default order of the columns to aid
Function richeTableau = this.getFetchResultsTable (); Iterator rItr = rTable.getChildren () .iterator (); {while (rItr.hasNext ())} ((RichColumn) rItr.next ()).setDisplayIndex(-1); } Then we can call the real export help feature
queue the event via a JavaScript inserted into the page FacesContext context = FacesContext.getCurrentInstance (); Erks = ExtendedRenderKitService Service.getService (context.getRenderKit (), ExtendedRenderKitService.class); erks.addScript (context, "customHandler()"); -
Mr President.
Can fill us transitional attribute in the table with no serial like 1,2,3, etc.? And how?
Concerning
You want to show serial No. on the page for all the lines?
Check once-
Actually transitional attribute loses its value when page refreshes or viewObject is not appropriate in this case if your use case is different, so please tell us
Ashish
-
I have the table of 3 columns A, B, C. I want to store the sum of columns A B in the C column without using the DML statements. Can anyone help please how to do. ?
11.1 and especially you have virtual column
SQL> create table t 2 ( 3 a number 4 , b number 5 , c generated always as (a+b) virtual 6 ); Table created. SQL> insert into t (a, b) values (1, 2); 1 row created. SQL> select * from t; A B C ---------- ---------- ---------- 1 2 3
Before that, a front insert - trigger
SQL> create table t 2 ( 3 a number 4 , b number 5 , c number 6 ); Table created. SQL> create or replace trigger t_default before insert on t for each row 2 begin 3 :new.c := :new.a+:new.b; 4 end; 5 / Trigger created. SQL> insert into t (a, b) values (1, 2); 1 row created. SQL> select * from t; A B C ---------- ---------- ---------- 1 2 3
-
Master Pages are part of each document.
You can import master pages from another document (i.e. a ' model') in your current document using the file > import > Formats... option and select layout from the list (deselect all others).
If you have changed the current TOC for the problem of the Page Master on the left, then simply save the file and use the Edit > update book option for that OCD regenerated by using the new page templates.
-
How to export data from the table with the colouring of cells according to value.
Hi all
I use jdeveloper 11.1.1.6
I want to export data from the table with a lot of formatting. as for color cells based on value and so much. How to do this?
You can find us apache POI-http://poi.apache.org/
See this http://www.techartifact.com/blogs/2013/08/generate-excel-file-in-oracle-adf-using-apache-poi.html
-
Update a table with one column of another
Oracle 11g
Helloi'im trying to update the two columns of table SUPPORT (SUPPORT_X, SUPPORT_Y) with two columns of table POST_HTA_BT (POSTHTABT_GPS_X, POSTHTABT_GPS_Y)
Understand that the two tables have the colum below:
SUPPORT (SUPPORT_ID, SUPPORT_PLAQUE, POSTHTABT_ID, SUPPORT_X, SUPPORT_Y,...)
POST_HTA_BT (POSTHTABT_ID, POSTHTABT_GPS_X, POSTHTABT_GPS_Y,...)
The SUPPORT_PLAQUE has type varachar. Except the keys, the other columns are varchar type in both tables.
The point here is to update the support_x, support_y with posthtabt_gps_x and posthtabt_gps_y.But before the update we have Sheik if the fifth number of the support plate is a number of characters from "0" to "9"and the rest of the caracter of the support_plaque is '00000'
Please note that the support_plaque is stored in the table with the form: "0025800000!"
So I did the below script, I try to execute in sql develop.
SET SERVEROUTPUT ON
DECLARE
chiffre_liste varchar (200): = '0 ', '1', '2', '3', '4', ' 5 ', ' 6' ', 7', ' 8 ', ' 9';
CURSOR CUR_GPS_SUPPORT IS
Select MEDIA. SUPPORT_X, SUPPORT. SUPPORT_Y, POSTE_HTA_BT. POSTHTABT_ID, SUPPORT. EXPL_ID,
SUPPORTED. SUPPORT_PLAQUE, POSTHTABT_GPS_X, POSTHTABT_GPS_Y
support,.
POSTE_HTA_BT
where
SUPPORTED. SUPPORT_X IS NULL and
SUPPORTED. SUPPORT_Y IS NULL and
SUPPORTED. POSTHTABT_ID = POSTE_HTA_BT. POSTHTABT_ID and
SUPPORTED. EXPL_ID = POSTE_HTA_BT. EXPL_ID
Order of SUPPORT. POSTHTABT_ID;w_POSTHTABT_ID POSTE_HTA_BT. Type of POSTHTABT_ID %;
w_SUPPORT_X SUPPORT. TYPE % SUPPORT_X;
w_SUPPORT_Y SUPPORT. TYPE % SUPPORT_Y;
w_EXPL_ID SUPPORT. TYPE % EXPL_ID;
w_SUPPORT_PLAQUE SUPPORT. TYPE % SUPPORT_PLAQUE;
w_POSTHTABT_GPS_X POSTE_HTA_BT. TYPE % POSTHTABT_GPS_X;
w_POSTHTABT_GPS_Y POSTE_HTA_BT. TYPE % POSTHTABT_GPS_Y;BEGIN
DBMS_OUTPUT. Put_line ('loading the coordoonnees GPS - GPS Coord update takes care of starting ');FOR HEART LOOPING CUR_GPS_SUPPORT
w_POSTHTABT_ID: = cur. POSTHTABT_ID;
w_SUPPORT_PLAQUE: = cur. SUPPORT_PLAQUE;
w_SUPPORT_X: = cur. SUPPORT_X;
w_SUPPORT_Y: = cur. SUPPORT_Y;
w_POSTHTABT_GPS_X: = cur. POSTHTABT_GPS_X;
w_POSTHTABT_GPS_Y: = cur. POSTHTABT_GPS_X;If substr (cur.support_plaque, 5, 1 chiffre_liste) and substr (cur.support_plaque, 6, 5) = '00000'
w_SUPPORT_X: = CUR. POSTHTABT_GPS_X
w_SUPPORT_Y: = CUR. POSTHTABT_GPS_Y
END if;
EXCEPTION WHEN NO_DATA_FOUND THEN w_SUPPORT_X: = NULL and w_SUPPORT_Y: = NULL;
END;-Updated the table of the supports
Update SUPPORT
Set SUPPORT_X = w_SUPPORT_X,
SUPPORT_Y = w_SUPPORT_Y
where SUPPORT_PLAQUE = w_SUPPORT_PLAQUE;
-On valid imm? immediately
commit;
EXCEPTION when no_data_found then null;
-No details found
END;
END;
/and I got the following errors:
Error report:
ORA-06550: line 2, colum 34:
PLS-00103: symbol ',' met instead of one of the following symbols:* & = - + ; <>/ is mod remains not rem
<>< Hurst (*) > or! = or ~ = > = < = <>and like2 or
like4 likec between | submultiset of type multiset Member
ORA-06550: line 2, column 52:
PLS-00103: symbol ';' met instead of one of the following symbols:), * & = - + <>/ is mod remains not rem = >
<>< Hurst (*) > or! = or ~ = > = < = <>and like2 or
like4 likec between | Member of multiset must
ORA-06550: line 38, colum 48:
PLS-00103: symbol 'CHIFFRE_LISTE' met instead of one of the following symbols:(
Symbol "(" a été substitué à "CHIFFRE_LISTE" verser continuer.) "
ORA-06550: line 39, 12 colum:
PLS-00103: symbol 'W_SUPPORT_X' met instead of one of the following symbols:), * & -+ / at rem mod < Hurst (*) > rest and or.
multiset
ORA-06550: line 40, 12 colum:
PLS-00103: symbol 'W_SUPPORT_Y' met instead of one of the following symbols:. (), * @ % & = - + <>/ is mod remains not rem
<>< Hurst (*) > or! = or ~ = > = < = <>and like2 or
like4 likec between | mult
ORA-06550: line 41, colum 9:
PLS-00103: symbol 'END' met instead of one of the following symbols:. (), * @ % & = - + <>/ is mod remains not rem
<>< Hurst (*) > or! = or ~ = > = < = <>and like2 or
like4 likec between | multiset members
06550 00000 - "line %s, column % s:\n%s".
* Cause: Usually a PL/SQL compilation error.
* Action:I checked the line number, but do not see the error in my code.
Please could you help me?
peace
Hello
glad to know that it worked. In fact, I don't see the reason to make these complicated processes.
Remember the mantra:
- If you can do it with SQL then do it with SQL
Good evening!
Alberto
-
Declare a type of table with multiple columns
I have a table with a column of type, and I want to create one with two columns.
My type is:
create or replace type "NUMBER_TABLE" in the table of the number;
And I use it in function:
FUNCTION GetValues()
return NUMBER_TABLE
as
results NUMBER_TABLE: = NUMBER_TABLE();
Start
Select OrderId bulk collect in: results from (select * from tbl_orders);
-Other code...
end;
I want select it be like this:
Select OrderId, OrderAddress bulk collect into: results from (select * from tbl_orders);
How to do this?Is that what you are looking for:
CREATE OR REPLACE TYPE two_col_rec AS OBJECT (empno NUMBER, ename VARCHAR2(10)) / CREATE OR REPLACE TYPE two_col_table AS TABLE OF two_col; / CREATE OR REPLACE FUNCTION GetValues RETURN two_col_table AS results two_col_table := two_col_table(); BEGIN SELECT two_col(empno, ename) BULK COLLECT INTO results FROM emp; -- RETURN results; END; / show errors
-
How the values to insert into the table with the command insertion
Dear all
can someone tell me how the values to insert into the table with the command insert, I want to say I always use command insert behind my forms on what shutter release button press the button of my save, but today I had a form of 6i, where controls (textbox, combo, etc.) are delineated with directly the table with I guess than the Properties Windows , I created 3 columns in tand 3 text on forms fields, now kindly tell me how to do this fields to fill and do not insert command, I mean directly defined with table column
Please help me its urgentHello
If the block is based on your database table, just committed the shape, then changes will be applied to the database.
François
Maybe you are looking for
-
asking for passwords unnecessarily: win 7 vs win 8.1
I'm TB configuration on a new machine Windows 8.1. I registered a password on my main email account, but did not save other accounts. On Windows 7 it works as expected and demand only for the other passwords when I click their Inbox, Windows 8.1 howe
-
Hello! I have a question: How can I hide the dialogue password copy (right click on the saved item) of the Manager of Settings\Security\Password of FireFox window.I can do it in userChrome.css? Thank yougmacio PS: Sorry for my English
-
It doesn't matter what I want access, this pop up activation. This is usually an investigation and more often offering free certificate, ask questions and encouraging purchases.
-
HP mini computer: needs bios password for hp mini
I pull the cmos battery to clear the password, but it doesn't work help ease ml p
-
mouse acts weird on Windows 10 when it is connected to the monitor extern
Hello I have a weird problem, when I connect my macbook pro to an external monitor. I am running Windows 10 Pro. The problem only occurs when I close the lid of the laptop. The mouse starts to act up, it applies random clicks. Have more strange is th