Forum Replies Created

Viewing 15 posts - 1 through 15 (of 18 total)

  • RE: Records with lower case in DB

    If you're after more than just the first character, you're going to have to do something with a COLLATE statement.  If you using the default (SQL_Latin1_General_Cp1_CI_AS), you can do something...

  • RE: Rewrite SQL with ANSI for 2005- HELP!!

    This don't do it?

    SELECT p1.MAIN_CODE, p1.SUB_CODE, p1.NAME, p2.INTVALUE AS DAYS

    FROM

     pinf p1 LEFT OUTER JOIN pinf p2 ON

      (p2.MAIN_CODE = p1.MAIN_CODE AND

       p2.SUB_CODE = p1.SUB_CODE AND

       p2.NAME = 'DAYS')

    WHERE p1.MAIN_CODE = 'RET'

    AND p1.NAME <> 'END'

  • RE: Cluster failover notification

    If you ping "localhost", you'll get the name of the local server back, not the virtual server's name.  When I had a cluster to administer, I put a job that ran the...

  • RE: Ignoring first few characters in a TSQL Select

    where replace(myName, 'AUTO_', '')  = @thisName

    or

    where CASE WHEN LEFT(myName, 5) = 'AUTO_' THEN RIGHT(myName, LEN(myName) - 5) ELSE myName END = @thisName

  • RE: Help needed in migration logic

    I worked it a little differently, getting the ranges in your input identified and then comparing those to what was already recorded.  Not sure about performance with the record counts...

  • RE: Need help with deleting rows

    You can run this and take a look at what comes out.  If you want to purge everything that has a dupe, change "select product_id" to "Delete".  Bear in mind,...

  • RE: Help with creating a key

    You need to find a way to determine when it's appropriate to execute this to make sure you've got all the prior day's records in your table before running, but...

  • RE: Analysis services 2005

    Are you connecting from the clients and then finding you can't browse, or are you unable to even connect?  When you try to connect through excel, do you see the...

  • RE: Grouping attributes from multiple rows

    Ltrim(Rtrim(character_expression))

  • RE: SELECT Query with the IN operator

    /*Use the count of Tag Ids your looking for, run your original query into a temp table and.. */

    DELETE FROM #temp

    WHERE JobID IN

       (SELECT JobID from #temp

        GROUP BY JobID

        HAVING...

  • RE: Description data from different tables

    Is this what you're after?

     

    create table #test1 (id int, title  varchar(20))

    create table #test2 (id int, title varchar(20))

    create table #fk(tid int, sourceTable varchar(20))

    insert into #test1 values (1, 'thingA')

    insert into #test1 values...

  • RE: Data Import Problem

    <edit>Oops...didn't see Gosta's post.  Didn't mean to repeat...

    Another possible workaround:  Converting your .xls to a .csv.  Whether or not that's a good option depends on what you're doing, but you wind...

  • RE: Viewing Windows Event Logs

    Are your SQL servers in their own Operation Unit?  If so, your operations team can (?) push a policy granting you the rights your need to just that OU.  We...

  • RE: How to know the row got updated in SQL

    If you can't alter the table, use the trigger to populate a different table containing your source table's key and a datetime field. 

    Fortunately (or unfortunately), if the trigger is...

  • RE: Using output from a stored procedure to update rows

    I don't think you can carry you spid the way you want, but it's not that hard to make happen without having to dump #temp.  Run your update on the SPID column...

Viewing 15 posts - 1 through 15 (of 18 total)