Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table valued inline function syntax
Message
De
03/02/2014 10:16:36
 
 
À
03/02/2014 10:11:56
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2012
Application:
Web
Divers
Thread ID:
01592983
Message ID:
01592995
Vues:
35
This is unfortunate. As mentioned, I am having to convert from Oracle DB. Many of the views use this function within the view statement(s), calling different tables and different columns etc.. A procedure wont work for that.

Do you (or does anyone) know of another way to do this??

>Well, first, owe you an apology. Had forgotten this - TVFs (either single line or multiline) can't return dynamic SQL. They go by stricter rules than regular stored procedures. For lack of a better term, they have stricter design-time binding. I thought there was a workaround but apparently there isn't.
>
>You can have a stored procedure that receives all the information and constructs the syntax and result set dynamically. That will work....though you're subject to the rules about the result set and what you can do with it. (If you want to join the results of a proc to another table, you have to redirect the results to a table or temp table)
Thank You

Rollin Burr

Politicians and diapers have one thing in common. They should both be changed regularly, and for the same reason.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform