Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
OL-92
Starting Member
1 Post |
Posted - 2010-07-01 : 06:08:10
|
J'ai réalisé une requête SQL sous reporting services. Celle-ci est "énorme" parce qu'elle reprend plusieurs fois le même code pour des colonnes différentes.Afin de simplifier la maintenance, je souhaite regrouper le code dans une fonction SQL qui serait appellée plusieurs fois par le SELECTJ'ai tenté d'essayer cette fonctionnalité avec une fonction simple du type :CREATE FUNCTION [dbo].[essai] (@entree)RETURNS int ASBEGIN return entreeENDGOLors de l'execution de la requête, j'ai le message suivant : Impossible de trouver la colonne "dbo" ou la fonction utilisateur ou l'agrégat "dbo.essai".Il semble donc que reporting services n'identifie pas cette fonction que j'ai placé dans les propriétés du rapport, onglet "Code".Ou mettre la fonction pour qu'elle soit reconnue ?Comment utiliser ces fonctions SQL dans reproting services ?Vous remerciant, |
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2010-07-01 : 06:17:23
|
I didn't understand anything whatsoever of what you wrote, you might not have noticed (...) but this forum is in english. There is however a syntax error in your function:CREATE FUNCTION [dbo].[essai] (@entree varchar(50))- LumbagoMy blog (yes, I have a blog now! just not that much content yet) -> www.thefirstsql.com |
 |
|
yosiasz
Master Smack Fu Yak Hacker
1635 Posts |
Posted - 2010-07-01 : 13:10:56
|
que veux tu dire par "n'identifie pas cette fonction que j'ai placé dans les propriétés du rapport" es-tu sure que tu as crée cette fonction. Si oui ou?<><><><><><><><><><><><><><><><><><><><><><><><><>If you don't have the passion to help people, you have no passion |
 |
|
X002548
Not Just a Number
15586 Posts |
Posted - 2010-07-01 : 13:26:19
|
"I have an SQL query reporting services .""This is \"huge \" because it takes several times the same code for different columns.""To simplify maintenance, I would like to consolidate the code into a SQL function that is called several times""Once the SELECT\r\nI attempted to try this feature with a simple function like:""CREATE FUNCTION [dbo ]. [ test] (@ input )RETURNS int ASBEGINreturn entryENDGO""During the execution of the request, I see the following""Can not find column \" dbo \" or the user function or aggregate \" dbo.essai .""It seems that reporting services does not identify this feature that I placed in the properties of the report , \"Code\" tab .""Or put the function to make it recognized ?How to use these functions in SQL reproting services ?Thanking you ,"Brett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxAdd yourself!http://www.frappr.com/sqlteam |
 |
|
|
|
|
|
|