Forum Replies Created

Viewing 15 posts - 5,356 through 5,370 (of 6,486 total)

  • RE: Updating a View

    Note that Hugo is referring to the name unquoted, and Jeff is passing it in as unicode char. That would cause the error.

  • RE: random name generator query

    In your case - what's most efficient is going to be directly related to how big your firstandlast table is. If it happens to be 5000 records, the cross...

  • RE: Manipulating Data

    Have you tried casting PIDKEY to integer and then adding 3 to it? I'm not sure I see where the confusion is?

    insert myfinaltable

    select cast(pidkey as int)+3 as pidkey

    from tblsource

  • RE: Help with a query

    With sesslist(dateshort,datelong,session, [message],rn) as

    (

    select

    cast(date as int) as dateshort,

    date as datelong,

    session,

    [message],

    ROW_NUMBER() over (PARTITION by cast(date as int) order by date desc) RN

    from #RR s

    where not exists

    ...

  • RE: how to find the parent

    I've had to play with those kind of hierarchies as well, and I ended up going with...BOTH. A column that had the "composite key" with all of the...

  • RE: Add incremental count to group of rows

    Simon - could you post some more specifics as to the DDL of that table (i.e. column names and data types). Ken's correct and the example gives you what...

  • RE: time

    % is the modulo operator. Modulo means to return the integer remainder of a division.

    so 72%36=0 (since 72 divides evenly by 36)

    73%36=1

    74%36=2, etc...

  • RE: Combining queries - how?

    It's early - grab some more caffeine - the fog will disperse soon:)

    I have weeks like that too!

  • RE: time

    If you're trying to do validation - you should try the conversion without doing the division. In order to be valid, according to the numbers you're putting out only...

  • RE: Combining queries - how?

    Try just simply using an OR:

    select a

    from tablea

    where

    (

    z=0

    and startdate > '2008-01-31'

    ...

  • RE: time

    Forcing a data entry mask (your "no more than 1-digit after decimal point") is a UI issue. The database server has no control over how data is entered. ...

  • RE: DML Trigger & looping through columns - problem getting the data

    Thanks for the feedback. Good to know that you got what you needed.

  • RE: How to Subtract timespan from datetime

    The TimeSpan Structure from .NET doesn't serialize into anything compatible in SQL natively. You'd really want to override the ToString method, so that it will return a float in...

  • RE: Deleting records based on results of a View

    Actually you're pretty much there. It should look something like this:

    delete tableAlias1

    from Table1 as tableAlias1

    inner join MyView

    on TableAlias1.a=MyView.a and

    ...

  • RE: DML Trigger & looping through columns - problem getting the data

    A few comments:

    - the inserted and deleted columns for a given table have the same structure as the table itself, since it has a record of "what was just...

Viewing 15 posts - 5,356 through 5,370 (of 6,486 total)