Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
One more set of eyes needed
Message
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00761101
Message ID:
00761246
Vues:
42
Thanks a lot.
declare @PassedCategory char(1)
set @PassedCategory = 'L'
declare @CategoryPrice smallmoney
select @CategoryPrice = Price from PriceInfo where CreditCategory = @PassedCategory
select 'CT' as State, @CategoryPrice as Price, CreditType, county, 
registry, city, address, def1FName, Def1LName 
from CTCredit..CreditInfo where CredID in 
(select CredID from CartDetail 
inner Join CartContent on 
CartDetail.CartContentID = CartContent.CartContentID 
and CartContent.State = 'CT' and CartContent.CreditCategory = @PassedCategory )
And I also want to have field list to be a variable. Will try select @FieldList in a sec

>It should be
select @CategoryPrice = Price from PriceInfo where CreditCategory = @PassedCategory
>
>>
>>How can I do:
>>
>>declare @CategoryPrice smallmoney
>>select @CategoryPrice = select Price from PriceInfo where CreditCategory = @PassedCategory
>>
>>
>>select 'CT' as State, @CategoryPrice as Price, CreditType, county,
>>registry, city, address, def1FName, Def1LName
>>from CTCredit..CreditInfo where CredID in
>>(select CredID from CartDetail
>>inner Join CartContent on
>>CartDetail.CartContentID = CartContent.CartContentID
>>and CartContent.State = 'CT' and CartContent.CreditCategory = @PassedCategory )
>>
>>Is it right?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform