Forum Replies Created

Viewing 15 posts - 5,371 through 5,385 (of 5,393 total)

  • RE: Deleted Transaction Log

    It would be interesting to know how he could delete a LDF file with the service running...

    What's the database recovery model?

    You could try to attach the database with a...

  • RE: TRIM functions do not work

    I think you should identify one of the rows you want to update and then print out the ascii code of each character in the field: maybe you'll find tabs...

  • RE: In or exists operator

    su_kumar11 (8/4/2008)


    Hi,

    I want to know that how to use Exists operator instead for below query

    ...

    "select fname,lname,minit,job_lvl,job_id from employee where job_id in (1,2)"

    Sunil....

    I don't...

  • RE: Query help - conditional selection

    You could use a UNION statement if the tables have the same definition:

    SELECT *

    FROM (

    SELECT *, 'Type1' AS CustomerType

    FROM FirstTable

    ...

  • RE: Inserting Top 1 Record

    This is how I would do it:

    1. Insert rows without duplicate id. You can find them using something like:

    INSERT INTO destinationTable

    SELECT *

    FROM StageTable

    WHERE id IN (

    ...

  • RE: Catching datetime conversion errors, replace with NULL

    First of all I would say that the input should be checked in the application side, but, if you can't do it otherwise, you can check for conversion errors with...

  • RE: Select Statement

    Ok, so, let's convert it into SQL2000 syntax:

    SELECT TOP 1 *

    FROM (

    SELECT TOP The_Row_You_Want *

    FROM MyTable AS A

    ORDER BY Column1 ASC

    ) AS DATA

    ORDER BY Column1 DESC

    There are...

  • RE: Select Statement

    Of course you can:

    SELECT *

    FROM (

    SELECT *, ROW_NUMBER() OVER (ORDER BY Column1) AS ROW_NUM

    FROM MyTable

    ) AS Data

    WHERE ROW_NUM = @The_Row_You_Want

    This works only...

  • RE: Updating through cursors

    Hugo Kornelis (7/24/2008)


    Gianluca Sartori (7/24/2008)


    I agree that this question was a bit confusing. I would never have chosen the "right" answer just because this is not any way to update...

  • RE: Updating through cursors

    I agree that this question was a bit confusing. I would never have chosen the "right" answer just because this is not any way to update the cursor, but the...

  • RE: how to create trigger for delete

    Try using INSTEAD OF triggers:

    CREATE TABLE Test (

    col1 int

    )

    GO

    CREATE TRIGGER TR_TEST ON Test

    INSTEAD OF DELETE

    AS

    BEGIN

    DECLARE @pr int

    SET @pr = 0

    END

    GO

    INSERT INTO Test values(1)

    SELECT * FROM Test

    And you'll get:

    col1

    -----------...

  • RE: XML Storage

    Really excellent question!

    Knowing nothing about XDM I tried to figure out what the storage sizes would be running this command:

    SELECT datalength(@x)

    SELECT datalength(@n)

    The result was:

    ...

  • RE: Query via linked server (AS400) fail after reboot

    Can you post here the error message you're getting?

    I would also need to know the options you set in the provider and linked server dialogs.

  • RE: Query via linked server (AS400) fail after reboot

    We've had much trouble with that provider, try Hit OLEDB/400.

    Are you working with four-part names or openquery? It makes a big difference. If you're not able to query data...

  • RE: Query via linked server (AS400) fail after reboot

    Which OLEDB provider are you using?

Viewing 15 posts - 5,371 through 5,385 (of 5,393 total)