Forum Replies Created

Viewing 15 posts - 1 through 15 (of 16 total)

  • RE: split data of month into weeks

    hi Friend,

    Try This way..

    DECLARE

    @start_date DATETIME,

    @end_date DATETIME,

    @start_date1 DATETIME,

    @end_date1 DATETIME

    DECLARE...

  • RE: Subquery returned more than 1 value

    TRY THIS

    SELECT

    E.NAME,

    100 - SUM(ISNULL(ET.SOMEVALUE,0)) AS TESTCOLUMN

    FROM

    @EXAMPLETABLE ET RIGHT JOIN @EMPLOYEE E ON ET.EMPLOYEEID = E.ID

    WHERE

    ET.EMPLOYEEID=E.ID

    GROUP BY E.NAME

  • RE: Subquery returned more than 1 value

    TRY...

    SELECT

    E.NAME,

    100 - SUM(ISNULL(ET.SOMEVALUE,0)) AS TESTCOLUMN

    FROM

    @EXAMPLETABLE ET RIGHT JOIN @EMPLOYEE E ON ET.EMPLOYEEID = E.ID

    WHERE

    ET.EMPLOYEEID IN ('1','2')

    GROUP BY E.NAME

  • RE: SQL query to return child-paren relationship

    try This.

    DECLARE @CIDHR VARCHAR(100)

    DECLARE @HARAR TABLE(PID VARCHAR(10),CID VARCHAR(10),CTP VARCHAR(10))

    SET @CIDHR=''

    INSERT INTO @HARAR

    SELECT 'TP1' as PID,'TC1' as CID,'C' as CTP UNION ALL

    SELECT 'TP1' as PID,'TP2' as CID,'P' as...

  • RE: How to check Table Column In like

    Thanks Kingston Dhasian

    Its work.....:hehe:

  • RE: sql query

    Dear Subba Try This....

    declare @t1 TABLE(id int,region varchar(10),Lamt decimal(20,3))

    insert into @t1 values(1,'x',10.12)

    insert into @t1 values(1,'y',20.12)

    insert into @t1 values(1,'z',30.12)

    declare @t2 TABLE(id int,region varchar(10),lamt decimal(20,3))

    insert into @t2 values(1,'x',55.12)

    insert into @t2 values(1,'y',57.12)

    insert into...

  • RE: SSRS- Needs to display All month

    U can do it by Matric Report. and Convert Month Numeric value to month Name for showing column Header as Jan,feb, march

  • RE: How to check Table Column In like

    Check Query That I tried

    DECLARE @CFR as Table

    (CFRCode varchar(50),

    CFR_MATCH Varchar(10),

    CFR_COMM_CODE varchar(50),

    CFR_COMM_DESC varchar(250),

    Final_DEsc varchar(300))

    DECLARE @CFR_SAVVION as Table

    (CFRCode varchar(50),

    CFR_COMM_CODE varchar(50),

    COMMENT varchar(250))

    INSERT INTO...

  • RE: Multi column Pivot

    I don it by using Cursor..

    DECLARE @HIPTMP TABLE

    ( [ID] [int] NULL,

    [HIP1Person_Name] [varchar](50) ,

    [HIP1RelationShip] [varchar](10),

    [HIP1Amount] [int] NULL,

    [HIP1Casetype] [varchar](40),

    [HIP1Addess] [varchar](100))

    DECLARE @Person_Name varchar(50)

    DECLARE @RelationShip varchar(50)

    DECLARE @Amount int

    DECLARE @Casetype...

  • RE: Multi column Pivot

    I tried it by Pivot Function But it work with only Aggregate Function.

    My Requirement to Pivot Multiple Row with Multiple Column to Single Rows

    ---:-)

  • RE: how to retreive the last login date (the required sql command)

    Try This Select Statement IN MYSQL

    SELECT MAX(logindate) as Login_DATE

    FROM UserLoginTable

    WHERE user_id = @user_id

  • RE: SSRS 2008 .. How to create drop down menu for different databases in same server

    If all DB on same server then u can create data source with respect to any of DB but make sure to Specify DB Name along with Query like DB...

  • RE: Pivot

    Hey friend,

    as per ur query it work with single column.But i wan to Pivot more then column...!!!

    I wan result such format

    1 a Math 80 english 80 hindi 90 Null Null

    2...

  • RE: can I pass null to datatable variable in stored procedure

    Try This.

    CREATE PROCEDURE [dbo].[usp_TestSP]

    @tblClientIds dbo.tblTypeIds = null readonly

    AS

    BEGIN

    SET NOCOUNT ON;

    Declare @TEMPID int

    Select @TEMPID=COUNT(*) from @tblClientIds

    IF @TEMPID=0

    BEGIN

    SELECT * from Client

    END

    ELSE

    BEGIN

    SELECT * from Client where ClientId in (Select ID...

  • RE: can I pass null to datatable variable in stored procedure

    Try This.

    CREATE PROCEDURE [dbo].[usp_TestSP]

    @tblClientIds dbo.tblTypeIds = null readonly

    AS

    BEGIN

    SET NOCOUNT ON;

    Declare @TEMPID varchar(10)

    Select @TEMPID=ID from @tblClientIds

    SELECT * from Client where ClientId in (CASE WHEN @TEMPID is NULL THEN...

Viewing 15 posts - 1 through 15 (of 16 total)