Forum Replies Created

Viewing 15 posts - 481 through 495 (of 1,082 total)

  • RE: error subtracting 2 time datatypes

    It's also posted under TSQL2k5

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: sql query to subtract 2 times

    ok cool, sorry .

    You posted in the 2005 section so I got pretty confused he he he

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: sql query to subtract 2 times

    Are you sure the Datatype is TIME?

    What version of SQL are you using?

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: POWER doesn't work for BIGINT?

    yeah that was my next solution was to perhaps cast the vaules as it would prob return the same type as what is passed in 🙂

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: POWER doesn't work for BIGINT?

    actually maybe I am confused I will look further

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: POWER doesn't work for BIGINT?

    I think you might be confused

    a bigint takes this

    SET @a = 9223372036854775807

    PRINT @a

    SET @a = POWER(2,31-1)

    PRINT @a

    AND NOT THIS

    SET @a = POWER(2,31)-1

    PRINT @a

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Error: Conversion failed when converting datetime from character string.

    OK the error is because of the where clause.

    You are basically saying WHERE Username IN (datefield)

    you can't compare those fields.

    Use this:

    select max(Logdate) As LogDate ,UserName

    ...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Error when Creating a View

    Looks like the TSQL column is too small you either need to do as Lynn said and disable the triggers or simply alter the table and extend the length of...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Error when Creating a View

    Most the teaching has been from you Lowell and Lynn 😉

    Thanks

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Error when Creating a View

    OK cool now I think you need to look at the columns in this table:

    DDLog which is the table that this DDL trigger is inserting into 🙂

    I must I am...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Error when Creating a View

    How can you tell from looking is sys.triggers which triggers are DDL?

    Will it be under the type_Desc?

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Error when Creating a View

    Is Adventure works the DB that you tried to create your view on?

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Error when Creating a View

    Hi ItzSam

    Have tried sp_Help 'ddllogger' ?

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Error when Creating a View

    HI Lowell

    Are you saying that is has flicked a switch to turn on some built in DDL Logging?

    Meaning anytime he creates stuff it writes to a table?

    mmm very interesting how...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Error when Creating a View

    OK Open a new query window

    Run your create code again.

    If you get the same error then in the same window run this only:

    sp_HelpText 'ddllogger'

    and let us know what it says?

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life

Viewing 15 posts - 481 through 495 (of 1,082 total)