Viewing 15 posts - 61 through 75 (of 206 total)
Two system procs:
sp_catalogs and
sp_tables_ex
will give you remote catalogs and tables.
DAB
May 20, 2008 at 9:18 am
Just to get you started...
Try using any of the string functions built in to SQL Server
charindex( 'string to find', column name )
substring( column name, start pos, end position)
These can be...
May 20, 2008 at 8:51 am
John is on the correct path. If a table does not have an identity column, @@identity will contain null after the insert. Also, I suspect you have a logic problem
instead...
May 19, 2008 at 1:58 pm
Ooops, for some reason it omitted the parameter to the sp.
May 15, 2008 at 9:04 am
This solution should work for 2000 and 2005:
sp_catalogs ' '
DAB
May 15, 2008 at 9:03 am
I think he's asking for a 2005 equivalent of master.dbo.SYSREMOTE_TABLES
May 15, 2008 at 8:57 am
The GETDATE() function returns a DATETIME type. Therefore it will inherit the same rounding limitation.
DAB
May 15, 2008 at 8:11 am
Look at BOL: "datetime values are rounded to increments of .000, .003, or .007 seconds, as shown in the following table."
If you need that extra precision, look into upgrading to...
May 15, 2008 at 8:00 am
That only works for SQL 2000. For SQL 2005 use sys.sql_modules
select definition
from
sys.sql_modules where object_id = object_id ( )
DAB
May 15, 2008 at 7:46 am
I thought about that but for some reason i had the impression that it took a db id as a parameter as in db_name( id ). My fault for not...
May 14, 2008 at 4:46 pm
You can also use sp_helptext and store the results in a variable for output. And, depending if you're using SQL 2000 or 2005, you can use the following:
-- SQL...
May 14, 2008 at 2:34 pm
Since you are using SQL 2000, not much help there. But, you could try something like this using a combination of @@SPID in conjunction with the sp_who system proc.
create proc...
May 14, 2008 at 2:19 pm
Glad I could help. One more item. Beware if your MySQL instance is running on a *nix server. If that is the case you will need to take case into...
May 14, 2008 at 9:41 am
I don't know anything about Infromix, but for MySQL you can execute the following:
select * from openquery (MYSQL, ' select table_schema, table_name
from information_schema.TABLES; ' )
DAB
May 14, 2008 at 9:26 am
Viewing 15 posts - 61 through 75 (of 206 total)