Viewing 15 posts - 3,526 through 3,540 (of 4,087 total)
It wasn't chastisement, it's realism. You have to understand that everyone here is a volunteer. The more hurdles you place in front of people, the fewer will even...
October 28, 2011 at 9:27 am
First, the idea behind including a SAMPLE is that it is large enough to provide a realistic representation of the data, BUT NO LARGER. Since you are grouping on...
October 28, 2011 at 8:47 am
bass8117 (10/27/2011)
in the CHRG0.CHRG_AMT column I have a reverse charge of -289.00 with a CHRG0.CHRG_BAL...
October 28, 2011 at 7:31 am
Actually, I didn't read your query closely enough. I didn't see that you were using a subquery.
The two approaches are equivalent and will give the exact same execution...
October 27, 2011 at 7:57 am
Here is a fairly simple way to get what you're looking for.
SELECT Year(ms.MonthStart), Datename(Month, MonthStart), WeekOfMonth, Sum(YourAmountField)
FROM YourTable AS l
CROSS APPLY ( SELECT DateAdd(Month, DateDiff(Month, 0, GetDate()), 0) AS MonthStart...
October 27, 2011 at 7:49 am
Depending on your indices and your data, the following may be more efficient.
SELECT
o.OrderID,
...
October 27, 2011 at 7:09 am
pschwartzbauer (10/26/2011)
SELECT A.Key, A.Date, A.Status, A.Ranking
FROM (SELECT Key, Date, Status
, RANK() OVER(PARTITION BY Key ORDER BY Date DESC) AS Ranking
FROM table) A
WHERE A.Ranking...
October 27, 2011 at 6:46 am
TEXT is being deprecated. Use varchar(max) instead.
Drew
October 26, 2011 at 1:55 pm
Ninja's_RGR'us (10/25/2011)
Try LEFT(middlename + '.', 1) instead.That'll work depending on your concat_null_yields_null setting.
You really should test before posting. I think what you wanted was actually
ISNULL(LEFT(middlename, 1) + '.', '')
This...
October 25, 2011 at 11:35 am
dva2007 (10/25/2011)
It doesnt have any unique key and the uniqey key is 70 character long.
If it doesn't have a unique key, how are you able to determine it's length?
If your...
October 25, 2011 at 9:33 am
mpartridge (10/20/2011)
td = '<a href="mailto:abc@xyz.com?Subject=Mailto%20Test&cc=xyz@abc.com">mailto:abc@xyz.com</a>', ''
SQL will not recognise that as a HTML link and pastes the whole thing into a table cell,...
October 24, 2011 at 12:42 pm
The typical way to do this is with FOR XML PATH. Most examples will also use a stuff to remove an initial extraneous delimiter, but I didn't include that...
October 20, 2011 at 9:22 am
Sean Lange (10/19/2011)
declare @Codes varchar(25) = '14, 8, 21458'
;with cte(n) as (select 1
union all select 14
union all select 214
union all select 314
union all select 15
union all select 8)
select *
from...
October 20, 2011 at 7:04 am
toddasd (10/19/2011)
Declare @Type_Code varchar(50)
set @Type_Code = '4,11,12'
Select * from table_Type_Codes Where @Type_Code like '%' + table_Type_Codes...
October 19, 2011 at 3:11 pm
I would use LIKE instead. You'll probably still have to do an Index Scan (assuming that column is indexed on your claim table), but that will probably save you...
October 19, 2011 at 11:46 am
Viewing 15 posts - 3,526 through 3,540 (of 4,087 total)