Forum Replies Created

Viewing 15 posts - 31 through 45 (of 211 total)

  • RE: Two tables and want to join on different columns

    Resolver table?

    use tempdb

    go

    declare @order_ship table (

    location char(5)

    , order_no int

    , ship_num char(6)

    );

    declare @ship_id table (

    location char(5)

    , order_no int

    , ship_type char(5)

    );

    declare @resolver table (

    ship_num char(6)

    , ship_type char(5)

    );

    insert into @order_ship values ('US', 1,...

    _____________________________________________________________________
    - Nate

    @nate_hughes
  • RE: Update multiple rows with a specific sequence

    Might not be the most efficient way but seems to meet your criteria, no?

    CREATE TABLE #TmpTbl (RowId INT IDENTITY(1,1), ACTCODE NCHAR(6));

    INSERT INTO #TmpTbl (ACTCODE) VALUES ('110001'), ('110003'), ('110009'), ('120000'), ('120001');

    DECLARE...

    _____________________________________________________________________
    - Nate

    @nate_hughes
  • RE: Update multiple rows with a specific sequence

    Might look into the ROW_NUMBER() function.

    CREATE TABLE #TmpTbl (ACTCODE NCHAR(6));

    INSERT INTO #TmpTbl (ACTCODE) VALUES ('110001'), ('110003'), ('110009');

    DECLARE @SEQUENCE NCHAR(6) = 220000;

    SELECTACTCODE

    , @SEQUENCE + ROW_NUMBER() OVER (ORDER BY ACTCODE)

    FROM#TmpTbl;

    DROP TABLE #TmpTbl;

    _____________________________________________________________________
    - Nate

    @nate_hughes
  • RE: compare varchar dates

    dubem1-878067 (2/12/2013)


    but can I do simply to avoid 3 convert?

    where mydatecolumn between '2012-10-10' and '2013-04-01'

    Trying to eliminate the CONVERT every time you reference this column? Have you considered...

    _____________________________________________________________________
    - Nate

    @nate_hughes
  • RE: Netapp SnapManager for SQL

    David, unfortunately the SnapManager process is owned and maintained by a separate group (storage/network) in another location. All things considered, I should be able to put together a nice little...

    _____________________________________________________________________
    - Nate

    @nate_hughes
  • RE: Netapp SnapManager for SQL

    The fun with SnapManager continues. It's been days now mirroring/reseeding a VLDB (5TB). Yesterday during the mirror, we ran out of space on the log volume snap partition which in...

    _____________________________________________________________________
    - Nate

    @nate_hughes
  • RE: Netapp SnapManager for SQL

    Thanks David. I'll check it out.

    _____________________________________________________________________
    - Nate

    @nate_hughes
  • RE: Netapp SnapManager for SQL

    Scott, thanks for responding. I think our case for moving back to native backups gained some traction last night: network performance issues prompted the network team to turn off mirroring....

    _____________________________________________________________________
    - Nate

    @nate_hughes
  • RE: Netapp SnapManager for SQL

    We've had SnapManager in place now for several months as our primary backup solution and I can't say I'm overly thrilled with what we've witnessed. In large part because it's...

    _____________________________________________________________________
    - Nate

    @nate_hughes
  • RE: Getting the last entry based on a previous entry.

    GF (9/21/2012)


    What I am wanting to achieve is a list of any reports that have a current status of 1 (submitted), and that report has been previously submitted.

    In other...

    _____________________________________________________________________
    - Nate

    @nate_hughes
  • RE: BLocking issue

    Here's an article I found helpful when troubleshooting Deadlocks:

    http://www.mssqltips.com/sqlservertip/2130/finding-sql-server-deadlocks-using-trace-flag-1222/

    _____________________________________________________________________
    - Nate

    @nate_hughes
  • RE: query help

    Not elegant but might prove useful.

    create table #temp

    (SchooName varchar(12),

    GradeCode int)

    insert into #temp values ('SchoolName', 1)

    insert into #temp values ('SchoolName', 2)

    insert into #temp values ('SchoolName', 3)

    insert into #temp values ('SchoolName', 4)

    insert...

    _____________________________________________________________________
    - Nate

    @nate_hughes
  • RE: All of a sudden, DB restore very slow

    Assuming you're using a SAN here - are you working with a dedicated or shared array?

    Ninja's_RGR'us (8/2/2011)


    Slight change in san config (assume they lie) ;-).

    "Nothing's changed. <hours later> We patched...

    _____________________________________________________________________
    - Nate

    @nate_hughes
  • RE: Trigger to split one column and insert into another table

    This article might help...

    http://www.codeproject.com/Articles/7938/SQL-User-Defined-Function-to-Parse-a-Delimited-Str

    _____________________________________________________________________
    - Nate

    @nate_hughes
  • RE: its ages since i wrote a trigger

    Might also consider changing it from an AFTER to an INSTEAD OF trigger.

    _____________________________________________________________________
    - Nate

    @nate_hughes

Viewing 15 posts - 31 through 45 (of 211 total)