Discussions
Categories
- 17.9K All Categories
- 3.4K Industry Applications
- 3.3K Intelligent Advisor
- 63 Insurance
- 535.7K On-Premises Infrastructure
- 138.1K Analytics Software
- 38.6K Application Development Software
- 5.6K Cloud Platform
- 109.3K Database Software
- 17.5K Enterprise Manager
- 8.8K Hardware
- 71K Infrastructure Software
- 105.2K Integration
- 41.5K Security Software
I have macro with params, but I want to pass some params not all.

sometimes I want to pass only 3 params in macro, how can I do that?
Macro #sync_exception
PARAMS (#SCHEMA_NAME,#MAP_TABLE,#TABLE_NAME,#TABLE_CODE, #KEY1,#KEY2,#KEY3,#KEY4,#KEY5,#KEY6,#KEY7)
BEGIN,
MAP #SCHEMA_NAME.#MAP_TABLE, TARGET CORE_NAT.GG_SYNC_ERR_LOG,
EXCEPTIONSONLY,
INSERTALLRECORDS
COLMAP(
ID = @COLSTAT(NULL),
TABLE_NAME = #TABLE_NAME,
KEY1 = #KEY1,
KEY2 = #KEY2,
KEY3 = #KEY3,
KEY4 = #KEY4,
KEY5 = #KEY5,
KEY6 = #KEY6,
KEY7 = #KEY7,
ERROR_CODE = @GETENV ('LASTERR', 'DBERRNUM'),
ERROR_MSG = @GETENV ('LASTERR', 'DBERRMSG'),
CREATED_DATE = @DATENOW (),
TABLE_CODE = #TABLE_CODE,
ERR_DETAILS = @GETENV ('LASTERR', 'OPTYPE'));
END;
Answers
-
Hi ,
Check the below,
macro #ggexception
params (#source_schema, #table_name, #target_schema, #exception_table)
begin
map #source_schema.#table_name, TARGET #target_schema.#excception_table,
exceptionsonly, insertallrecords
colmap
(usedefaults,
gg_hostname = @getenv('ggenvironment','hostname'),
gg_db_name = @getenv('ggfileheader','dbname'));
end;
Regards,
Veera