Le 04/10/11 17:00, Daniele Palumbo a écrit :
Hi Daniele,
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.CODART AS CODICEARTICOLO, ANARTI.DESART AS DESCRIZIONEARTICOLO,
ANARTI.UM AS UM, DORD.QTAORD AS QUANTITAORDINATA, DORD.QTASPE,
DORD.PREORD AS PREZZO, DORD.SC0ORD, ANARTI.PREART AS LISTINO,
ANAGRU.CODGRU, ANAGRU.DESGRU, ANAGRU.CATMER, FILPAG.DESPAG FROM
INFODB.ANARTI AS ANARTI, INF2DB.DORD AS DORD, INF2DB.TORD AS TORD,
INFODB.ANACLI AS ANACLI, INFODB.ANAGRU AS ANAGRU, INFODB.FILPAG AS
FILPAG WHERE ANARTI.CODART = DORD.CODART AND DORD.NUMORD = TORD.NUMORD
AND TORD.CODCLI = ANACLI.CODCLI AND ANARTI.GRUPPO = ANAGRU.CODGRU AND
ANAGRU.CATMER = SUBSTRING(FILPAG.CODPA, 3, 4) AND TORD.TAGORD = 0
give me error
(with isql: [ISQL]ERROR: Could not SQLPrepare)
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.
Alex
instead
SELECT SUBSTRING ( CODPA, 3, 4 ) AS CM, FILPAG.DESPAG AS DESCRIZIONE,
ANAGRU.CODGRU, ANAGRU.DESGRU FROM INFODB.ANAGRU AS ANAGRU, INFODB.FILPAG
AS FILPAG WHERE ANAGRU.CATMER = SUBSTRING ( FILPAG.CODPA, 3, 4 ) AND
FILPAG.CODPA LIKE '..%'
does work.
where is the trick? :)
thanks,
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.