View Single Post

   
  #5 (permalink)  
Old 02-27-2008, 05:22 AM
Tonkuma
 
Posts: n/a
Default Re: Want to write a standard user defined function in the db2

Sorry, I couldn't understand well what do you want to do with db_fun().


You wrote(I capitalized some words.)
> here db_fun is the function that i want to write.


> The STUDENT TABLE is:-
> roll name
> 1 'A'
> 2 'B'
> 3 'C'


This seems the result of following simple SQL and not the result of
db_fun().
select roll, name from the student

Later, you wrote
> I used the column name as a parameter of the function. and the
> db_fun () will return the NAME OF THE TABLE corresponding to the roll.


>From this statement, I guess that you want following result.

(and I guess "corresponding to the roll" means "including a column
named 'roll')

----------------------------------
ROLL Table name
1 A_TAB
2 B_TAB
3 XYZ
.....

Is it right?

Reply With Quote