lovasoa commented on code in PR #1490:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1490#discussion_r1825905820


##########
tests/sqlparser_mssql.rs:
##########
@@ -570,6 +570,41 @@ fn parse_substring_in_select() {
     }
 }
 
+#[test]
+fn parse_mssql_execute_stored_procedure() {
+    let expected = Statement::Execute {
+        name: ObjectName(vec![
+            Ident {
+                value: "my_schema".to_string(),
+                quote_style: None,
+            },
+            Ident {
+                value: "my_stored_procedure".to_string(),
+                quote_style: None,
+            },
+        ]),
+        parameters: vec![
+            Expr::Value(Value::NationalStringLiteral("param1".to_string())),
+            Expr::Value(Value::NationalStringLiteral("param2".to_string())),
+        ],
+        has_parentheses: false,
+        using: vec![],
+    };
+    assert_eq!(
+        ms().verified_stmt("EXECUTE my_schema.my_stored_procedure N'param1', 
N'param2'"),
+        expected
+    );
+    assert_eq!(
+        Parser::parse_sql(
+            &MsSqlDialect {},
+            "EXEC my_schema.my_stored_procedure N'param1', N'param2';"
+        )

Review Comment:
   Indeed that's better. I changed it. Thanks !



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to