Forum Replies Created

Viewing 8 posts - 31 through 38 (of 38 total)

  • RE: SQL Query

    SELECT TOP 2 DrawID,DrawDate,WinningNumbers FROM [Result Table] ORDER BY DrawID desc

  • RE: Format Company Name

    Hey Sush!

    I thought that you can do the rest...ok

     

    4 u

    --Create function Initcap

    CREATE  FUNCTION INITCAP (@formatString  VARCHAR(8000) )

    RETURNS VARCHAR(8000)

    AS

    BEGIN

     DECLARE

     @i  INT,

     @c  CHAR(1),

     @result VARCHAR(8000)

     

     SET @result = LOWER(@formatString)

     SET @i = 2

     SET...

  • RE: Format Company Name

    Hey Sush!

    I thought that you can do the rest...ok

     

    4 u

    --Create function Initcap

    CREATE  FUNCTION INITCAP (@formatString  VARCHAR(8000) )

    RETURNS VARCHAR(8000)

    AS

    BEGIN

     DECLARE

     @i  INT,

     @c  CHAR(1),

     @result VARCHAR(8000),

     @formatString varchar(100)

     

     SET @formatString = 'TATA CONSULTANCY SERVICES...

  • RE: Format Company Name

    DECLARE

    @i  INT,

    @C  CHAR(1),

    @result VARCHAR(8000),

    @formatString varchar(100)

    SET @formatString = 'THE MOBILE COMPANY'

    SET @result = LOWER(@formatString)

    SET @i = 2

    SET @result = STUFF(@result,1,1,UPPER(SUBSTRING(@formatString,1,1)))

    WHILE @i<= LEN(@formatString)

    BEGIN

     SET @C = SUBSTRING(@formatString,@i,1)

     IF...

  • RE: Encrypt/Decrypt FUncionality

    /*If you desire to use encryption/decryption logic for password,

    then have a look at the following, hope this serves your purpose

    */

    Create Table Password

    ([Password] binary(255))

    insert into Password

    Select encrypt('Vivek')

    Union All

    Select...

  • RE: Order by in Union all

    USE pubs

    --SELECT Count(*) FROM authors WHERE ZIP <= 93000

    --SELECT Count(*) FROM authors WHERE ZIP > 93000 AND ZIP < 94500

    --SELECT Count(*) FROM authors WHERE ZIP >= 94500

    SELECT

  • RE: TSQL problem

    Frank,

    Not Exists worked fine.

    Many Thanks, for your suggestion.

     

     

  • RE: how to find difference between two successive date records

    Thanks Frank! This really helped me solving my problem.

Viewing 8 posts - 31 through 38 (of 38 total)