Forum Replies Created

Viewing 15 posts - 1,531 through 1,545 (of 2,268 total)

  • RE: The database is full!

    Create a new database or upgrade to SQL standard edition.

  • RE: how to read unique records based a field that have duplicate values

    DURGESH (3/9/2009)


    hi ss

    It works fine if col1 is integer, but if col1 is varchar then it is not working

    You will need to convert col1 to an INT use;

    ...

  • RE: TITLE: Microsoft SQL Server Management Studio Express

    Check your error logs there will be a more descriptive error message in there

  • RE: Hit a big problem with setting up a replication

    Transactional replication does not invovle adding an extra column to your table

  • RE: <> 'text value'causing issues with NULL

    winston Smith (3/4/2009)


    I have this condition in a select statement

    tbl.columnName <> 'ACT'

    In the actual table tbl.columnName is NULL. I thought NULL is not equal to 'ACT'. but nothing is selected...

  • RE: Add two fields with space

    yulichka (3/4/2009)


    How to add First and Last Name to one field as Name

    Select FirstName + Last Name as Name from tbl1

    Select FirstName + ' ' + Last Name as...

  • RE: Question on following sql

    nymgk_75 (3/4/2009)


    Hey Jeff,

    Thanks for the reply! I like your way also...

    Can you explain what the "U" is used for then? We didn't have that in the other...

  • RE: Query

    Dugi (3/4/2009)


    steveb (3/4/2009)


    try this code..

    SELECT ParentId , '--Parentid' AS TypeId

    FROM YouTable

    UNION ALL

    SELECT ChildId , '--Childid' AS TypeId

    FROM YourTable

    Instead of UNION use UNION ALL because the UNION statement select only distinct...

  • RE: Query

    try this code..

    SELECT ParentId , '--Parentid' AS TypeId

    FROM YouTable

    UNION

    SELECT ChildId , '--Childid' AS TypeId

    FROM YourTable

  • RE: Select distinct on multiple columns

    sqlcentral (3/3/2009)


    steveb (3/3/2009)


    That is why i asked for a unique column that defines the order, without a primary key on your table then this is going to be difficult.

    is...

  • RE: Select distinct on multiple columns

    sqlcentral (3/3/2009)


    steveb (3/3/2009)


    No, this query will return all the distinct rows in your table where the level is the highest for each entry_Id and group_id

    Ok, perhaps my sample data...

  • RE: mirror server with one-day-delay

    This is not possible with db mirroring as each database needs to be kept in synch.

    The best idea i can think of , would be to automate a restore...

  • RE: Select distinct on multiple columns

    sqlcentral (3/3/2009)


    steveb (3/3/2009)


    Thanks, this code should work orderd by Level

    SELECT * FROM YourTable WHERE LEVEL IN(

    SELECT MAX(LEVEL) AS LEVEL

    FROM YouTable

    GROUP BY [entry_id], [group_id])

    That will only...

  • RE: Derived Columns - Proper Use

    This sounds like a reasonable approach.

    The way I normaly handle things like this , would be to create a look-up table with all the JType values add a column ...

  • RE: Select distinct on multiple columns

    sqlcentral (3/3/2009)


    Steveb: I already added another post with a column called level.

    Thanks, this code should work orderd by Level

    SELECT * FROM YourTable WHERE LEVEL IN(

    SELECT MAX(LEVEL) AS LEVEL

    ...

Viewing 15 posts - 1,531 through 1,545 (of 2,268 total)