*
* If a character fields is used as a number field, it will not sort properly as
* "200" comes before "5" with string sorting. This function converts all values
* such that values that are entirely numeric will sort correctly and before
* values that contain other characters.
*
*/
CREATE FUNCTION CharToNumber(@MyValue varchar(15)) RETURNS char(15) AS
BEGIN
IF ISNUMERIC(@MyValue) = 1
begin
DECLARE @MyValLength int
SET @MyValLength = len(@MyValue)
IF @MyValLength > 15
SET @MyValue = left(@MyValue,15)
ELSE IF @MyValLength < 15
SET @MyValue = space(15-@MyValLength) + @MyValue
END
RETURN @MyValue
END
GO
Subscribe to:
Post Comments (Atom)
How to upload app to macOS
1. Open Terminal Press Cmd (⌘) + Space , type Terminal , and hit Enter . 2. Navigate to Your Build Output Directory Your .app file is likel...
-
Troubleshooting steps: Explicitly set LineBreakMode to WordWrap in XAML or code Verify label's HorizontalOptions and VerticalOptio...
-
Blazor would be great if: You want real-time updates as users input their cards You need rich client-side interactivity without writing J...
-
1. Open Terminal Press Cmd (⌘) + Space , type Terminal , and hit Enter . 2. Navigate to Your Build Output Directory Your .app file is likel...
No comments:
Post a Comment