April 11, 2002 at 3:19 pm
Hi,
I'm using the SQL Server 200 and I have a little problem, I need to
create some procedure for get the information of distincts tables, i need
to save this information in a TABLE variable for its processing. For
this purpose, I'm using User-defined Functions, but i can't to use Inline
table-valued functions because i can't to add logical to this function
type, and I can't Multi-statement table-valued functions because i
don't know what is the result table structure. I don't like to use
temporally tables.
Thanks for yours comments.
Deusdit Correa Cornejo
----------------------
Br. Computer Science
Microsoft Certified Database Administrator
Analyst Programmer
----------------------
Deusdit Correa Cornejo
----------------------
Br. Computer Science
Microsoft Certified Database Administrator
Analyst Programmer
----------------------
April 11, 2002 at 3:47 pm
April 11, 2002 at 4:17 pm
Well, i want to use metadata about some tables, so i need a procedure for construct the table from the metadata.
For example, i have the table name and column name in a table, i need construct a SELECT for this table, but i need save the SELECT results in a TABLE variable for to use like a normal table.
Deusdit Correa Cornejo
----------------------
Br. Computer Science
Microsoft Certified Database Administrator
Analyst Programmer
----------------------
Deusdit Correa Cornejo
----------------------
Br. Computer Science
Microsoft Certified Database Administrator
Analyst Programmer
----------------------
April 11, 2002 at 5:25 pm
A example, I have the follow Metadata table:
MetadataKey, TableName, ColumnName
1, 'ORGANIZATION', 'ORGANIZATION_KEY'
2, 'ORGANIZATION', 'NAME'
3, 'ORGANIZATION', 'MAX_RECORD_TIME'
The table organization exists in my database.
I need create a query for this table from the Metadata table, for example
SELECT ORGANIZATION_KEY, NAME, MAX_RECORD_TIME
FROM ORGANIZATION
Well, i need save the result in a TABLE variable for process in other task (for example in join tables).
So, i can change the query by insert or delete records in Metadata table. This is the reason for that i don't know what is the final structure of query and its results.
Deusdit Correa Cornejo
----------------------
Br. Computer Science
Microsoft Certified Database Administrator
Analyst Programmer
----------------------
Deusdit Correa Cornejo
----------------------
Br. Computer Science
Microsoft Certified Database Administrator
Analyst Programmer
----------------------
April 11, 2002 at 5:46 pm
I hope to explain my problem.
Thanks for your comments.
Deusdit Correa Cornejo
----------------------
Br. Computer Science
Microsoft Certified Database Administrator
Analyst Programmer
----------------------
Deusdit Correa Cornejo
----------------------
Br. Computer Science
Microsoft Certified Database Administrator
Analyst Programmer
----------------------
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy