Forum Replies Created

Viewing 15 posts - 196 through 210 (of 1,109 total)

  • RE: Select * or select only the columns you need

    Even if you select form a single table, select * would need all the columns returned, so SQL Server will need to scan through the whole table. If you need...


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • RE: finding groups of related data

    Ok, and here is a solution without a temptable :), just a CTE expression. Although I'm sure there is a more efficient way to do this 🙂

    WITH ...


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • RE: finding groups of related data

    Hmm, interesting problem, did not want to spend much time on it, so here is a solution using a temporary table:

    GO

    WITH cte

    ...


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • RE: Duplicate identification

    indraprakash (6/20/2008)


    thanks Andras

    indraprakash

    The solution actually came from JohnG, and I've learned something too 🙂

    Glad your issue is solved

    - Andras


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • RE: Duplicate identification

    ...

    You are incorrect Andras. Another poster has already put up code that works in SQL 2005. There is a mechanism for 2000 as well although it is certainly...


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • RE: bcp out empty string in the table into csv file

    rkjayaraj (6/20/2008)


    I have a SQL Server table with nvarchar type column which has not null constraint. I am inserting empty string ("") from Java to the table column. When I...


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • RE: Duplicate identification

    JohnG (6/19/2008)


    Also knowing Oracle, I do wish that there was a ROWID equivalent in SQL Server. I'm also aware that it is used in "finding duplicate" queries.

    In SQL Server...


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • RE: fetching records which repeats more than 5 times

    jim.pennington (6/18/2008)


    You need to add a where clause for Present_Absent = 'A' or else you will return any student_ID that has more than 5 entries.

    Good point, I should have read...


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • RE: How to add IDENTITY constraint after creating a table?

    sharma (6/18/2008)


    I had created table id as INT

    How to alter the table to add IDENTITY key

    You will need to rebuild the table, i.e. you cannot just use an alter...


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • RE: fetching records which repeats more than 5 times

    Andras Belokosztolszki (6/18/2008)


    What about something like:

    SELECT Student_Id,

    YEAR(Date),

    COUNT(*) AS numberOfAbsences

    FROM studentTable

    GROUP...


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • RE: fetching records which repeats more than 5 times

    What about something like:

    SELECT Student_Id,

    YEAR(Date),

    COUNT(*) AS numberOfAbsences

    FROM studentTable

    GROUP BY Student_Id,...


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • RE: Duplicate identification

    indraprakash (6/18/2008)


    thanks,

    But this is not the solution of my query. I want to know how to delete dulicate records without using any new table or any add any extra column

    In...


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • RE: Duplicate identification

    indraprakash (6/18/2008)


    Is there any thing like rowid in Oracle?

    How to delete duplicate records from SQL sever without using template table or create an extra column.

    There is no rowid that...


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • RE: Audit the sp's changes

    bkrishnasamy (6/18/2008)


    Could you explain ,how to setting the trace in advance or

    tell me about the ddl trigger.

    Both of these are largish topics, so I'd suggest you look at Books...


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • RE: Audit the sp's changes

    bkrishnasamy (6/18/2008)


    Hi,

    we are using window's authentication in my server. I want to know, who (hostname or machine id) is updated and compiled any sp's recently . Plz help me...


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

Viewing 15 posts - 196 through 210 (of 1,109 total)