Forum Replies Created

Viewing 15 posts - 9,136 through 9,150 (of 13,469 total)

  • RE: xp_cmdshell

    steve your example would just return the results from the cmd prompt; I think the original poster wanted to capture the results of his dbcc command in both a table...

  • RE: Enforce constraint?

    Jules you can do it with a check constraint and function, but that would force a logical requirement: the first fk_id in the series

    must have it's bit_1 with the value...

  • RE: Multiple questions about Database Mail

    you are pretty much on target as far as profiles being a container; they are also a handy reference for which email account to use;

    on my server, i have 4...

  • RE: How to use a function in a query?

    well...this does what you wanted, but look at the results based on your sample data....it's appending a bunch of CASE WHEN statements and stuff....is that what you wanted?

    this statemnts uses...

  • RE: How to use a function in a query?

    i think your function is not compiling because it is refering to a misspelled schema:

    db0.ts_exp_def_detail

    instead of

    dbo.ts_exp_def_detail

    ..extra pair of eyes....forest thru the trees and all that stuff

  • RE: How to use a function in a query?

    Gabor there are two kinds of functions...scalar functions and table valued functions.

    if you call a table-value-function as if it were a scalar, you'd get the error you received.

    a TVF is...

  • RE: Trigger help

    there may be more to it, but based on what you posted, it looks to me like the table TEAM.DBO.HEADER_LOGS could be replaced by a view which gets the rollup...

  • RE: query each table in list of table names

    try this proc...it will generate some SELECT statements to help you find the data, which you can easily change to DELETE statements after review, or help you to decide to...

  • RE: Trigger help

    here's my best guess, but i'd really need the actual table definitions and sample data, along with expected output/example to really give a decent answer.

    ALTER TRIGGER

    ...

  • RE: xp_cmdshell

    i have this saved in my snippets that might help...instead of a linked server you could loop back tot eh current server as well:

    SELECT * FROM OPENQUERY( [linked server],'SET FMTONLY...

  • RE: DBMail

    because you are getting responses form the mail server, you have everything set up almost perfect.

    in order to prevent spam, most mail servers prevent relaying(returning error 5.7.1 Unable to relay...

  • RE: SQL 2008 DDL Auditing - A Full Self Installing/Updating Solution For Whole Server

    Sean nice job; you should submit this as an Article as well; it will get more exposure, plus some bragging rights for you as well...you can say you are "published"!

    way...

  • RE: error in connection string

    c# uses double slashes to escape and mean a regular slash; it is interpreting \s to be a special char that doesn't exist; is new line, \t is tab,...

  • RE: Registered local Servers

    the SMO method is more robust; there is a IsLocal

    field in the set returning 0 or 1 for true/false if it is local;

    you could create a CLR to return...

  • RE: Registered local Servers

    here's one way via TSQL, but it requires osql and xp_cmdshell:

    CREATE PROCEDURE dbo.ListLocalServers

    AS

    BEGIN

    SET NOCOUNT ON

    CREATE TABLE #servers(sname...

Viewing 15 posts - 9,136 through 9,150 (of 13,469 total)