Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning just partial part of field
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01353360
Message ID:
01353371
Vues:
16
DECLARE @str varchar(50)
SET @str = 'SFM-ADM-01MAIN # KIRK.KELLY'
SELECT LEFT(@str, CHARINDEX(' #', @str)-1) 
>We have a field in the database populated with the Workstation # UserID. In SQL Server, I need to pull back just the workstation part of the field. In VFP I would use the at() function to get the starting location of the #, but I'm not sure how to do that in SQL Server.
>
>
>Sample Field value: SFM-ADM-01MAIN # KIRK.KELLY
>
>Thanks
>
>Kirk
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform