Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Having on calculated field
Message
De
17/07/2011 20:24:16
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01518229
Message ID:
01518411
Vues:
50
>>>>>The error is very explicit. You're missing THEN keyword before inner case starts.
>>>>
>>>>thank you
>>>
>>>You're welcome. Hopefully you're close to the solution now.
>>
>>
>>Almost :)
>>
>>Now, how do I use the function? I'm calling it like this:
>>
>>
SELECT dbo.GetClaimItemStatus(clm_forwarded, cit_received, (select com_overduedays
>>															from companies
>>																inner join Clients on cli_comfk = com_pk
>>																inner join Claims subclaims on clm_clifk = cli_pk
>>																where subclaims.clm_pk = claims.clm_pk)) as statusfk
>>	from ClaimItems inner join Claims on cit_clmfk = clm_pk
>>
>>and getting this error:
>>
>>
>>Msg 4121, Level 16, State 1, Line 1.
>>Cannot find either column "dbo" or the user-defined function or aggregate "dbo.GetClaimItemStatus", or the name is ambiguous.
>
>I posted a way to call this function in my previous message.
>
>For table valued function you need to use CROSS APPLY, e.g.
>
>select T.Fields, F.Fields from myTable T CROSS APPLY dbo.InlineTableValuedFunction (T.Field1, T.Field2) F

Thanks again, I must have missed that.
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform