Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SP returning no records
Message
De
26/11/2012 09:51:32
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01558050
Message ID:
01558062
Vues:
33
>>>You declared
>>>
>>>'cus_LastName  nchar(5)'
>>>
>>>That ways you ALWAYS will have 5 chars. Declare it as nvarchar() instead.
>>>
>>
>>Actually cus_Number is declared as nchar(5), not cus_LastName.
>>
>>If it is declared as nchar(5) in the database and the business rules are that it will always have 5 characters, should I still use nvarchar in the SP?
>
>
>Check your first post:
>
>
>SELECT @paramlist = '@cus_Number   varchar(50),  ------ ?????????????
>                     @cus_LastName  nchar(5)' ------ ?????????????
>
>
>
>Yes, if you want to use LIKE '%somechars%' syntax.

Thanks. I don't have that old code around anymore and my new code has it the correct way, but I'll change it as you suggest.
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