def insert_queries(conn, category_id, severity_id, queries):
    if (is_conn(conn) and is_int(category_id) and is_int(severity_id) and (len(queries) > 0)):
        cursor = conn.cursor()
        cursor.execute('SET IDENTITY_INSERT dbo.CategoryForQuery ON')
        conn.commit()
        i = 0
        for query in queries:
            query_id = query[0]
            percentage = round(((i * 100) / len(queries)), 0)
            print('Inserting Query', query_id, '...', percentage, '%')
            cursor.execute('INSERT INTO dbo.CategoryForQuery                 (Id, QueryId,CategoryId) VALUES                ((SELECT max(Id)+1 FROM dbo.CategoryForQuery), ?,?)', (query_id, category_id))
            conn.commit()
            update_customized_queries(conn, category_id, severity_id, query_id)
            i = (i + 1)
        cursor.execute('SET IDENTITY_INSERT dbo.CategoryForQuery OFF')
        conn.commit()
    else:
        raise AttributeError('Connection object or Category ID                 was not provided')
def insert_queries(conn, category_id, severity_id, queries):
    if (is_conn(conn) and is_int(category_id) and is_int(severity_id) and (len(queries) > 0)):
        cursor = conn.cursor()
        cursor.execute('SET IDENTITY_INSERT dbo.CategoryForQuery ON')
        conn.commit()
        i = 0
        for query in queries:
            query_id = query[0]
            percentage = round(((i * 100) / len(queries)), 0)
            print('Inserting Query', query_id, '...', percentage, '%')
            cursor.execute('INSERT INTO dbo.CategoryForQuery                 (Id, QueryId,CategoryId) VALUES                ((SELECT max(Id)+1 FROM dbo.CategoryForQuery), ?,?)', (query_id, category_id))
            conn.commit()
            update_customized_queries(conn, category_id, severity_id, query_id)
            i = (i + 1)
        cursor.execute('SET IDENTITY_INSERT dbo.CategoryForQuery OFF')
        conn.commit()
    else:
        raise AttributeError('Connection object or Category ID                 was not provided')