Forum Replies Created

Viewing 9 posts - 16 through 24 (of 24 total)

  • RE: importing a pivot table data

    Hi there Hussain,

    Try something like this

    -- Generate testdata

    DECLARE @T TABLE (id int, title4 varchar(20), value varchar(50))

    INSERT @T (id, title4, value)

    VALUES(63, 'Name', 'XYZ')

    INSERT @T (id, title4, value)

    VALUES(63, 'RollNo', '1011190')

    INSERT @T (id,...

  • RE: Get the FieldName and specified record Value in Comma separated

    It would only store the "last" deleted record and ignore the others. I followed the example from the beginning stating that one record at at time would be deleted from...

  • RE: Get the FieldName and specified record Value in Comma separated

    Trigger would look something like this, I omitted the datetime fields since I don't know how you'd want them presented

    CREATE TRIGGER Employee_CaptureDelation

    ON Employee

    AFTER DELETE

    AS

    DECLARE @DeletedRecord VARCHAR(4000)

    SELECT @DeletedRecord = 'ID,' +...

  • RE: UPDATE HELP

    Sorry, just realized spaces occured in the first table

    UPDATE B

    SET B.L_ID = A.ID

    FROM TableB B

    INNER JOIN TableA A

    ON REPLACE(A.Snumber, ' ', '') = REPLACE(B.Snumber, ' ', '')

    AND A.add =...

  • RE: UPDATE HELP

    If the problem is with the spaces, and addresses are actually matching, the following should work

    UPDATE B

    SET B.L_ID = A.ID

    FROM TableB B

    INNER JOIN TableA A

    ON A.Snumber = REPLACE(B.Snumber, '...

  • RE: Get the FieldName and specified record Value in Comma separated

    Hi,

    For this purpose you'd be better off implementing a trigger that fires on the deleted event of the table. Within the trigger you could forward the information you'd like to...

  • RE: UPDATE HELP

    Hi there,

    Syntax is as below:

    I don't really understand on what criteria you would like to link the data together though?

    UPDATE B

    SET B.L_ID = A.ID

    FROM TableB B

    INNER JOIN TableA...

  • RE: Question about Inner Joins

    Hi Scott and welcome back 😉

    Basically, what you're trying to do through your query is returning all employees having the same gender as a name of a department.

    INNER JOINING two...

  • RE: Question about Inner Joins

    Hi there,

    You can join columns from different tables no matter if they are defined or "linked" to each other as keys or not. Moreover, the tables do not have to...

Viewing 9 posts - 16 through 24 (of 24 total)