Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. CKG Edit ====== Control SQL Queries to Identify Problems ====== This section is to record queries that might be useful to find, analyze, and fix potential errors in the database. ===== Account Reconciliation Queries ===== * [[control_sql_-_query_to_breakdown_reconciliation_entries|Control SQL - Query to Breakdown Reconciliation Entries]] * [[control_sql_-_queries_to_search_for_reconciliation_problems|Control SQL - Queries to Search for Reconciliation Problems]] ===== Artwork Approval Queries ===== * [[control_sql_-_move_all_open_artwork_groups_to_produced|Control SQL - Move all Open Artwork Groups to Produced]] ===== Credit Card Processing Queries ===== * [[control_sql_-_identify_credit_cards_processed_but_not_saved|Control SQL - Identify Credit Cards Processed but Not Saved]] ===== Customer Queries ===== * [[control_sql_-_change_prospect_to_client|Control SQL - Change Prospect to Client]] * [[control_sql_-_duplicate_companies|Control SQL - Duplicate Companies]] * [[control_sql_-_customer_write_offs|Control SQL - Customer Write Offs]] ===== GL Account Queries ===== * [[control_sql_-_direct_cost_from_bills_details|Control SQL - Direct Cost from Bills Details]] * [[control_sql_-_check_that_gl_accounts_are_under_valid_categories|Control SQL - Check That GL Accounts are Under Valid Categories]] * [[control_sql_-_shows_payments_that_went_into_each_deposit|Control SQL - Shows Payments That Went Into Each Deposit]] * [[control_sql_-_shows_amounts_from_undeposited_funds_by_division_for_each_deposit|Control SQL - Shows Amounts from Undeposited Funds by Division for Each Deposit]] * [[control_sql_-_find_off-of-balance_sheet_issues|Control SQL - Find Off-of-Balance Sheet Issues]] * [[control_sql_-_invalid_gl_account_error|Control SQL - Invalid GL Account Error]] * [[control_sql_-_identify_doubled_gl_from_bug_with_posting_payment_and_sale_simultaneously|Control SQL - Identify Doubled GL from Bug with Posting Payment and Sale Simultaneously]] ===== GL Queries ===== * GL Out of Balance * [[control_sql_-_find_gl_out_of_balances|All GL Out of Balances]] * [[control_sql_-_gl_out_of_balance_by_order|GL Out of Balance By Order]] * [[control_sql_-_find_an_order_number_with_the_transaction_id|Find an Order Number with the TransactionID]] * [[control_sql_-_balance_sheet_or_journal_out_of_balance|Balance Sheet or Journal Out of Balance]] * [[control_sql_-_plug_all_journal_out_of_balance_entries|Plug all Journal OOB Entries]] * [[control_sql_-_plug_all_ar_balances_for_orders_not_in_sale|Plug all AR Balances for Orders Not In Sale]] * [[control_sql_-_gl_balance_integrity_checks|GL Balance Integrity Check Summary]] * [[control_sql_-_customer_credit_balance_integrity_check|Customer Credit Balance Integrity Check]] * [[control_sql_-_vendor_credit_balance_integrity_check|Vendor Credit Balance Integrity Check]] * [[control_sql_-_order_deposit_integrity_check|Order Deposit Integrity Check]] * [[control_sql_-_ar_integrity_check|A/R Integrity Check]] * [[control_sql_-_ap_integrity_check|A/P Integrity Check]] * [[control_sql_-_wip_and_built_integrity_check|WIP and Built Integrity Check]] * [[control_sql_-_invalid_gl_entries|Invalid GL Entries]] * [[control_sql_-_payments_gl_integrity_check|Payments GL Integrity Check]] * [[control_sql_-_resequence_the_gl_table|Resequence the GL Table]] ===== Identify Refresh Problem Queries ===== * [[control_sql_-_log_records_saved_without_changing_seqid|Control SQL - Log Records Saved without Changing SeqID]] * [[control_sql_-_log_database_record_locks_every_few_minutes|Control SQL - Log Database Record Locks Every Few Minutes]] ===== Inventory Queries ===== * [[control_sql_-_invalid_gl_account_error]] to fix Computed GL Accounts not properly converted to Off-Balance Sheet * [[control_sql_-_find_large_variances_in_inventorylog_unit_costs|Control SQL - Find Larger Variances in Inventory Log Unit Costs]] * [[control_sql_-_fill_in_zero_unit_costs_in_inventory_log|Control SQL - Fill in Zero Unit Cost in Inventory Log]] * [[control_sql_-_create_inventorylog_and_gl_entries_to_balance_historical_inventory|Control SQL - Create Inventory Log and GL Entries to Balance Historical Inventory]] * [[control_sql_-_reclassify_historic_inventory_adjustments_to_the_parts_expense_account|Control SQL - Reclassify Historic Inventory Adjustments to the Part Expense Account]] * [[control_sql_-_add_function_to_compare_inventory_totals_to_log_records|Control SQL - Add Function to Compare Inventory Totals to Log Records]] * [[control_sql_-_create_inventorylog_records_so_they_match_inventory|Control SQL - Create Inventory Log Records so They Match Inventory]] * [[control_sql_-_fix_inventorylog_to_point_to_proper_inventory_record|Control SQL - Fix Inventory Log to Point to Proper Inventory Record]] * [[control_sql_-_adjust_reserved_inventory_levels_to_match_orders|Control SQL - Adjust Reserved Inventory Levels to Match Orders]] * [[control_sql_-_look_for_gl_adjustment_entries_on_parts_not_inventoried|Control SQL - Look for GL Adjustments Entries on Part not Inventoried]] * [[control_sql_-_check_inventory_on-order_levels_v_ordered_pos|Control SQL - Check Inventory On-Order Levels vs Ordered POS]] * [[control_sql_-_check_all_inventory_levels_v_all_inventory_logs]] * [[control_sql_-_fix_incorrect_gl_inventory_and_cost_entries_when_wip_orders_voided]] * [[control_sql_-_identify_manual_postings_to_inventory_gl_accounts]] * [[control_sql_-_identify_missing_inventory_entries]] ===== Make Deposit Queries ===== * [[control_sql_-_query_to_fix_gl_entries_without_depositjournalid]] * [[control_sql_-_identify_imbalances_in_make_deposit_entries]] * [[control_sql_-_identify_deposits_in_a_make_deposit_batch]] ===== Order Queries ===== * [[control_sql_-_historical_wip_report]] * [[control_sql_-_historical_built_report]] * [[control_sql_-_historical_deposits_report]] * [[control_sql_-_historical_customer_credit_report]] * [[control_sql_-_shipment_items]] * [[control_sql_-_find_negative_balance_due_orders]] ===== Other Queries ===== * [[control_sql_-_version_history]] * [[control_sql_-_recently_modified_records]] * [[control_sql_-_sql_server_processes]] * [[control_sql_-_sql_server_table_indexes]] * [[control_sql_-_sql_server_primary_keys]] * [[control_sql_-_sql_server_foreign_keys]] * [[control_sql_-_sql_server_expensive_queries]] * [[control_sql_-_query_to_determine_oob_dataset_version]] * [[control_sql_-_query_for_evaluation_days_left_on_sql]]