Forum Replies Created

Viewing 15 posts - 7,666 through 7,680 (of 13,469 total)

  • RE: Yet Another Decimal Value Question

    it's integer division;

    sql shortcuts and says integer / integer = integer, s 3 / 2 = 1 for example, and not 1.5, so you lose decimal places.

    chnage it to...

  • RE: Login faield for user 'sa'

    change it again. if you typed in the password in a config file, it's in clear text in that file and a security risk of the highest order.

    create a...

  • RE: Can't create a view inside and IF block?

    why can't you just issue an ALTER VIEW command? don't you already know it exists, or is this script a create/recreate in case of an empty database?

  • RE: Deny drop tables but permit drop procedures

    Leonard see this post from yesterday, where someone posted the same question:

    http://www.sqlservercentral.com/Forums/Topic1103306-146-1.aspx#bm1103313

    To prevent the DROP of objects,where the user normally might have permissions to do so, you'll have to use...

  • RE: how to write this query

    just add additional columns from the original table to teh query:

    SELECT

    TheDate,

    RUN_TIME,

    USERS_COUNT,

    CONNECTION_COUNT

    FROM

    (SELECT

    DATEADD(dd, DATEDIFF(dd,0,RUN_TIME), 0)...

  • RE: Copying text -> Datefield

    i think this is clsoer to what you are trying to do:

    IF you can find a date in the description, set the [Date] field to that value:

    UPDATE [Intermediate invoices]

    SET [Date]...

  • RE: how to write this query

    doh; it should be more like GSquared; remove the USERS_COUNT, CONNECTION from the PARTITION statement.

    SELECT

    TheDate,

    USERS_COUNT,

    CONNECTION_COUNT

    FROM

    (SELECT

    DATEADD(dd,...

  • RE: Copying text -> Datefield

    I've tried updating the first one while using the below query :

    INSERT INTO [Intermediate invoices] (Date)

    Select distinct convert(datetime,[Description 7],105) from [Intermediate invoices]

    you said trying to UPDATE, but your command is...

  • RE: Split durations in a half hourly report

    here's the data in consumable format for other posters; I'm still trying to get my head around the requirements:

    With MySampleData

    (AgentID,State,StartTime,EndTime,Duration)

    AS (

    SELECT '1234','NotReady','04-05-2011 08:00:00','04-05-2011 08:00:05','5' UNION ALL

    SELECT '1234','Ready','04-05-2011...

  • RE: Handling variations of a customers name on an order

    John I'm not saying this is the right way to do it, this just happens to be how I thought it might work;

    how about creating a table CustomerAlias, and it...

  • RE: User Procedure assigning to a shortcut key

    yeah it requires, at a minimum, a new query window if you add a new keyboard shortcut; restarting is more than you needed, but it works too!

  • RE: how to write this query

    so does this give you the results you were looking for?

    SELECT

    TheDate,

    USERS_COUNT,

    CONNECTION_COUNT

    FROM

    (SELECT

    DATEADD(dd, DATEDIFF(dd,0,RUN_TIME), 0) As TheDate,

    ...

  • RE: Role permissions

    oskargunn my apologies; i pasted the wrong script from my collection; I've edited the example above, which should do what you wanted for your example.

  • RE: Hightligt Row in Report when Mouse Hovers over

    ok, it's possible in HTML, but how to inject it into a report is the part i cannot help with.

    you can google "CSS highlight TR" for code examples, but essentially,...

  • RE: how to write this query

    Mad-Dog (5/4/2011)


    Hi,

    I've a table with those columns (datetime,int,int) in this table i insert every hour a record of getdate() and two int value.

    my question is how i can write the...

Viewing 15 posts - 7,666 through 7,680 (of 13,469 total)