Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create stored procedures Dynamically

Status
Not open for further replies.

bharanikrishna

Programmer
Jun 1, 2001
3
IN
spec: i want one stored procedure which is dynamically created.the dynamic stored procedure is going to insert data into table

i am passing some parameters they are

param1. tablename
param2. columnname1,column2,column3.......
param3. column1data,column2data,column3data......

validations:

lets assume that i have one table it has 10 columns.

val1. some times i am passing parameters tabelname,allcolumnnames,allcolumnsdata

val2. sometimes i am passing parameters
tablename,some columnsnames (they are in sequencial order i.e columnn1ame,column2name,column3name)so remaining columns are Optinal.,then i am passing data related to that perticular columns.


val3. sometimes i am passing parameters
tablename,i am giving columnnames randomly(remaing columnsname are Optinal),i am passing data related to that perticular columns.


Thanking you
Bharani Krishna

 
Can procedure with default value (for example NULL) for parameters. Check in the procedure if is null and go on. The syntax for creating stored procedures is
create procedure xxx(parameters types)
as
begin
....code here
end John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top