Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On 06/10/2011 09:58, Alexander Thurgood wrote:
Have you tried identifying ANAGRU.CATMER with an alias in your SELECT
statement ?

Alternatively, including CODPA (with or without an ALIAS) in your SELECT
statement ?

I seem to recall from somewhere (probably my increasingly deficient
memory) that the fields in your WHERE statement also have to be
mentioned in the SELECT statement if you are using functions.

thanks for the replies to both of you!

i have had to reduce the where with "AND LEFT( FILPAG.CODPA, 2)='..'".
that did the trick :)

that did the trick, my full query is now:
SELECT TORD.NUMORD AS ORDINE, CONCAT( CONCAT( CONCAT( CONCAT( CONCAT( TORD.GGORD, '/' ), TORD.MMORD ), '/' ), '20' ), TORD.AAORD ) AS DATAORDINE, CONCAT( CONCAT( CONCAT( CONCAT( CONCAT( TORD.DCORGG, '/' ), TORD.DCORMM ), '/' ), '20' ), TORD.DCORAA ) AS DATACONSEGNA, ANACLI.CODCLI AS CODICECLIENTE, ANACLI.RAGSOC AS RAGIONESOCIALE, ANARTI.CATMER AS CM, FILPAG.DESPAG AS DESCRIZIONECM, ANARTI.GRUPPO AS GR, ANAGRU.DESGRU AS DESCRIZIONEGR, ANARTI.CODART AS CODICEARTICOLO, ANARTI.DESART AS DESCRIZIONEARTICOLO, ANARTI.UM AS UM, DORD.QTAORD AS QUANTITAORDINATA, DORD.QTASPE AS QUANTITASPEDITA, ANAMAG.GIAC1 AS GIACENZA, DORD.PREORD AS PREZZOORDINE, DORD.SC0ORD AS SCONTOORDINE, ( DORD.PREORD - DORD.PREORD / 100 * DORD.SC0ORD ) * DORD.QTAORD AS VALOREORDINE FROM INFODB.ANARTI AS ANARTI, INF2DB.DORD AS DORD, INF2DB.TORD AS TORD, INFODB.ANACLI AS ANACLI, INFODB.ANAGRU AS ANAGRU, INFODB.ANAMAG AS ANAMAG, INFODB.FILPAG AS FILPAG WHERE ANARTI.CODART = DORD.CODART AND DORD.NUMORD = TORD.NUMORD AND TORD.CODCLI = ANACLI.CODCLI AND ANAGRU.CODGRU = ANARTI.GRUPPO AND ANAMAG.CODART = ANARTI.CODART AND TORD.TAGORD = 0 AND ANAMAG.CODMAG = 1 AND LEFT( FILPAG.CODPA, 2)='..' AND ANAGRU.CATMER = SUBSTRING(FILPAG.CODPA, 3, 2)

anyway thanks!
i will look to the other mail i've sent to check how to delete base autocorrection :)

bye
d.

--
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.