-
Notifications
You must be signed in to change notification settings - Fork 567
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a99fa08
commit f3e60ce
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
.../de.metas.fresh/de.metas.fresh.base/src/main/sql/postgresql/ddl/functions/isEUCountry.sql
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,21 @@ | ||
CREATE OR REPLACE FUNCTION isEUCountry(IN p_C_Country_ID numeric) | ||
RETURNS char(1) AS | ||
$BODY$ | ||
DECLARE | ||
|
||
isEUCountry char(1); | ||
|
||
BEGIN | ||
|
||
isEUCountry := (select case when (count(1) > 0) then 'Y' else 'N' end | ||
from C_CountryArea_Assign ca | ||
where ca.C_CountryArea_ID = 540000 -- European Union | ||
and ca.C_Country_ID = p_C_Country_ID); | ||
|
||
IF isEUCountry IS NOT NUll THEN | ||
RETURN isEUCountry; | ||
ELSE | ||
RETURN 'N'; | ||
END IF; | ||
END; | ||
$BODY$ LANGUAGE plpgsql; |
22 changes: 22 additions & 0 deletions
22
...eports/5575670_sys_gh10500_AddFunctionsAndViewsForCreatingIntra_InterCommunityReports.sql
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