Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
835 Vistas

Hello,

In the Crm.lead-table I find a column message_ids and I thought this would match with the ids in the mail_message-table, but I find a lot of message_ids that don't exist in mail_message-table.

So my question is to which field does message_ids in crm.lead relate?

Thanks in advance!


Avatar
Descartar
Autor Mejor respuesta

After investigating further I've found out that the id's aren't actually missing, but that my query just isn't loading all rows.


I'm pulling data from system-DSN into PowerQuery with the following query:

= Odbc.Query("dsn=PEO-OdooLive", "SELECT * FROM mail_message")

Eventough I cleary select all, it's not loading all the rows.

With the above query I get only 4592 rows with highest id = 7081

 

However, when I change the query to:

= Odbc.Query("dsn=PEO-OdooLive", "SELECT * FROM mail_message WHERE [id] > 10000")

I get 4861 different rows with lowest id = 10010 and highest id = 15825

 

= Odbc.Query("dsn=PEO-OdooLive", "SELECT * FROM mail_message WHERE [id] > 7081 and <= 10000")

I get 1579 different rows with lowest id = 7082 and highest id = 10000

 

I'm really puzzled as to why this is happening and the only solution I can think of is to split my query into id-ranges, but since the highest id I've found is 261145 and I get about 4500-5000 rows with one query, it would be quite a hassle and not a sustainable solution, since the table will keep growing.

 

Does anybody have an idea to what might be causing this?


Avatar
Descartar