Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8635

Re: Cursor not in a valid state

$
0
0

Hi Vivek,

Here, in this case, it is expected error, not a bug.

USER_NAME function accepts INT(INTEGER) Datatype Values. INT range is [0 2147483647]

However "sysuser.user_id" Datatype is Insigned INT, thus could support values up to 4294967295.

Solution : Instead of query

select User_Name(sysuser.user_id) from sysuser ;

Use query

select user_name from sysuser ;

No need to use function User_Name. Column "sysuser.user_name" can be used.

When you need aboslutedly to use USER_NAME function, make sure the parameter is in range [0-2147483647]. Eg. select  user_name(sysuser.user_id) from sysuser where user_id <=2147483647 and ....

 

For uper values user "sysuser.user_name" column

 

Regards,

Tayeb.


Viewing all articles
Browse latest Browse all 8635

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>