Help to a begginer
I am trying to pass the results of a SELECT LEN to a variable and then display the results of the variable, but I must have the code wrong as an example:
USE AdventureWorks;
GO
DECLARE @varLen int
SET @varlen = SELECT LEN(FirstName)
SELECT @varLen
FROM Person.Contact
GO
Any help is appreciated since I intent to use the results of @varLen in a string.
Thanks to all in advance
I am trying to pass the results of a SELECT LEN to a variable and then display the results of the variable, but I must have the code wrong as an example:
USE AdventureWorks;
GO
DECLARE @varLen int
SET @varlen = SELECT LEN(FirstName)
SELECT @varLen
FROM Person.Contact
GO
Any help is appreciated since I intent to use the results of @varLen in a string.
Thanks to all in advance