Process is
sp_generate_inserts users, @from='from users where user_no = ? -- this doesn't work due to schemas sp_generate_inserts transactor, @from='from transactor where guid = ''?'''
select * from [warehouse].[user_shift] select * from [warehouse].[shift_hours] select * from [dbo].[x_shift]
select * from users where users_id like '?%'
Example tickets : https://advancedretail.freshdesk.com/a/tickets/134858 https://advancedretail.freshdesk.com/a/tickets/137059
begin transaction set IDENTITY_INSERT users on insert into users ([user_no], [datetime_created], [datetime_updated], [user_no_updated], [user_no_created], [branch_no], [users_id], [password], [authority], [default_whse_no], [currency_default], [barcode], [terminal_id], [start_date], [expiry_date], [department], [email_address], [mobile], [secret_phrase], [username], [initial_url], [guid_trctr], [auto_logon], [password_validity], [password_hash], [password_salt], [fingerprint1], [fingerprint1_position], [fingerprint2], [fingerprint2_position]) values (5712,'2019-11-28 12:05:46.110','2019-11-28 12:05:46.110',5598,5599,1,'Garcia J','GJ',8,1,1,'00468367',0,NULL,NULL,NULL,NULL,NULL,NULL,'Garcia J',NULL,'8FF41FC1-BA19-491C-8BE7-916D6E1C8D5C',0,0,0x16BBF65702D632464F492FAAB767E0B66FC84D0B357B92EA2FF80CA7656F00B2,0x21F6630A1E5EC709DEB8E2EE5CBB,NULL,NULL,NULL,NULL) insert into users ([user_no], [datetime_created], [datetime_updated], [user_no_updated], [user_no_created], [branch_no], [users_id], [password], [authority], [default_whse_no], [currency_default], [barcode], [terminal_id], [start_date], [expiry_date], [department], [email_address], [mobile], [secret_phrase], [username], [initial_url], [guid_trctr], [auto_logon], [password_validity], [password_hash], [password_salt], [fingerprint1], [fingerprint1_position], [fingerprint2], [fingerprint2_position]) values (5713,'2019-11-28 12:07:33.870','2019-11-28 12:07:33.870',5598,5598,1,'Karczewski I','IK',8,1,1,'00468374',0,NULL,NULL,NULL,NULL,NULL,NULL,'Karczewski I',NULL,'C84F1C50-7DC0-4A45-8D61-EC761F3C3509',0,0,0x3824EE1D167B4C0361AFD0400B61A6D450E4852139C3A837FF14DD5395BD303F,0xA99348F2344F57EEC7C3189C,NULL,NULL,NULL,NULL) set IDENTITY_INSERT users off insert into [warehouse].[user_shift] (user_no, shift_id) values (5711, 2) INSERT INTO [transactor] ([stamp],[date_time],[terminal_id],[user_no],[guid],[reg_no],[is_customer],[is_supplier],[is_publisher],[is_author],[company_name],[surname],[title],[first_name],[initial],[house_name],[house_number],[street],[district],[town],[county],[country],[postcode],[do_not_mail],[home_tel],[work_tel],[work_ext],[mobile],[fax],[email],[website],[cust_type],[source_code],[list_no],[currency_no],[credit_limit],[term_no_cust],[data_protect],[alert_flag],[alert_notes],[cust_class],[trade_card],[vat_reg],[country_code],[date_added],[lead_time],[term_no_supp],[min_order_val],[status],[first_purchase],[business_type],[hint],[password],[area],[rep],[cust_category],[guid_ho],[ho_get_inv],[ho_credit],[mail_sort],[no_cust_orders],[non_vatable],[deliv_instructions],[user_cust_code],[user_supp_code],[archive],[notes],[home_branch_no],[deliv_area],[supplier_group],[supp_acc_no],[supp_disc_dft],[interest],[min_order_qty],[min_order_method],[below_min_deliv_charge],[min_deliv_pallets],[collection_charge],[company_name_short],[company_account_name],[settlement_discount],[settlement_currency],[settlement_payment_type],[requires_po],[linked_document],[no_days_cover],[day_of_week_gen_po],[min_order_weight],[ex_vat],[transactor_type]) VALUES(DEFAULT,'Nov 28 2019 12:05:46:110PM',0,5598,'8FF41FC1-BA19-491C-8BE7-916D6E1C8D5C ',137,1,0,0,0,NULL,'Garcia J Staff)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,1,0,NULL,NULL,'Nov 28 2019 12:06:00:000PM',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,0,0,NULL,NULL,NULL,0,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,0) commit transaction rollback transaction select * from users where password in ('kk') sp_generate_inserts users, @owner = 'dbo', @frOM = 'FROM dbo.users WHERE user_no = 5739', @ommit_images = 1, @cols_to_exclude="'password_hash','password_salt','last_used','pos_password_reset','pos_password_hash','legacy_code'"