If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

SQL error when validating

Started by cbyrne, 09 Jun 2014 02:48:41 AM

Previous topic - Next topic

cbyrne

Hello,

I am getting an error message when i am validating the below code.

Does anyone know the correct code i should be using.

select

'*** itasfin  ***' "*** itasfin***",
itasfin.kdecode "kdecode",
itasfin.kdsetcode{002} "kdsetcode{002}",
itasfin.holdtext{003} "holdtext{003}",
itasfin.holdtext{001} "holdtext{001}",
itasfin.kco "kco",
itasfin.kditem "kditem",
itasfin.nbqty "nbqty",

'*** itsuhistory ***' "*** itsuhistory ***",
itsuhistory.kenterdate "kenterdate",
itsuhistory.balance{001} " balance{001}",
itsuhistory.kco "kco",
itsuhistory.kdecode "kdecode",

'*** itasset ***' "*** itasset ***",
itasset.kco "kco",
itasset.kowner "kowner",
itasset.kstatus  "kstatus",
itasset.kditem "kditem",
itasset.kdecode "kdecode",

'*** itsosuh ***' "*** itsosuh ***",
itsosuh.kco "kco",
itsosuh.kdecode "kdecode",
itsosuh.kstatus "kstatus",


{fn CONCAT(kditem.kditem,'S')}
from(

itasfin.kdecode "kdecode",
itasfin.kdsetcode{002} "kdsetcode{002}",
itasfin.holdtext{003} "holdtext{003}",
itasfin.holdtext{001} "holdtext{001}",
itasfin.kco "kco",
itasfin.kditem "kditem",
itasfin.nbqty "nbqty",
itsuhistory.kenterdate "kenterdate",
itsuhistory.balance{001} " balance{001}",
itsuhistory.kco "kco",
itsuhistory.kdecode "kdecode",
itasset.kco "kco",
itasset.kowner "kowner",
itasset.kstatus  "kstatus",
itasset.kditem "kditem",
itasset.kdecode "kdecode",
itsosuh.kco "kco",
itsosuh.kdecode "kdecode",
itsosuh.kstatus "kstatus",






FROM
          PUB.itasset "itasset",
          PUB.itsosuh "itsosuh",
          PUB.itasfin "itasfin",
          PUB.itsuhistory "itsuhistory"

LEFT OUTER JOIN   pub.itasfin "itasfin"
ON         itasset.kco "kco" = itasfin.kco "kco"
and         itasset.kditem  "kditem" = itasfin.kditem "kditem" 
and         itasset.kdecode  "kdecode" = itasfin.kdecode "kdecode"
            
LEFT OUTER JOIN   pub.itasset "itasset"
ON                                  itsosuh.kco "kco" = itasset.kco "kco"
and         itsosuh.kdecode "kdecode"= itasset.kdecode "kdecode"
and         itsosuh.kstatus  "kstatus" = itasset.kstatus "kstatus"

LEFT OUTER JOIN   pub.itsosuh "itsosuh"
ON          itsosuh.kco" "kco" = itsuhistory.kco "kco"
and          itsosuh.kdecode "kdecode" = itsuhistory.kdecode "kdecode"
and          ({fn CONCAT(itasfin.kditem "kditem",'S')} = 'cars' or {fn CONCAT(itasfin.kditem "kditem",'S')} = 'vans') and                                                                             itasfin.nbqty,= 1 and itasfin.holdtext{001}= 'own'
)
group by itasfin.kditem,
order by 1 asc



Many Thanks

Chris

MFGF

Quote from: cbyrne on 09 Jun 2014 02:48:41 AM
Hello,

Hello :-)

Quote from: cbyrne on 09 Jun 2014 02:48:41 AM
I am getting an error message when i am validating the below code.

<Sound of MF using all of his powers of prediction and clairvoyance to try to envisage what the error message says. Much straining and grunting. Eyes screwed tight shut. Deathly grimace>

Sigh. Nope. Nothing is coming through. My clairvoyance is not working today. You're going to have to tell us what the error is. I tried, honestly I did! :)

Cheers!

MF.
Meep!

BigChris

Also can you let us know if you're using SQL server, Oracle or something else? There's a mention of fn CONCAT which looks unusual to me, but that might be because you're using a different database platform.

And really MF, I do think you could have put a little more effort in...unless you omniscience is slipping...