문제

My field is of character type but displays a decimal. My cognos report output is in excel format and I am trying to retain the trailing zero in my sql. Any suggestions?

I use the following sql to maintain leading zeroes and it works :

'=' + '"' + [Value] + '"'

However, it does not seem to be effective for trailing zeroes.

도움이 되었습니까?

해결책

Try the following:

'=' + '"''' + [Value] + '"'

which becomes ="'[Value]" (note the extra ' in there). Failing that, try

'''' + [Value]

which becomes '[Value]

The extra apostrophe at the beginning tells Excel that the field should be treated as text rather than a number.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top