Forum Replies Created

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

  • RE: SSIS Package Failed

    Ok got it.

    Thank you sir.

  • RE: Database Restore from .bak file

    This is throwing an error:

    Msg 156, Level 15, State 1, Line 2

    Incorrect syntax near the keyword 'FILE'.

    Msg 319, Level 15, State 1, Line 3

    Incorrect syntax near the keyword 'with'. If...

  • RE: Database Restore from .bak file

    Thanks SSC.

    Can you give me the full query.

  • RE: query optimizing

    Yes you are correct. any more suggestions plz

    Thanks

  • RE: MTD AND YTD TOTALS IN SQL QUERY

    Somehow i did the query can you please have a look at that .

    SET ARITHABORT OFF

    SET ANSI_WARNINGS OFF

    SELECT

    SR.SALESREP_NAME AS "Account Owner"

    ,CA.ACCOUNT_NUMBER AS "Account ID"

    ,CA.CUSTOMER_ACCOUNT_NAME AS "Account...

  • RE: MTD AND YTD TOTALS IN SQL QUERY

    Attached sample data in given format.

  • RE: MTD AND YTD TOTALS IN SQL QUERY

    Attached sample data in excel files. Please see sample.rar file for excel files

    Thank you.

  • RE: MTD AND YTD TOTALS IN SQL QUERY

    Attached is the sample data.

  • RE: MTD AND YTD TOTALS IN SQL QUERY

    Sorry sir i cannot give data. attached is the ouput document.

    And the query which i wrote is :

    SELECT

    SCD.SALESREP_NAME AccountOwner

    ,CA.ACCOUNT_NUMBER AccountID

    ,CA.CUSTOMER_ACCOUNT_NAME...

  • RE: MTD AND YTD TOTALS IN SQL QUERY

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    SET ANSI_PADDING ON

    GO

    CREATE TABLE [dbo].[CUSTOMER_ACCOUNT_DIMENSION](

    [CUSTOMER_ACCOUNT_ID] [int] NOT NULL,

    [REF_CUST_ACCOUNT_ID] [float] NULL,

    [REF_PARTY_ID] [float] NULL,

    [CUSTOMER_ACCOUNT_NAME] [varchar](100) NULL,

    [ACCOUNT_NUMBER] [varchar](30) NULL,

    [PARTY_NUMBER] [varchar](30) NULL,

    [SALES_CODE] [varchar](30) NULL,

    [SALES_CODE_DESCR] [varchar](80) NULL,

    [INDEPENDENT_CUSTOMER_IND] [varchar](1) NULL,

    [CUST_ACCOUNT_STATUS_CODE] [varchar](1) NULL,

    [CUST_ACCOUNT_STATUS_DESCR]...

  • RE: Tsql query help

    Can you please let me know how to do in batch process.

  • RE: sql query help

    Query Please.

    Thanks

  • RE: sql query help

    the desired output i am expecting will something like this

    packageid productid unitprice sum(unitprice)group by each packageid

  • RE: sql query help

    please see updated query:

    WITH RecursiveTable_CTE(ProductID, PackageID,unitprice)

    AS

    (SELECT pp.ProductID, pp.PackageID,p.unitprice FROM ProductPackage pp

    join product p on pp.productid =p.productid

    UNION ALL

    SELECT pp.productID, pp.PackageID,p.unitprice FROM ProductPackage pp

    join product p on pp.productid =p.productid

    INNER...

  • RE: sql query help

    WITH RecursiveTable_CTE(ProductID, PackageID)

    AS

    (

    SELECT pp.ProductID, pp.PackageID FROM ProductPackage pp

    UNION ALL

    SELECT pp.productID, pp.PackageID

    FROM ProductPackage pp

    INNER JOIN RecursiveTable_CTE rt

    ON pp.PackageID=rt.ProductID

    )

    SELECT * FROM RecursiveTable_CTE;

    option (maxrecursion 0);

    i tried to do this to get...

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