, , SQL Server .
Select ' Or DataLength(' + Name + ')<>DataLength(RTrim(' + Name + '))'
From sys.Columns
Where Object_ID=Object_ID('Employees')
And System_Type_ID=167
( , sys.tables, Object_ID !)
, , , , , . .
Create Function Dbo.EndsWithSpaces(@Value Varchar(8000)) Returns Bit
As Begin
Return Case When DataLength(@Value)=DataLength(RTrim(@Value)) Then 0
Else 1 End
End
: Dbo.EndsWithSpaces(Value)=1 , SQL Server Where:
Select ' Or Dbo.EndsWithSpaces(' + Name + ')=1'
From sys.Columns
Where Object_ID=Object_ID('Employees')
And System_Type_ID=167