Forum Replies Created

Viewing 15 posts - 10,726 through 10,740 (of 13,469 total)

  • RE: Script to Reformat Results to Display Horizontally

    here's an example which uses the FORXML to produce a comma delimited list as a result for each ID:

    is this what you were after:

    Resource_Id    Skills
      ...
  • RE: Convert RTF data

    tom.goehring (7/29/2009)


    Lowell

    Did you ever get a chance to create the procedure for the steps below:

    3) Install IIS (please include with what pieces to install and configure)

    4) How do I create...

  • RE: Loading Trace Files To A Table

    there is a script submission that loads all the trace files into a table here:

    Default Trace Load of All 5 Files[/url]

    you could easily change the command from '*.trc" to logins*.trc"...

  • RE: How to Rename a Field in SQL Server 2008 by script ?

    nope, no other way. even the GUI does that behind the scenes...the ALTER TABLE clause only lets you changing some of the other attrivutes for column, like ISNULL,...

  • RE: How to Rename a Field in SQL Server 2008 by script ?

    what you want is the sp_rename function.

    with that, you can rename any object...table, constraint,column...doesn't matter.

    to rename a column, the syntax is like this:

    EXEC sp_rename 'SchemaName.TableName.ColumnName', 'NewColumnName, 'COLUMN';

  • RE: Linked and intermittently available linked server inside IF clause

    how about wrap it with try catch, and use dynamic SQL instead; that way it won't test for the connection until the EXEC fires:

    BEGIN TRY

    Begin Transaction

    IF @p_LoadExcelB = 1

    BEGIN

    SET @sql='

    INSERT...

  • RE: Using like in a set-based manner

    ok, i know that the moment you use a function on a JOIN or WHERE condition, you lose the ability to use indexes, and it requires a table scan.

    Your #1...

  • RE: Loading Trace Files To A Table

    why not create a view, so it is always ready on demand?

    CREATE VIEW MyTrace As

    Select * from FROM ::fn_trace_gettable(c:\my_trace.trc", default)

  • RE: T-sql search condition

    probably a misstatment, but you can't use a trigger i think, but you can certainly use a script to test for your invalid columns:

    here's an example of the first two...

  • RE: How does the points system work?

    OK I've got ~140 or so points accrued from the QOD section, that are not applied yet to the points viewed in the forums; right now my rank is "SSCrazy",...

  • RE: SP First time run takes longer!

    after you stop and restart the server, the tempdb gets recreated....if it is small by default,(say 10 meg) the first SQL that inserts those 11,000 rows into the temp table...

  • RE: Need help locating my problem

    i have this saved in my snippets,it's supposed to find all zip codes within a given distance, assuming you have a table with zipcode, lattitude,longitude in it:

    hope this helps:

    /*

    Returns zip...

  • RE: NULL toggles off an index

    isn't the table scan and not using the index due to the SARGable condition?(Search ARGument)

    column = @value can be used to search as boolean match to the index

    column is...

  • RE: T-SQL to Export Table Structure to a script

    adrish sorry about the late followup; the forum doesn't seem to notify the author for posts on content the way it does for forum threads.

    since this version got created, I've...

  • RE: Linked server problem

    show us your function call;

    here's an example of using a linked server to get a function call back, does this help?

    exec ServerName.master.dbo.sp_executesql N'Select SERVERPROPERTY(''MachineName'')'

Viewing 15 posts - 10,726 through 10,740 (of 13,469 total)