Forum Replies Created

Viewing 15 posts - 11,341 through 11,355 (of 13,462 total)

  • RE: "NOT IN" phrase in WHERE clause doesn't work

    yeah when your nose is lost in the details,things like that still ding me once in a while, even after I've worked around it a zillion times.

  • RE: "NOT IN" phrase in WHERE clause doesn't work

    if you use NOT IN, you must exclude the NULLs; anything IN = or LIKE NULL is undefined:

    SELECT * FROM BIG_THINGS

    WHERE THING_ID NOT IN

    (SELECT THING_ID FROM THINGS WHERE THING_ID...

  • RE: t-sql help

    aw comeon Mh;

    with 170+posts, I KNOW you know better.

    Always post a table structure and insert statements so people can help you.

    here's a fake table and data for others to try...

  • RE: Who CREATED and/or ALTERED an object

    Casper (3/30/2009)


    yeah i thought auditing would have to be the way out.

    Just by the way - you said "if not too much time has passed" i can use the default...

  • RE: Who CREATED and/or ALTERED an object

    if not too much time has passed, the default trace can help:

    -- obtain file name for Default Trace

    declare @TraceFileName nvarchar(256)

    set @TraceFileName = (select path from sys.traces where is_default =...

  • RE: Have no access and unable to administer

    Krishna was alluding to the "sa" username and password on the SQL server for sysadmin rights. since it looks like someone removed access for BUILTIN\Administrators, where all the local and...

  • RE: sql server 2000

    yes...you can take a SQL 7 or 2000 backup and restore it on a SQL2005 server; the restore automatically upgrades it to the newer format; you just cannot do the...

  • RE: unidentified SEVERE performance issue

    here's an article i saved on parameter sniffing; basically, the default for an execution plan is to look at the statistics to determine how unique the parameter is; but when...

  • RE: Datetime <> For Update

    that's the expected behavior:

    if you compare anything to null, the results are undefined...

    so you either want to add a where clause like ...AND A.DATE IS NOT NULL AND B.DATE IS...

  • RE: unidentified SEVERE performance issue

    parameter sniffing maybe? have you isolated which proc slowing things down? does it have a default value for any of it's parameters? in my experience, it's the default values that...

  • RE: Read Registry

    i tried running the command over a linked server; basically i tried changing the last command to a 4 part command:

    EXEC linkedservername.master..xp_regread 'HKEY_LOCAL_MACHINE', @inst, @inst1

    got this error:

    SOFTWARE\Microsoft\Microsoft SQL Server\SQLEXPRESS\MSSQLServer\SuperSocketNetLib\Tcp\\\\////TcpPort

    Msg 7411,...

  • RE: time

    the BETWEEN oerator is what you want i think;

    select * from sometable where invoice_date BETWEEN '01/01/2009' AND GETDATE()

  • RE: max date row

    you said how to select max date's each home , location and status.

    like lynn said, all the tools are there...run this, test it, and drop the columns you don't need.

  • RE: Indexes quickly fragmenting

    indexes become fragmented due to inserts.

    say you have an index on "LastName".

    if i insert someone whose lastname starts with "S", it will probably fragment the index, as it forces anew...

  • RE: DBCC command runs when creating procedure

    a GO statement ends your procedure, and runs the next command; you've pasted commands INCLUDING the "GO" which is not what you want.

    this is a better format:

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER...

Viewing 15 posts - 11,341 through 11,355 (of 13,462 total)