473,385 Members | 1,492 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to change the table name during the runtime

I have the following,

create table ssrr_emp(
Emp_name varchar2(25),
Emp_city varchar2(10),
Emp_id number(2)
);
/


create table ssrr_empsal(
sal_grade char(1),
salary number(7,2),
Commission number(5)
);
/


In the above code,the table names are prefixed with ssrr i.e ssrr_emp and ssrr_empsal,

Here my question is when I am executing the above code

I need to prefix the table name with er i.e er_emp and er_empsal.

I mean during the runtime it should ask the name to enter only for ssrr,
and
if i enter er then the tables should be created in the name er_emp and er_empsal.


How it can be done? can anyone suggest me the code.

Thank you in advance.


Regards,
Gurujothi.
Mar 2 '12 #1
5 2480
rski
700 Expert 512MB
Not sure if I understand, but you just want user to be able to put table name prefix, so if user put ssrr then table name starts with ssrr_, if user put er then table name starts with er_.
Right?
Mar 2 '12 #2
Hi RSKI,
Yes I need that only.
Mar 2 '12 #3
rski
700 Expert 512MB
Well actually you can create PLSQL function which takes ona parameter (prefix) and creates new tables with given prefix. Is that enough for you or do you need the script to ask you for the prefix.
Mar 2 '12 #4
Yes I need that script. Can Yoy please?
Mar 2 '12 #5
rski
700 Expert 512MB
But is script with parameter where you can set prefix enough for you, or you need script that will ask for prefix.
Mar 2 '12 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Larry Pits | last post by:
Hi All, Is there any code for ASP.Net to programmatically change the server name within crystal reports? I looked for all technical document at cystal decision site, but no luck. TIA
5
by: Markus Stehle | last post by:
Hi all! I have asp.net web application that uses static impersonation. Is it possible to change the impersonated user during runtime? Within some parts of my application I would like to...
2
by: Balaji | last post by:
Hi All, Can I use more than one membership provider for a given website? I understand only one of them could be default one. If yes, then how to programmatically access the other membership...
1
by: Sankalp | last post by:
Hi, I am using VB 2005. My application has many data bound controls. The connection is stored in the app.config file. I want the application to start with a default connection string and while...
0
by: andremc | last post by:
Hello everyone, I've looked around, but haven't been able to get an exact answer to this question. I have three user roles which have access to their own folders, and an owner role which can...
2
by: mukeshrasm | last post by:
Hi I am creating page dynamically with upload image(more than one) feature. while uploading image I don't know which images are already uploaded so I want to give user a feature to change the file...
3
by: roucha | last post by:
Hey guys, i'm still working on that chat program, and i was wondering if there was a way to modify the name of already created nodes during runtime. i know that you can create them but i don't...
3
by: workingbee | last post by:
I’m writing a unittest, which will clear a table and insert a set of values into the table before it starts to test some stored procs. My problem is that when multiple users are running the test at...
10
irfanafzal
by: irfanafzal | last post by:
Hello I have saved query in MS Access "SELECT ID ,Name, Address from Data2001" I am using this query in Crystal report My question is this can I change table name in this query "DATA2001" to...
2
by: Kyaw Kyaw Min | last post by:
I would like to change table name at SQL2000 database. I use alter statement ALTER TABLE Table_Name RENAME TABLE Old_Name TO New_Name
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.