Forum Replies Created

Viewing 15 posts - 12,046 through 12,060 (of 13,469 total)

  • RE: XP_FileExists Not Seeing File

    Rbarryyoung is exactly right...typically, the account used for running the SQL server service never logs into the domain, and so does not have permissions/cannot browse to a different machine on...

  • RE: cannot get parents records which do not exist in child record using 'leftjoin'

    maybe you need to filter so you get JUST the parent records?

    slight change by adding a WEHRE clause, and changing which Oid to select like this?:

    [font="Courier New"]

    SELECT

      o.Oid,

      x.employeeID,

      o.changedate,

      e.followupdate,

      o.date

    FROM...

  • RE: cannot get parents records which do not exist in child record using 'leftjoin'

    it's just your INNER JOIN at the very end that is exluding the records you were looking for; simply change to this i think:

    [font="Courier New"]

    SELECT

      x.Oid,

      x.employeeID,

      o.changedate,

      e.followupdate,

      o.date

    FROM

      (SELECT

        ...

  • RE: Most hits on tables

    aww too bad your on 2000; I found Jack's suggestion really interesting and slapped this together real quick and it gave me promising results:

    [font="Courier New"]

    SELECT

    DB_NAME(database_id) AS dbname,

    OBJECT_NAME(OBJECT_ID,database_id) AS tablename,

    SUM(user_seeks) AS...

  • RE: removing appended dash

    yeah, looking at it again, i might suggest assuming just 5 characters:

    JOIN ON LEFT(tbl1.ZIPCODE,5) = LEFT(tbl2.ZIPCODE,5)

    that way you ignore bad data, as well as 9 digit zipcodes.

  • RE: TXT file for each table

    Crispin Proctor (8/20/2008)


    Handy script (even if I don't agree with the approch) but handy non the less...

    Instead of sysobjects and syscolumns etc, rather use the catalog views sys.objects and sys.columns.

    I'm...

  • RE: removing appended dash

    ctics112 (8/20/2008)


    Greetings,

    I am trying to join two tables AgentAddresses and ZipCodes on a field called zipcode in to create another table named Agents however several thousand fields in Agent Addresses...

  • RE: TXT file for each table

    well, avoiding SSIS, this seems to work; in order to gett his to work, i had to enable xp_cmdshell, and change the credentials for the account that sql server runs...

  • RE: Arithmetic overflow error converting varchar to data type numeric.

    ryansegg (8/19/2008)


    select CAST('0061' as numeric(4,3))

    This is silly but I'm stumped by this statement giving me an error.

    Ultimately what I want is to insert '0061' in a column of type numberic(4,3)....

  • RE: Trigger on COLUMN rename

    found some more info here:

    Known issues of DDL Trigger in SQL Server 2005

    • Truncate statement is not tracked by any event

    • SP_Rename event is not tracked

    *For more information, please refer...

  • RE: Trigger on COLUMN rename

    holy cow! sp_rename doesn't raise a trigger! you are right, i would have thought it would/should, of course.

    for anyone wanting to try it yourself,

    I modified the great example found...

  • RE: Cross-Database Query "Is Null" Bug

    i wonder if doing SET ANSI_NULLS ON, running the statement, and then SET ANSI_NULLS OFF would give different results. I haven't been able to duplicate, but that's wierd;

  • RE: Cross-Database Query "Is Null" Bug

    that's interesting...I'm guessing that the joins to the RPBILL table is doing the wierdness...

    if the two tables are in a sub select like below, what are the results?

    [font="Courier New"]SELECT L.BdKey

        FROM...

  • RE: DB users restore

    here's my suggestion:

    it sounds like it's just the users in the database from ServerA exist on ServerB where it gets restored, but the users are orphaned because the unique sid...

  • RE: Generate random number

    rbarryyoung (8/15/2008)


    This raises an interesting question: how quickly can we generate an acceptably random pseudo-random sequence in SQL Server, without resorting the obvious built-in functions (rand, NewID, Checksum, the...

Viewing 15 posts - 12,046 through 12,060 (of 13,469 total)