In my Java program, I need to call a stored procedure called FooBar(null) . The program tries to be independent of the db platform. Some SQL statements are combined programmatically, one of them:
insert into foo_bar (id, user, timestmp) values (1, 'foo', FooBar(null));
It works on Oracle, HSLQDB, MySQL. Now I have to get it working on MSSQL. I created a FooBar function. I enter the database with a user who has the default schema foo .
This statement only works if I put the schema name in front of the function name:
insert into foo_bar (id, user, timestmp) values (1, 'foo', foo.FooBar(null));
If I write to the database, then exec FooBar(null) works without foo. You know how to avoid this foo. in MSSQL?
source share