Anyone can explain , query for sybase database state ?
for this
am tried below query , but its not working..
select name from sysdatabases where status2='..'
status2
is an smallint
datatype, so using quotes to find a value will give you a syntax error. You need to specify either a number, or range of numbers (without quotes) to get the query to return.
select name from sysdatabases where status2 = 1
or
select name from sysdatabases where status2 in (0,1)
More information on sysdatabases can be found here: http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36274.1550/html/tables/X42615.htm