Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old April 23rd, 2004, 09:13 AM
eetcitty eetcitty is offline
Cyber Warrior
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Location: Kirtland, New Mexico
Posts: 1 eetcitty User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Need help in creating oracle tables

Hello all,

I am fairly new to Oracle & am still trying to learn the pl/sql syntax. I have no formal training but I need to use Oracle tables to extract data. I do have have some SQL under my wings.

Currently, I am using this syntax to create a table but I am getting a insufficient privileges error. Need grant syntax.

create table temp
(linenbr number (2,0) not null,
descript varchar2(50) not null,
temp1 varchar2(20) null,
temp2 varchar2(20) null,
temp3 varchar2(20) null,
temp4 varchar2(20) null,
temp5 varchar2(20) null,
primary key (linenbr));
create or replace view NM_Maps
as
select l.linenbr, l.descript, l.pinnbr from linc.propdb_lfile l
where l.pinnbr = '2068176385400M00009107';
select * from NM_Maps;

I don't know if it is possible but I get 4 rows that I need to stuff into one row. Table linc.probdb_file l returns the following:

Title 1 Title2 Title 3
---------- ------------------ ----------
1 result1a a
2 result2a a
3 result3a a
4 result4a a

What I need to happen is:

Title 1 Title 2 Title 3 Title 4 Title 5
------- -------- -------- -------- --------
xxxx Result1a Result2a Result3a Result4a

Also, I don't neccesarily know how many records I will get from linc.propdb_file l. So, the number of columns that I need to create in the second table is unkown.

Any help is appreciated.

Last edited by eetcitty : April 23rd, 2004 at 09:16 AM.

Reply With Quote
  #2  
Old April 27th, 2004, 02:58 AM
bergner bergner is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 144 bergner User rank is Private First Class (20 - 50 Reputation Level)bergner User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 7 h 48 m 6 sec
Reputation Power: 5
There are many pages on WWW

Here is a particular favourite of mine that describes the syntax of Oracle commands.
http://www.ss64.com
As a dbadmin user (or similar) you can do things like:
grant create table to user

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Need help in creating oracle tables


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway