Forum Replies Created

Viewing 15 posts - 16 through 30 (of 38 total)

  • RE: Pls. Help me in getting my desired output

    Dear Neetu,

    You need to make very small change in your table B, Add one primary key ProId as follow

     

    CREATE TABLE B (

     ProID int IDENTITY (1, 1) NOT NULL ,

     RefNo int...

  • RE: Speeding up a select count(*)

    Try this:

     

    Select count(1)

    From dbname..tablename

    Where sdate=CONVERT(varchar,  GETDATE()-1, 101)

  • RE: Convert String to Date

    SELECT SUBSTRING('20050910',7,2)+'/'+SUBSTRING('20050910',5,2)+'/'+SUBSTRING('20050910',1,4)

  • RE: Swaping Row to column

    I give you full 100 out of 100. Thank you.

     

    Vivek

  • RE: Swaping Row to column

    Hunting has been done long back - 2 years before. If you don't mind, kindly provide the link if already posted.

    Well, hunt me if you can..?

    Vivek - HUB of...

  • RE: Swaping Row to column

    ACTUAL

  • RE: Script to disable particular role of all users of database

    hi,

    after 3 days of pain, i have got the job done. thanks others for their time to look into the problem....

     

    We need people in action to accomplish impossible to possible.

     

    Vivek

     

  • RE: Script to disable particular role of all users of database

    I am not satisfied, as this is not working. Users can login and access the application

     

    Vivek

     

  • RE: Update problem

    Join is generally performancce degrader. Select Case is faster and executes in less time compared to JOIN. For faster execution, avoid join. Better table design is something I appreciate but  

    your query...

  • RE: Update problem

    --Hi,

    --Following SCRIPT will serve your purpose.

    DECLARE @ID int

     SELECT @ID = Max(ID) From Sheet

     --SELECT @ID

     WHILE @ID <> 0

     BEGIN

      UPDATE Sheet Set

       FromStatus

        = (

         SELECT

          CASE IsNull(EndDate,1)

           WHEN  1 THEN  'NULL'

           ELSE ToStatus

          END

         FROM

          Sheet

         WHERE...

  • RE: Stored Procedure.

    Ur nos are creating win win mysterious scenario...hope u hv understood my doubt...explain in det...

     

     

    Cheers,

     

    Vivek

  • RE: Stored Procedure.

    Will u be bit more clear...?

  • RE: SQL Query HELP...

    CREATE FUNCTION ReturnAll (@msgID  VARCHAR(8000) )

    RETURNS VARCHAR(8000)

    AS

    BEGIN

     DECLARE @Result  varchar(8000)

      ,@i  int

      ,@one  varchar(100)

      ,@two  varchar(100)

      ,@three  varchar(255)

     SET @one = ''

     SET @two = ''

     SET @three = ''

     SET @result = ''

     SELECT @i = Count(*) FROM t_Attachments WHERE msgID =...

  • RE: SQL Query HELP...

    ALTER  FUNCTION ReturnAll (@msgID  VARCHAR(8000) )

    RETURNS VARCHAR(8000)

    AS

    BEGIN

     DECLARE @Result  varchar(8000)

      ,@i  int

      ,@one  varchar(100)

      ,@two  varchar(100)

      ,@three  varchar(255)

     SET @one = ''

     SET @two = ''

     SET @three = ''

     SET @result = ''

     SELECT @i = Count(*) FROM t_Attachments WHERE msgID =...

  • RE: SQL Query

    Query 1 - >

    SELECT DrawID,DrawDate,WinningNumbers FROM [Result Table] WHERE

     DrawID IN (SELECT Max(DRAWID) From [Result Table])

     

    Query 2 - >

    SELECT DrawID,DrawDate,WinningNumbers FROM [Result Table] WHERE

     DRAWID IN (SELECT Max(DRAWID) FROM [Result...

Viewing 15 posts - 16 through 30 (of 38 total)