Forum Replies Created

Viewing 15 posts - 256 through 270 (of 462 total)

  • RE: Min of row values instead of particular column value

    Can you give us table script, test data and expected result? In the below format.

    Create table ...

    INSERT INTO ....

    Expected REsult....

  • RE: How to detect duplicates ?

    Row_Number version for it. It would give the first record of the duplicate set order by your PK,

    CREATE TABLE #URTABLE (PK int, Field1 int, Field2 int , Field3 int)

    INSERT...

  • RE: Internal working of transaction isolation levels

    siddartha pal (10/26/2009)


    1: Does this setting is for the proc duration? After the procs execution, will the same set back to default level.

    AS PER BOL,

    If you issue SET TRANSACTION...

  • RE: Date formats - need help

    Ok, not sure if this is what you are looking for,

    Test data

    CREATE TABLE #T1 (id int, date datetime)

    CREATE TABLE #T2 (id int, date varchar(100))

    INSERT INTO #T2 VALUES (1,'13/01/2008 22:42:20')

    INSERT...

  • RE: Step into Stored Procedure failing with message "Cancelled by User"

    Can you execute that proc in SSMS window and see if it executes successfully?

  • RE: Date formats - need help

    I actually meant converting the value in the insert statement (see the bolded part below)

    INSERT [tblAuthor] ([Author_ID], [Group_ID], [Username],

    [Real_name], [User_code], [Password], [Salt], [Author_email],

    [Homepage], [Location], [MSN], [Yahoo], [ICQ], [AIM],...

  • RE: Date formats - need help

    snadowitz (10/26/2009)


    what does the 103 mean in the statement?

    The character string that you are trying to convert is in this format dd/mm/yyyy (British/French) and its 3 if the input...

  • RE: How to detect duplicates ?

    SELECT * FROM

    (SELECT * ,ROW_NUMBER()

    OVER (PARTITION BY FIELD1, Field2, Field3 Order BY PK) as row_no

    FROM URTABLE) T

    WHERE ROW_NO > 1

    This will give you duplicates, and all the...

  • RE: Date formats - need help

    cant u convert the date format something like this while importing?

    Select Convert (datetime, '13/01/2008 22:42:20', 103)

    I doubt if you will get AM/PM format for time in yyyy-mm-dd date format(lets see...

  • RE: Using JOIN to display data

    sorry, to be honest, I am not sure of the .net part of your application(I dont know .net that much 🙁 ). I was trying to see if there is...

  • RE: Using JOIN to display data

    Not sure if I undestood your situation completely, but you are using this update command,

    UPDATE Data

    SET Slot1 = @Slot1,

    Slot2 = @Slot2,

    Slot3 = @Slot3,

    Slot4 = @Slot4,...

  • RE: How to synchronize two databases

    I guess there are tools. (not sure about ss2k5 itself) checkout readgate's sqlcompare, that one should be useful.

  • RE: customizing a query output

    I think you are not trying to understand what your query is doing! just put whatever column you want in your select clause!!

    SELECT CASE WHEN RowCnt > 1...

  • RE: customizing a query output

    This wont help you?

    SELECT *, CASE WHEN Row_no > 1 THEN

    CONVERT(varchar, WO)+ CHAR(63 + Row_no)

    ELSE CONVERT(varchar,WO) END FROM

    (Select * ,

    Row_Number() OVER (Partition BY WO ORDER BY WO)...

  • RE: customizing a query output

    Will this do?

    CREATE TABLE #WO(WO int, RD varchar(10))

    INSERT INTO #WO VALUES (122 ,'asas')

    INSERT INTO #WO VALUES (123 ,'der')

    INSERT INTO #WO VALUES (124 ,'wer3er')

    INSERT INTO #WO VALUES (124 ,'rtre')

    INSERT INTO #WO...

Viewing 15 posts - 256 through 270 (of 462 total)