É uma coisa perigosa, por isso é bom se prevenir.
Tenho lá o filtro em clientes por vendedor.
SELECT a,b,c FROM CLIENTES WHERE VENDEDOR IN ( 8, 10, 12 )
Isso acima deu problema, não trouxe todos os clientes necessários, mas isto abaixo funcionou
SELECT a, b, c, VENDEDOR FROM CLIENTES WHERE VENDEDOR IN ( 8, 10, 12 )
Quando usei ADS LOCAL, simultâneo com Clipper, ele OBRIGAVA que todos os campos estivessem no SELECT.
Ao que parece, o MySQL não obriga, mas...... pode falhar.
Problema com MySQL ****
Moderador: Moderadores
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Problema com MySQL ****
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
-
alxsts
- Colaborador

- Mensagens: 3092
- Registrado em: 12 Ago 2008 15:50
- Localização: São Paulo-SP-Brasil
Problema com MySQL ****
Olá!
Achei muito estranho isto... tem certeza?JoséQuintas escreveu: mas isto abaixo funcionou
SELECT a, b, c, VENDEDOR FROM CLIENTES WHERE VENDEDOR IN ( 8, 10, 12 )
[]´s
Alexandre Santos (AlxSts)
Alexandre Santos (AlxSts)
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Problema com MySQL ****
Também achei.alxsts escreveu:Achei muito estranho isto... tem certeza?
Mas estava com esse problema, comentaram essa dica e ficou resolvido.
A diferença foi apenas acrescentar o campo.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Problema com MySQL ****
pra ser mais exato também alterei outras coisas.
De ( 000008, 000008, 000003,999999 ) pra ( 8, 8, 3, 999999 )
e um espaço depois de IN (...)ORDER
Não lembro se testei cada alteração.
O problema foi: apareciam clientes desses códigos de vendedor, mas alguns ficavam de fora.
E com certeza era com o aplicativo rodando no cliente, não era um novo teste.
De ( 000008, 000008, 000003,999999 ) pra ( 8, 8, 3, 999999 )
e um espaço depois de IN (...)ORDER
Não lembro se testei cada alteração.
O problema foi: apareciam clientes desses códigos de vendedor, mas alguns ficavam de fora.
E com certeza era com o aplicativo rodando no cliente, não era um novo teste.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/