Forum Replies Created

Viewing 15 posts - 121 through 135 (of 142 total)

  • RE: Trigger to update existing records

    Yes,

    i want to update pre-existing data,

    at present trigger is firing for only newly updated or inserted records.

    i want Trigger should be fired one time for pre-existing data....

    Please help

  • RE: Date format

    Thank U anthony,

    Its working...

    Is there any alternate syntax/query to get the above result.

    i mean without using above code i want to generate the same output...

  • RE: Sorting - Custom Based.

    Hi anthony

    Is it Possible to get only single column name.

    namesortorder

    Smith1

    Jack2

    David3

    Ellen4

    john5

    Peter6

    sortorder column is not required

  • RE: Sorting - Custom Based.

    Thaaaanks anthony

    Great.....!

  • RE: Date Format

    Hi Team,

    Table and data is normat,

    in my query am checking whether it is null or not null and

    am not converting to normal date format.

    can u please convert it to...

  • RE: Date Format

    CREATE TABLE ETCOL (NAME VARCHAR (50), DOB DATETIME)

  • RE: Date Format

    BEGIN

    select @FinalString =(SELECT RTRIM(+ISNULL('Name','')+' : ' +ISNULL(+CAST(Name AS VARCHAR(100))+' ',''))

    FROM ETCOL WHERE RIGHT_TEXT ='Name') +CHAR(10)

    END

    ELSE

    BEGIN

    select @FinalString=(SELECT RTRIM(+ISNULL('Name','')+' : ' +ISNULL(+CAST(Name AS VARCHAR(100))+' ','') +ISNULL(' DOB :'+CAST(DOB AS...

  • RE: Date Format

    Date format in DOB Column is : '2012-09-30 00:00:00.000'

    i want date format in : Sep 30, 2012

  • RE: How to retrieve Table Variable data in a Trigger

    Sorry for asking,

    my requirement is:

    i've to call the stored procedure based on "id" and get the corresponding Name from the temp table.

    Please suggest

  • RE: How to retrieve Table Variable data in a Trigger

    using a stored procedure inserted records in to a #Temp_Table.

    how to retieve the data in a Trigger

    am using below

    #Temp_Table

    ----------------------

    Id | Name

    ----------------------

    101Paint

    102Walls

    103Furn

    ----------------------

    Trigger:

    Create trigger Trigger_Name

    (

    ---

    ---

    )

    EXEC Stored_procedure @ID

    select * from #temp_table

    --

    But it is...

  • RE: Searching in two tables and add final result to a string

    Yes, Using joins..

    First it need to check in table1, if value found then assign that values to a string,

    if not found then only it should check in table2.

    table 1 :...

  • RE: Concatenation of strings with condition check,,,

    Hi Team,

    BEGIN

    SELECT RTRIM(

    +ISNULL(Col_Name,'')+' : '

    +ISNULL(+CAST(ColB AS VARCHAR(10))+' ','')

    ...

  • RE: Concatenation of strings with condition check,,,

    Hi thank U Very Much,

    But small change..

    If column B is NULL then ColC should not append to the string.

    Please.....

  • RE: Re-entered : Searching Columns for Seperate Strings

    Hi,

    am trying to give some more brief..

    my previous requirement is

    I having a table with 5 columns

    Record_idCol1Col2Col3Col4Col5

    ------------------------------------------------------

    101AABAA

    102BBNULLNULLB

    103CCCNULLC

    104DCDDD

    105AAAAAA

    106BCAAAD

    if record 101 contains all 5 columns same (i.e:A) then only "A" should be...

  • RE: Re-entered : Searching Columns for Seperate Strings

    Hi Eugene,

    I agree with what ur saying,

    here am giving some more details,

    --

    ;WITH Mysample (Record_id, Col1, Col2, Col3, Col4, Col5)

    AS

    (SELECT 101, 'A', 'A', 'B', 'A', 'A' UNION ALL

    SELECT...

Viewing 15 posts - 121 through 135 (of 142 total)