Viewing 15 posts - 11,896 through 11,910 (of 15,381 total)
With well over 500 points I find it amazing you would post this. There is no ddl for any of the tables, there are multiple additional procs being called and...
May 23, 2012 at 7:55 am
SQL Kiwi (5/22/2012)
Sean Lange (5/22/2012)
May 22, 2012 at 3:38 pm
boehnc (5/22/2012)
May 22, 2012 at 2:24 pm
I still say the Kaprekar series is entirely too much looping for t-sql. It can be done but you will basically have to add some form of recursion to call...
May 22, 2012 at 1:45 pm
SQL Kiwi (5/22/2012)
chalbert's code
DATEDIFF(YY,dbo.b_ENROLLMENT.MEMBER_DOB_DATE,GETDATE()) as age
This doesn't compute someone's age. It needs a formula like:
Age =
CASE
WHEN DATEPART(DAY, dbo.b_ENROLLMENT.MEMBER_DOB_DATE) > DATEPART(DAY,...
May 22, 2012 at 12:45 pm
That is what UNION does. It will combine multiple queries into a single resultset. I have a feeling you want to look at crosstab or pivots.
http://www.sqlservercentral.com/articles/T-SQL/63681/%5B/url%5D
May 22, 2012 at 12:40 pm
chalbert (5/22/2012)
Where should datediff go?
Like this???
Select
dbo.b_ENROLLMENT.MEMBER_DOB_DATE,
dbo.b_ENROLLMENT.EFF_DATE,
dbo.b_ENROLLMENT.MED_ID,
dbo.b_ENROLLMENT.PLAN_CODE as aid,
dbo.p_DMAS_MEDICAL_TRANSITION.recip as recipno,
dbo.p_DMAS_MEDICAL_TRANSITION.SEX as sex,
CASE WHEN (dbo.p_DMAS_MEDICAL_TRANSITION.SEX)='M' THEN 1
WHEN (dbo.p_DMAS_MEDICAL_TRANSITION.SEX)='F' THEN 0
END AS MALE,
case
when (dbo.b_ENROLLMENT.PLAN_CODE)='450' or (dbo.b_ENROLLMENT.PLAN_CODE)='451' or...
May 22, 2012 at 12:36 pm
chalbert (5/22/2012)
Msg 207, Level 16, State 1, Line 22
Invalid column name 'aid'.
Msg 207, Level 16, State 1, Line 22
Invalid column name 'aid'.
Msg 207, Level 16,...
May 22, 2012 at 12:28 pm
chalbert (5/22/2012)
Select
dbo.b_ENROLLMENT.MEMBER_DOB_DATE,
dbo.b_ENROLLMENT.EFF_DATE,
dbo.b_ENROLLMENT.MED_ID,
dbo.b_ENROLLMENT.PLAN_CODE as aid,
dbo.p_DMAS_MEDICAL_TRANSITION.recip as recipno,
dbo.p_DMAS_MEDICAL_TRANSITION.SEX...
May 22, 2012 at 12:05 pm
Confusing Queries (5/22/2012)
SQLKnowItAll (5/22/2012)
Very nice! Now the question plaguing me is... Why on earth would we want to do this?!To implement Kaprekar Series...
With the amount of looping and such I...
May 22, 2012 at 11:54 am
I am a firm believer that any column should have a name that identifies it clearly and should not change between tables. Column names changing table to table is complete...
May 22, 2012 at 11:46 am
toddasd (5/22/2012)
Sean Lange (5/21/2012)
toddasd (5/21/2012)
Select ISNULL(Item, ' ') from ITEMS
Or are you trying to...
May 22, 2012 at 9:04 am
What you have is the beginning of your worst nightmare. The challenges you are facing is the reason you shouldn't store more than 1 value in a single column. You...
May 22, 2012 at 7:57 am
Siten0308 (5/21/2012)
thanks again :).... where do i mark as answered to give points or whatever?
I do however accept Guinness. 😛
May 21, 2012 at 3:33 pm
Siten0308 (5/21/2012)
thanks again :).... where do i mark as answered to give points or whatever?
Thanks for the props but we don't roll like that around here. It could be that...
May 21, 2012 at 3:33 pm
Viewing 15 posts - 11,896 through 11,910 (of 15,381 total)