Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is it possible
Message
De
12/02/2013 15:15:03
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Desktop
Divers
Thread ID:
01565799
Message ID:
01565809
Vues:
36
Oh dwurp! (headdesking).

I was so concerned with getting the expression right that I didn't even notice I'd forgotten that.

Thanks Sergey

>You forgot to enclose expression in parenthesizes and specify column list
>
>>Ok, here's what I'm trying (I start with the simplest and add), the simplest
>>
>>
>>Declare @TB int
>>Select @TB = TypeB from ExpFrameWork where Category = '40'
>>print @TB    && prints 5 - like I'd expect it to.
>>
>>Select top @TB from ExpMaster where Category = '40' and Difflet = 'B'    
>>*The above has the red line under it and says Incorrect syntax near @TB.  Expecting REAL, INTEGER, NUMERIC or '('
>>
>>
>>If I replace @TB with (@TB) it gives me 'Incorrect syntax near from'
>>Perhaps 'expression' isn't meaning what I think it means?
>>
>>
>>>You can use expression in top clause
>>>
>>>SELECT TOP (expression) ...
>>>
>>>
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform