Posts Tagged ‘SQL’
If you directly use convert it gives you solution in terms of +e. But if we convert it to bigint first then it provide the correct conversion to string.
CONVERT(nvarchar, CAST(floattoconvert as bigint))
You can use str function but you need to be careful as it appends 0 or space while converting the same. So it would be bit tricky to use str function.
following is the query for selecting all object from all database
SELECT name, id, xtype, uid, info, status, base_schema_ver, replinfo, parent_obj, crdate, ftcatid, schema_ver, stats_schema_ver, type, userstat, sysstat, indexdel, refdate,version, deltrig, instrig, updtrig, seltrig, category, cache
There are various parameter which you can use as where to specify criteria.
If you want to search certain object type then
|‘PK’||For Primary Keys|
|‘F’||For Foreight Keys|
|‘P’||For stored procedures|
|‘S’||For system objects|
You can also add like query on name to give specific resultset.