Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)

  • Reply To: Group and total by column Name

    Hi,

    I have just modified your query and, please find the below:-

    -- converting durationinsecs into int and summing the value
    SELECT Created, Name, Type, sum(cast (Durationinsecs as int)) as...
  • Reply To: how to get 0 if records have empty or null values when column datatype is numeri

    Hi,

     

    Please find the query below:-

    select ISNULL([id],0) id from empid 

    OR

    select case when ISNULL(id,0) = 0 then 0 else [id] end as enum from empid
  • Reply To: What is wrong with my code?

    Please find the query below:-

    CREATE TABLE ProjectCodes
    (
    ProjectID varchar(22) not null,
    ProjectName varchar(25) null,
    Level char(1) null,
    [Project Classification] varchar(14) null,
    [Project Type] varchar(11) null,
    Billable char(1) DEFAULT ('Y'),
    [Allow Charging] char(1) DEFAULT ('Y'),
    Active...
  • Reply To: Problem to Display Field With OPENXML

    Hello,

    I have gone through your query, find the below queries

    DECLARE @XML AS XML, @hDoc AS INT, @SQL NVARCHAR (MAX)

    SELECT @XML = XMLData FROM XMLwithOpenXML

    -- specified the namespace which was there...

  • Reply To: full text search

    Hello,

     

    You have to define the full-text index on the table. After that contains will work. For defining the full-text index, right-click on the table and select full-text index and click...

  • Reply To: Select n records in table X from a field on table Y

    I have created 2 tables asper your requirements and inserted the data into both tables

    Gifts_to_give:-

    Id_give number_of_gifts name city

    1 5 luis Barcelona

    2 3 Pedro Albacete

    3 10 Antonio Madrid

    Gifts:- having

    gift_Id city description...

  • RE: Stored Procedure Consolidation

    Yes, we can call stored procedures inside stored procedures.

    see sample storedprocedure:

    Create Procedure Details

    (

    @FromDate datetime

    ,@ToDate datetime

    ,@DateType nchar(10)

    )

    AS

    BEGIN

    IF @DateType = 'Birth'

    ...

Viewing 7 posts - 1 through 7 (of 7 total)