Viewing 15 posts - 106 through 120 (of 338 total)
But you seem to having one already in your query
(SELECT SUM(CASE WHEN SOA_TYPE IN ('Agent','Freight','Cost') or AC = '16208'THEN USD_AMOUNT ELSE 0 END) YourSum
FROM GL b WHERE...
June 20, 2014 at 6:55 am
Increase the Cost Threshold for Parallelism settings.
If that also does not help then you will have to find the offending queries that are causing parallelism which maybe due to missing...
June 20, 2014 at 6:49 am
The user will pass Start Date, End Date, Number of Records and Period. Period can be daily, weekly, monthly, quarterly or yearly.
The user will pass Start Date,End Date,No of...
June 20, 2014 at 6:08 am
This all looks so confusing..
You are trying to update column P of table_1 with column P of another copy of table_1 matched on table_1.link = selrow.link where selrow...
June 20, 2014 at 6:03 am
Is this SQL 2005 and above ?
EDIT: Whats the compatibility of the database ?
June 20, 2014 at 4:01 am
No need for dynamic sql.Just split the values ('Value1','Value2') and insert into a temp table
Value1
Value2
then Select * from YourTable where Id in (Select Id from Temp)
June 20, 2014 at 3:30 am
You will have to split the values coming in from the parameters.
June 20, 2014 at 1:40 am
Was the account name from domain deleted and recreated ?
June 20, 2014 at 1:38 am
SELECT DATEPART(MM,VISITINGDATE),SUM(COST) FROM yourtable
GROUP BY DATEPART(MM,VISITINGDATE)
June 19, 2014 at 10:34 pm
If you are using sql server edition higher than 2005 you can simply convert it to date datatype and it will return just the datepart
select convert(date,'2010-09-23 13:02:54.000')
else you will have...
June 19, 2014 at 8:25 pm
SELECT SUM(CASE WHEN fd.CalendarYear = '2013' THEN [Sales (LCY)]) 2013,
SUM(CASE WHEN fd.CalendarYear = '2014' THEN [Sales (LCY)])2014
FROM [$Cust_ Ledger Entry] cle
LEFT OUTER JOIN dw.dim.FiscalDate fd
ON fd.CalendarDate = cle.[Posting Date]
WHERE [Customer...
June 19, 2014 at 8:12 pm
Instead of mixing everything in dynamic sql I would suggest put the desired records into a temporary table and then use only that temporary table in dynamic sql for pivoting.
June 19, 2014 at 9:32 am
Is the XML in proper format ? When I tried to assign it to a xml variable it threw an error
Declare @x xml='Your XML'
Select @x
June 19, 2014 at 9:17 am
Viewing 15 posts - 106 through 120 (of 338 total)