Home » SQL & PL/SQL » SQL & PL/SQL » Creating Table in plsql
Creating Table in plsql [message #613294] Sat, 03 May 2014 13:00 Go to next message
pratikshamehra
Messages: 4
Registered: May 2014
Location: Delhi
Junior Member
How can I create table in oracle using plsql by reading .mdd file in the server.

Pls help!

[Updated on: Sat, 03 May 2014 13:03]

Report message to a moderator

Re: Creating Table in plsql [message #613295 is a reply to message #613294] Sat, 03 May 2014 13:11 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
Create table syntax is similar in most RDBMS technologies. Even in plsql you could execute DDL statement. But what do you mean by .mmd file in the server? Are you looking for http://docs.oracle.com/cd/E11882_01/gateways.112/e12077/adabasdata_access.htm#IVACW362

[Updated on: Sat, 03 May 2014 13:15]

Report message to a moderator

Re: Creating Table in plsql [message #613296 is a reply to message #613295] Sat, 03 May 2014 13:17 Go to previous messageGo to next message
pratikshamehra
Messages: 4
Registered: May 2014
Location: Delhi
Junior Member
.mdd is a file extension.
Can we execute ddl within procedure?
Re: Creating Table in plsql [message #613297 is a reply to message #613296] Sat, 03 May 2014 13:20 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
Firstly, please do not PM to get your answer when you already have the forum open for discussions.

To answer your question,
Yes I know .mdd is a file extension.

And, yes, DDL is very much possible in a procedure. Use EXECUTE IMMEDIATE. But before that please post what is your actual requirement. Without a proper test case it's impossible to comment on anything.

[Updated on: Sat, 03 May 2014 13:22]

Report message to a moderator

Re: Creating Table in plsql [message #613298 is a reply to message #613297] Sat, 03 May 2014 13:24 Go to previous messageGo to next message
pratikshamehra
Messages: 4
Registered: May 2014
Location: Delhi
Junior Member
My file is in UNIX server the procedure will get directory path to file as an input.
Now I want my proc to read this file in directory and create table
Re: Creating Table in plsql [message #613299 is a reply to message #613298] Sat, 03 May 2014 13:34 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
Ok. So what steps have you tried so far? It's important to know about the client-server environment.
Re: Creating Table in plsql [message #613300 is a reply to message #613299] Sat, 03 May 2014 13:36 Go to previous messageGo to next message
pratikshamehra
Messages: 4
Registered: May 2014
Location: Delhi
Junior Member
I'm calling my procedure from shell script.
I know how to read a file from server.
But am stuck with mdd file and creating table from it
Re: Creating Table in plsql [message #613301 is a reply to message #613298] Sat, 03 May 2014 13:38 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
Now I want my proc to read this file in directory


Use UTL_FILE.

Quote:
and create table


Use EXECUTE IMMEDIATE as already said.

Re: Creating Table in plsql [message #613302 is a reply to message #613300] Sat, 03 May 2014 13:38 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
But am stuck with mdd file


What is a MDD file? How is it different from a text file?

Re: Creating Table in plsql [message #613304 is a reply to message #613302] Sat, 03 May 2014 14:03 Go to previous message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>MDD - MacDraft Drawing (Microspot Ltd)
if above is correct, I doubt you can successfully read or write a MacDraft Drawing file using Oracle.
Previous Topic: Simple Stored Procedure help...
Next Topic: Oracle Alphanumeric Sequence
Goto Forum:
  


Current Time: Fri Apr 19 05:01:55 CDT 2024