Forum Replies Created

Viewing 15 posts - 9,796 through 9,810 (of 13,461 total)

  • RE: Shrinking a Database

    you can do it allwithin the GUI;

    note on my second screenshot by shrinking the log of my "Sandbox" database, I'm freeing up a huge amount of space by shrinking it.

  • RE: Who Created A Table

    the default trace would have that information if not too much time has past; the default trace captures DDL, but not DML changes.

    easiest way is to point SSMS to the...

  • RE: Parse field with Numeric ranges and comma deliminated values

    nice breakthrough Wayne; I couldn't get my mind around the multiple ranges;

    performance on this solution sux, took my decent dev machine 1:09 to return the 151 rows, we might look...

  • RE: bcp import not happening.

    shouldn't column 10 be at least one char wide?

    10 SQLCHAR 0 0 ...

  • RE: Query to get output in mentioned format

    to build on sturner's idea, you could create a view which puts the data in the format sturner suggested, and do your queries per his suggestion:

    Create View Sturners_Idea

    AS

    select empid, in1...

  • RE: Stopping Duplicates with INSTEAD OF INSERT Problem

    yeah the trigger should be doing a left outer join to test if the row exists, like this instead:

    INSERT INTO TableName

    SELECT...

  • RE: Need simple way (using t-sql) to generate "realistic"-looking numbers...

    i have this saved in my snippets; change the top 1000 if you need more; this version includes the dashes in the SSN

    --results

    RAND_STRING

    675-45-3155

    323-95-9117

    024-41-4469

    939-91-4719

    966-36-0213

    the code:

    --neat , creates a random string that...

  • RE: batch column update

    since this is a one time update, i would not create the defaults inside a cursor;

    i would just generate the sql, and run it once.

    this gets similar results, but without...

  • RE: Script to Estimate Table size

    well mine calculates the max row size, but it would be misleading for for tables that have a varchar(max) columns, since their size is -1...when it is really what,a...

  • RE: To find out actual owner of the table

    It sounds like you are thinking every table has an owner the way Oracle works; since SQL 2005, that's not true any more.

    now everything is part of a schema, and...

  • RE: sp_who AND Name of Stored Procedure

    it sounds like you want to know the last command a spid happened to issue...in your case you think it was a stored procedure:

    SELECT SDEC.[most_recent_session_id],DEST.TEXT

    FROM sys.[dm_exec_connections] SDEC

    CROSS APPLY...

  • RE: Script to Estimate Table size

    i have this saved in my snippets; it is slightly different from the formula you pointed to, but you could change it easily:

    select object_name(object_id),sum(max_length) from sys.columns group by object_id

  • RE: Query out tables and sps

    oh you can generate the CREATE TABLE script via TSQL; it's just like so many things in SQL Server, the answers are spread out everywhere, and you have to put...

  • RE: xp_cmdshell

    i think the entire path+file must be in dbl quotes, not just the filename;

    copy "c:\SQLOldFiles\TestRemainderFile.txt" c:\SQLNewFiles

  • RE: Check constraints validating HTML

    interesting David;so it would jsut be the html for <title></title>? and you want to make sure it doesn't have things like > instead of & g t ; in...

Viewing 15 posts - 9,796 through 9,810 (of 13,461 total)