Forum Replies Created

Viewing 15 posts - 6,781 through 6,795 (of 10,144 total)

  • RE: help with select

    Chooes the column you want, min or max (or average, if you wish):

    DROP TABLE #Sample

    CREATE TABLE #Sample (LOG_NUMBER CHAR(3), EVENT_TIME DATETIME)

    INSERT INTO #Sample (LOG_NUMBER, EVENT_TIME)

    SELECT '002','2011-08-07 20:29:05.787' UNION ALL

    SELECT '002','2011-08-07...

  • RE: help with select

    Mad-Dog (8/9/2011)


    this syntax give me the right results but can it be change some how to start with a select first and not with "with cte as"?

    THX

    As John says, Yes...

  • RE: help with select

    How about a little sample data, say 10 rows split across two day boundaries?

  • RE: help with select

    Mad-Dog (8/9/2011)


    Hi,

    i've a table with 2 columns one log_event_num (int) and one log_event_time (datetime).

    how i can write a select that will show me every day only one log_event_num per event?

    THX

    Do...

  • RE: Return a single row instead of multiple

    uche_ezeribe (8/9/2011)


    ...

    what i get now is

    UserName FirstName LastName VacID vacancy Degree

    -----------------------------------------------------------

    joyr Joy ...

  • RE: use result from select as where

    This will show you a way to do it.

    -- test table

    DROP TABLE #ContainerMemberDefinitions

    CREATE TABLE #ContainerMemberDefinitions (ContainerID INT, Expression VARCHAR(MAX))

    INSERT INTO #ContainerMemberDefinitions (ContainerID, Expression)

    SELECT 15, '#Nodes.Caption LIKE ''%adsl%''' UNION ALL

    SELECT 15,...

  • RE: use result from select as where

    How do you know the two rows from the first query are ORred and not ANDed?

    Do you have any restrictions over how you execute the SQL i.e. can you create...

  • RE: use result from select as where

    Of course. Can you post the parts of the statement you wish to create, with a little more explanation?

  • RE: Today's Random Word!

    Daniel Bowlin (8/8/2011)


    Ready. Set. Commence Week.

    Same time every day Dan. Have you had your shredded wheat?

  • RE: use result from select as where

    Do you mean, construct the WHERE clause programatically client-side?

  • RE: use result from select as where

    mickdunde (8/8/2011)


    Hi there

    I've looking for a way how to use result from a select as a where clause to another statement. As an example I have two tables, tblNodes and...

  • RE: MERGE statement to include new column that is an identity column. Don't know how to populate.

    hxkresl (8/5/2011)


    ... I am migrating data into an identity column whose values cannot be wholesale reseeded. I have to maintain the associations between existing rows of information in the...

  • RE: Delete ON Self Join

    Cities and states are different entities with different properties. Model them as parent and child tables.

    This problem is only the beginning, it will get much worse if you continue...

  • RE: Today's Random Word!

    Tom.Thomson (8/4/2011)


    crookj (8/4/2011)


    proboscis

    haustellum

    Malaria

  • RE: MERGE statement to include new column that is an identity column. Don't know how to populate.

    hxkresl (8/4/2011)


    ...

    merge mogknicker.mog.EnligtenmentSchemaMap as T

    ...

    What?!! No, no. Classy mogs go commando.

Viewing 15 posts - 6,781 through 6,795 (of 10,144 total)