Forum Replies Created

Viewing 15 posts - 301 through 315 (of 330 total)

  • RE: How to get True /False

    Hello friends Thanks for your valuable suggestion i got my solutions

    here it is You just copy this and Run you will find my Requirement :

    DECLARE @FromTime VARCHAR(20), @ToTime...

  • RE: How to get True /False

    Hi

    I have Attached my Requirement

    In Q1 (File Name) The O/P is True it is correct because 12:01:00 to 12:59:00 lies between the Temp table Range of 11:31:00 to...

  • RE: Merging filegroups

    Go to Modify Table

    Go to Properties

    Go to Table Designer

    Go to Regular data space specification Go to file group or Part Choose the File groups which you...

  • RE: How to get True /False

    parthi-1705 (12/1/2009)


    DECLARE @FromTime VARCHAR(20), @ToTime VARCHAR(20)

    DECLARE @TEMP TABLE (RID INT IDENTITY,FTIME datetime,TTIME datetime)

    INSERT INTO @TEMP

    SELECT '2009-12-01 10:00','2009-12-01 11:30'

    UNION ALL

    SELECT '2009-12-01 11:31','2009-12-01 13:00'

    UNION ALL

    SELECT '2009-12-01 14:00','2009-12-01 15:00'

    UNION ALL

    SELECT '2009-12-01...

  • RE: How to get True /False

    DECLARE @FromTime VARCHAR(20), @ToTime VARCHAR(20)

    DECLARE @TEMP TABLE (RID INT IDENTITY,FTIME datetime,TTIME datetime)

    INSERT INTO @TEMP

    SELECT '2009-12-01 10:00','2009-12-01 11:30'

    UNION ALL

    SELECT '2009-12-01 11:31','2009-12-01 13:00'

    UNION ALL

    SELECT '2009-12-01 14:00','2009-12-01 15:00'

    UNION ALL

    SELECT '2009-12-01 15:01','2009-12-01...

  • RE: How to get True /False

    Hi this is what the Input i too get from the table i my self convert it and try by using Varchar.But yours always shows FALSE .Not able to get...

  • RE: How to write a trigger

    When ever You post on Development You better post with example so that we can get the idea ,so that you might get the result sooner

  • RE: How to write a trigger

    I think this is thing you are looking for as per your Requirement

    DECLARE @STARTDATE DATETIME

    DECLARE @ENDDATE DATETIME

    DECLARE @PLANNED SMALLINT

    SET @STARTDATE ='12/01/2009'

    SET @PLANNED=10

    SELECT @ENDDATE=DATEADD(dy,@PLANNED,@STARTDATE)

    SELECT CONVERT(VARCHAR,@ENDDATE,101)

  • RE: How to write a trigger

    Hi

    You are asking for SQL or for .Net ,If you are asking for SQL then Give me any Example related to that.

  • RE: How to get

    Hi Gail thanks

    how to get this

    Select 'Hi I 'll be there @6'O clock '

  • RE: Page Allocation

    Hi

    I little bit confused with that one.My thing is whether Pages are there in Transaction Log

    (.LDF).Pages are will be there are not.After that i get to...

  • RE: How to write if else condition in Procedure

    Hi try This

    DECLARE @Value VARCHAR(50)

    select @Value=abc from test_abc WHERE LoginName=@LOGIN_NAME

    IF @Value='Inv'

    BEGIN

    Select

    'Active' AS DISPLAY,

    '0' AS VALUE

    Union

    Select

    'Archived' AS DISPLAY,

    '1' AS VALUE

    END

    ELSE

    BEGIN

    Select

    'Active' AS DISPLAY,

    '0' AS VALUE

    Union

    Select

    'Archived' AS DISPLAY,

    '1' AS...

  • RE: Percentage in Case statement

    Hi Moorthy

    I just done this for dynamic one.

    If u know how many types you have then no problem you can use case but if you dont know the types i...

  • RE: Percentage in Case statement

    Try This.....

    CREATE TABLE #TEMP (

    Col1 int not null,

    Type int not null

    )

    GO

    INSERT #TEMP

    SELECT 1,1

    UNION

    SELECT 2,1

    UNION

    SELECT 3,2

    UNION

    SELECT 4,2

    UNION

    SELECT 5,2

    DECLARE @TotCnt INT

    Select @TotCnt=COUNT(*) from #TEMP

    Select Count(*) Type,CONVERT(DECIMAL(20,2),Count(*)/5.0*100) as...

  • RE: needed help on special kind of query which extracts data

    Try this....

    CREATE TABLE #TEMP (Rid int identity , NAME VARCHAR(1000))

    INSERT INTO #TEMP

    exec SP_MSforeachDB 'USE ? Select TABLE_CATALOG+''..''+TABLE_NAME From Information_schema.Tables'

    SET NOCOUNT ON

    DECLARE @Cnt INT ,@I INT ,@Name VARCHAR(1000)

    SET @I=1

    SELECT @Cnt=Count(*)...

Viewing 15 posts - 301 through 315 (of 330 total)