I am Salamat,in my project am using optim tool.i found this issue with optim in CAST().
i tried CAST() function in optim but its not working,is CAST() working in optim if yes please give me syntax for that.Following is the query which have i used.
select SUM (ROUND (CAST( real1 AS VARCHAR(255) ),3)) as 'HashSum' from sql_num_hash_all:dbo.test_hash1
Note:Here 'real1' in above query is the column name
42000 Syntax error or access violation
AO47 Syntax error at line 1 position 32 near 'AS'(one of follows was expected:',',')') in SQL 'select SUM(
ROUND(CAST (real1 AS VARCHAR(255))),3)) as 'HashSum' from sql_num_hash_all:dbo.test_hash1'
I think optim took VARCHAR(255) as alias
Please help me as this is urgent and i stuck here from past one week.I know its working fine with convert(), but according to my requirement i want to use only CAST().
Thanks in advance
Re: Is CAST() work in optim?2013-03-05T22:13:53ZThis is the accepted answer. This is the accepted answer.Hello:
Hope things are well. Can you try the cast statement without the additional predicates to test (i.e. remove the SUM, ROUND and just use a SELECT).
Is there anyway that you can provide a test row of data in an Archive file that I can use here? Create an Optim Connect datasource and test
Re: Is CAST() work in optim?2013-03-06T06:31:15ZThis is the accepted answer. This is the accepted answer.
- SystemAdmin 110000D4XK
Thanks for reply,i tried cast statement without the additional predicates to test by removing sum,round and only tried with select statement but still got same error.Below is test column data separated by comma
http://46.00, 51.00, 69.00, 148.00, 487.00, 1940.00, 8173.00, 34916.00, 149641.00, 641812.00, 8.00, 8.00, 8.00, 8.00, 8.00, 8.00, 8.00, 8.00, 8.00, 8.00
These are the values of single column of REAL datatype.
Please help me in resolving this.