Forum Replies Created

Viewing 15 posts - 61 through 75 (of 206 total)

  • RE: check if the table exists

    Two system procs:

    sp_catalogs and

    sp_tables_ex

    will give you remote catalogs and tables.

    DAB

  • RE: Pulling Out Concatenated Fields

    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...

  • RE: Creating an schema

    create schema scema_name

    Try BOL next time.

  • RE: Having Issues with multiple @@IDENTITY in Stored Procedure

    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...

  • RE: Link Server Script

    Ooops, for some reason it omitted the parameter to the sp.

  • RE: Link Server Script

    This solution should work for 2000 and 2005:

    sp_catalogs ' '

    DAB

  • RE: Link Server Script

    I think he's asking for a 2005 equivalent of master.dbo.SYSREMOTE_TABLES

  • RE: getdate() accuracy

    The GETDATE() function returns a DATETIME type. Therefore it will inherit the same rounding limitation.

    DAB

  • RE: getdate() accuracy

    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...

  • RE: how to stroe the text of an sp into a variable

    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

  • RE: Find Database NAme

    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...

  • RE: script out views in a database

    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...

  • RE: Find Database NAme

    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...

  • RE: Link Server Script

    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...

  • RE: Link Server Script

    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

Viewing 15 posts - 61 through 75 (of 206 total)