Viewing 15 posts - 5,191 through 5,205 (of 8,731 total)
That has nothing to do with the rollup. Even if it's considered as a numeric data type, bit data cannot be used in a SUM(), you need to convert it...
February 23, 2015 at 11:01 am
You have the schema wrong.
Select top 100 *
from casmpogdbspr1.MPOG_Collations.Collation.AsaClass_Cleaned
February 23, 2015 at 10:56 am
Try this:
delete a
from FinancialChanges_DupCk a
where exists ( Select 1 from FinancialChanges b where a.Number = b.Number and a.Fix = b.Fix and a.AmountType= b.AmountType and a.Amount = b.Amount
February 23, 2015 at 10:54 am
Slightly shorter version with the same problem as the one from Adam.
WITH SampleData(fullname) AS(
SELECT 'Peter Parker' UNION ALL
SELECT 'Harry Osborn' UNION ALL
...
February 23, 2015 at 10:44 am
As Kevin said, user defined scalar functions and multi-line functions are bad for performance, but inline table-valued functions don't suffer the same problem.
This code is untested but might give you...
February 23, 2015 at 10:07 am
You need to use a different system view.
SELECT
p.name ProcedureName,
t.TEXT QueryName,
s.execution_count AS ExecutionCount,
s.max_elapsed_time AS MaxElapsedTime,
ISNULL(s.total_elapsed_time / s.execution_count, 0) AS AvgElapsedTime,
p.modify_date AS LogCreatedOn,
ISNULL((s.execution_count * 1.)/ DATEDIFF(s, p.modify_date , GETDATE()), 0) AS...
February 23, 2015 at 9:54 am
Phil Parkin (2/23/2015)
Luis Cazares (2/23/2015)
You need to use the TO_CHAR() function to format dates...
February 23, 2015 at 7:33 am
This is simple and any Oracle forum should give you the answer, but I'll include it here.
You need to use the TO_CHAR() function to format dates and TO_DATE() to enter...
February 23, 2015 at 7:25 am
Your LEFT JOIN condition has a problem as both columns belong to CustomerArea. Additional to that, your CustomerArea key seems to consist on 2 columns and you're using just one.
Try...
February 20, 2015 at 3:34 pm
Does this return any rows?
select *
from orders o
JOIN stop first_stop on o.first_stop_id = first_stop.id
JOIN sales s ON o.id = s.reference
WHERE s.dis IN( 'a', 'b', 'c')
AND o.status = 'D'
AND...
February 20, 2015 at 8:19 am
s is an alias for the resultset from the apply. It can be anything but I prefer it to be something that could be significant. On the ISNULL column you...
February 19, 2015 at 6:07 pm
Do you have anything else in the code?
Did you run the exact same code I posted?
Note that I changed the JOIN to an APPLY and the column expression for 'Discounts'.
February 19, 2015 at 5:21 pm
What about this?
select
first_stop.actual_departure 'Start'
, last_stop.actual_departure 'End'
, last_stop.city_name 'End city'
, last_stop.state 'End state'
, last_stop.zip_code 'End zip'
, first_stop.city_name 'Start city'
, first_stop.state 'Start state'
, first_stop.zip_code 'Start zip'
, datediff (day, last_stop.actual_departure, first_stop.actual_departure) 'Days...
February 19, 2015 at 2:21 pm
Different approach:
Just cast the column as a date and use the error output to ignore the column when it's not a valid date.
This was my test file:
ID,Date
1, 12/19/2014
2, 1/5/2015
3, 11/6/2014
4,...
February 19, 2015 at 12:14 pm
I'm sorry, I didn't read that last part. I'll blame the lack of coffee.
Leaving your flat file column as a string, you could use a conditional to generate null values...
February 19, 2015 at 10:18 am
Viewing 15 posts - 5,191 through 5,205 (of 8,731 total)