infinitizon
MIS
Ok, I dont know How to explain this but I hope someone will understand.
I have a table called intGeneratorTable like this
ForJobs ForVisitors
24 NULL
Now I want to create a function like so:
CREATE FUNCTION [dbo].[GetForJobs](
@strFieldName varchar(255),
@strTableName varchar(255)
)
returns int
AS
BEGIN
return SELECT @strFieldName FROM @strTableName
END
So that I can call the function like so
select [dbo].[GetForJobs]('ForJobs', 'intGeneratorTable')
But it is not working.
People say it can be done but not like that but no one has giving me any working solution.
I need help
____________________
Men put up a strong face just to cover their weaknesses...good!
But a smile makes them live longer....
Which would you choose?
Think about it.
I have a table called intGeneratorTable like this
ForJobs ForVisitors
24 NULL
Now I want to create a function like so:
CREATE FUNCTION [dbo].[GetForJobs](
@strFieldName varchar(255),
@strTableName varchar(255)
)
returns int
AS
BEGIN
return SELECT @strFieldName FROM @strTableName
END
So that I can call the function like so
select [dbo].[GetForJobs]('ForJobs', 'intGeneratorTable')
But it is not working.
People say it can be done but not like that but no one has giving me any working solution.
I need help
____________________
Men put up a strong face just to cover their weaknesses...good!
But a smile makes them live longer....
Which would you choose?
Think about it.