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

Modify query definition

Started by fgarav, 08 Jul 2009 02:53:05 PM

Previous topic - Next topic

fgarav

Hi everybody
during / after creation on  query subject my question is if is possible modify the SQL language to cast value...
normaly when i run metadatawizard it produce something like select * from table,is possible declare the file i need but is possible do someting like this
CAST(REDDITO / 60 AS varchar(7)) + ':' + RIGHT('00' + CAST(ABS(REDDITO) % 60 AS varchar(2)), 2) AS REDDITO,
    CAST(COSTO / 60 AS varchar(7)) + ':' + RIGHT('00' + CAST(ABS(COSTO) % 60 AS varchar(2)), 2) AS COSTO,
    CAST(ASSENZA / 60 AS varchar(7)) + ':' + RIGHT('00' + CAST(ABS(ASSENZA) % 60 AS varchar(2)), 2) AS ASSENZA,
    CAST(FERIE / 60 AS varchar(7)) + ':' + RIGHT('00' + CAST(ABS(FERIE) % 60 AS varchar(2)), 2) AS FERIE

if yes there is some kind of error near RIGHT .. can someone say me where is the error ?

Bye

blom0344

Check your syntax , using  '+' to concatenate is pure T-sql (which will only work with native setting when running against SQL server).
More appropriate is  '||' (double pipe)

fgarav

thx blom0344 , i have found the solution and is what u mean..can u check my new post ?

fgarav

sorry blom0344 the post is this:
Time in Seconds but Display as Hours, Minutes and Seconds but be able to SUM