-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix inconsistent formatting issue in convert function from money to v…
…archar Signed-off-by: Rohit Bhagat <[email protected]>
- Loading branch information
Rohit Bhagat
committed
Jan 1, 2025
1 parent
40cc725
commit 2cc8918
Showing
50 changed files
with
484 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
test/JDBC/expected/test_conv_money_to_varchar-vu-cleanup.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
DROP VIEW test_conv_string_to_date_v1 | ||
GO | ||
|
||
DROP PROCEDURE test_conv_string_to_date_p1 | ||
GO | ||
|
||
DROP FUNCTION test_conv_string_to_date_f1 | ||
GO | ||
|
||
DROP TABLE test_conv_money_to_varchar_t1 | ||
GO |
39 changes: 39 additions & 0 deletions
39
test/JDBC/expected/test_conv_money_to_varchar-vu-prepare.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
CREATE TABLE test_conv_money_to_varchar_t1(val money) | ||
GO | ||
|
||
INSERT INTO test_conv_money_to_varchar_t1 VALUES (1234), (0), (123.12), (0.12456) | ||
GO | ||
~~ROW COUNT: 4~~ | ||
|
||
|
||
CREATE VIEW test_conv_string_to_date_v1 as ( | ||
SELECT val, | ||
val_convert = '$' + CONVERT(VARCHAR, val) , | ||
val_convert_style_0 = '$' + CONVERT(VARCHAR, val, 0), | ||
val_convert_style_1 = '$' + CONVERT(VARCHAR, val, 1), | ||
val_convert_style_2 = '$' + CONVERT(VARCHAR, val, 2) | ||
FROM test_conv_money_to_varchar_t1 | ||
); | ||
GO | ||
|
||
CREATE PROCEDURE test_conv_string_to_date_p1 as ( | ||
SELECT val, | ||
val_convert = '$' + CONVERT(VARCHAR, val) , | ||
val_convert_style_0 = '$' + CONVERT(VARCHAR, val, 0), | ||
val_convert_style_1 = '$' + CONVERT(VARCHAR, val, 1), | ||
val_convert_style_2 = '$' + CONVERT(VARCHAR, val, 2) | ||
FROM test_conv_money_to_varchar_t1 | ||
); | ||
GO | ||
|
||
CREATE FUNCTION test_conv_string_to_date_f1() | ||
RETURNS TABLE AS | ||
RETURN ( | ||
SELECT val, | ||
val_convert = '$' + CONVERT(VARCHAR, val) , | ||
val_convert_style_0 = '$' + CONVERT(VARCHAR, val, 0), | ||
val_convert_style_1 = '$' + CONVERT(VARCHAR, val, 1), | ||
val_convert_style_2 = '$' + CONVERT(VARCHAR, val, 2) | ||
FROM test_conv_money_to_varchar_t1 | ||
); | ||
GO |
Oops, something went wrong.