Forum Replies Created

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

  • 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...

  • RE: Tracking activity of SQL administrator accounts - audit trail or logging?

    interesting example;

    If I were to modify this trigger, I think I'd like some of the information found in SP_WHO2 like program name and hostname, so you can idnetify who is...

  • RE: Views continue to break

    here's my stab in the dark:

    the agency in question probably has more data or more changes than the other agencies.

    since the execution plan of a view is compiled, I'd guess...

  • RE: Generate random number

    generate a random number without using the existing tools of rand() and newid()?

    why would handicap yourself?

    what is the real requirement, or what are you trying to do? the only...

  • RE: SP to do INSERT or UPDATE w/o loop or cursor

    Stephen Lee (8/13/2008)


    I don't think I'd be able to use a view in this case, reason being, I need a way to track token transactions, example being reducing the amount...

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