Forum Replies Created

Viewing 2 posts - 16 through 17 (of 17 total)

  • RE: charindex() and substring() functions

    hope this one helps u

    SELECT name,

    substring(name,CHARINDEX(' ', name)+ 1 ,len(name)) as Secondnamepart,

    substring(name,CHARINDEX(' ', name)+ 1 ,charindex(' ',substring(name,CHARINDEX(' ', name)+ 1,len(name))))

    +' '+ substring(name,1,1)+ '.' As NameTag

    FROM test

  • RE: Join Query

    hi,

    Your first query

    Select curr.StoreId as StoreId,

    Curr.Sales as CurrSales,

    LastYear.Sales as LastYearSales,

    ...

Viewing 2 posts - 16 through 17 (of 17 total)