Forum Replies Created

Viewing 15 posts - 226 through 240 (of 346 total)

  • RE: Store result in Variable of dynamic query

    The problem here is that the variables are declared outside the scope of the dynamic SQL statement...either declare the variable within the dynamic SQL (this might not be of any...

  • RE: SQL CLR taking up all the VAS memory area ! Any solution

    What kind of memory pressure errors are you seeing in the SQL error log? Are you using CLR TVFs, SPs or UDTs?

    Have you applied SQL Server SP2? (there were CLR...

  • RE: Problem with password

    SQL 2005 has an additional security check to ensure that passwords for logins meet the strong password requirements (i.e. at least 8 characters long, combines letters,numbers and symbols etc

    Either you...

  • RE: in operator

    you could also use joins...

    SELECT t1.* FROM t1 INNER JOIN t2 ON t1.c1 = t2.c1 AND t1.c2 = t2.c2

  • RE: What fires the Trigger?

    Using the @query argument of xp_sendmail should (if I remember rightly) send the results of a query in the mail (in CSV format I think)...

    Exec master.dbo.xp_sendmail @recipients = 'me@meltd.com',...

  • RE: How to attach and detach a database in SQL 7.0

    I don't think attach / detach are available from EM in SQL 7.0...you'd have to use the stored procedures for the same...

  • RE: Renaming logical files

    yes...the NEWNAME option was added in SQL 2000 and isn't available in SQL 7.0...the only workaround (AFAIK) was modifying the system tables directly ()

    any specific reason...

  • RE: Linked SQL Server, SQL 7.0 and SQL 2K, Stored Procedure, Dynamic SQL, and ANSI NULLS/ANSI_WARNINGS.

    did you try setting these options within the dynamic SQL??...something like :

    EXEC('SET ANSI_NULLS ON SET ANSI_WARNINGS ON INSERT ' + @ServerDb + '.tblFileNumber (TitleworxFileNumber, OfficeID, RegionID) SELECT TitleworxFileNumber, OfficeID,...

  • RE: How to attach and detach a database in SQL 7.0

    sp_attach_db and sp_detach_db are available in SQL 7.0 also...these can be used to attach and detach databases in SQL 7.0...

  • RE: Renaming logical files

    works for me too (with and without the single quotes for the names)

    ALTER DATABASE MetaData

    MODIFY FILE(NAME=MetaData_Data, NEWNAME=MetaData)

    GO

    ALTER DATABASE MetaData

    MODIFY FILE(NAME='MetaData', NEWNAME='MetaData_Data')

    What is the exact error description you are seeing?

  • RE: List of Identity Columns in Database

    these can be obtained from IDENT_INCR and IDENT_SEED

    SELECT

     Table_Name,

     Column_Name,

     IDENT_SEED(Table_Name) Seed,

     IDENT_INCR(Table_Name) Incr

    FROM INFORMATION_SCHEMA.COLUMNS

    WHERE

    COLUMNPROPERTY (OBJECT_ID(Table_Name),Column_Name,'IsIdentity') = 1

  • RE: Linked Servers ARRRRGGGGGGGG

     

    TRUNCATE TABLE can't be run directly against the four-part name associated with a linked server. You'll need to wrap this up with an sp_executesql:

    EXEC [AHL_SQL7\WORKSPACE].MarketingCF.dbo.sp_executesql N'TRUNCATE TABLE Mthly_LIF'

     

  • RE: Hiding error messages

    I'm not sure if I completely understood your problem -- if you can handle the error in the stored procedure then there should be no problem (i.e. within the stored...

  • RE: datename() function- deterministic/non-deterministic

    From BOL ("deterministic functions" in the index keyword search):

    All functions are deterministic or nondeterministic:

    • Deterministic functions always return the same result any time they are called with a specific...
  • RE: Linked Server/OPENQUERY problems

    What is the result if 4 part naming is used to retrieve data??...i.e SELECT * FROM <servername>.<databasename>.<ownername>.<tablename> -- does this result in the rows being returned??

    and perhaps using SET FMTONLY OFF in the...

Viewing 15 posts - 226 through 240 (of 346 total)