Forum Replies Created

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

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

  • RE: Sending an email with multiple variables

    if the data is all in the same row, you can do this:a assuming my table has the columns in capitals:

    SELECT

    @var1=SUBJECT,

    @var2=EMAILFROM,

    @var3=EMAILTO,

    @var4=SUBJECT

    FROM...

  • RE: NEED to TWIK this T-SQL to meet Business Logic

    ok, so it's not the count, but the MAX(EDI_CLM_SEQ_NBR) in the DTL that is no longer matching the header, right?

    same query and update, but with slight changes?

    --in theory, this will...

  • RE: Table Structure (Data Dictionary) as HTML

    there's something in script contributions that you can grab; i've updated my version slightly so that it also documents FUNCTIONS, which was not part of the original submission.

    you can grab...

  • RE: NEED to TWIK this T-SQL to meet Business Logic

    I think you can do this with a simple UPDATE ...FROM:

    find the records that might be affected:

    SELECT * FROM CLM_HDR

    INNER JOIN (SELECT EDI_CLM_ID,COUNT(EDI_CLM_SEQ_NBR) AS EDI_CLM_SEQ_NBR

    ...

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