Viewing 15 posts - 1 through 15 (of 42 total)
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...
August 19, 2010 at 11:52 am
Thanks SSC.
Can you give me the full query.
August 19, 2010 at 11:05 am
Yes you are correct. any more suggestions plz
Thanks
October 7, 2009 at 12:45 pm
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...
September 15, 2009 at 9:01 am
Attached sample data in given format.
September 14, 2009 at 3:09 pm
Attached sample data in excel files. Please see sample.rar file for excel files
Thank you.
September 14, 2009 at 12:41 pm
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...
September 14, 2009 at 11:02 am
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]...
September 14, 2009 at 9:48 am
the desired output i am expecting will something like this
packageid productid unitprice sum(unitprice)group by each packageid
January 20, 2009 at 11:43 am
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...
January 20, 2009 at 11:38 am
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...
January 20, 2009 at 11:24 am
Viewing 15 posts - 1 through 15 (of 42 total)