Viewing 15 posts - 451 through 465 (of 5,504 total)
You could call a stored procedure from your app with the search keyword, the user and the IP address and store the values in the audit table.
An alternative would be...
April 7, 2012 at 2:48 am
The less complicated way to get the total number of MMR vaccines:
;
WITH cte AS
(
SELECT
PatientID,
SUM(CASE WHEN ImmunizationID IN(1,2,3,4) THEN 1 ELSE 0 END) AS MEASLES,
SUM(CASE WHEN ImmunizationID IN(1,2,4,6) THEN...
April 6, 2012 at 5:03 pm
This solution depends on the StopName being ascending as shown in your sample data.
If that's not the case, you'll need to use another column that define whether a stop belongs...
April 6, 2012 at 1:53 pm
I'm confident this can be done without a loop.
Please read the first article in my signature and post table def and sample data in a ready to use format so...
April 6, 2012 at 12:05 pm
The problem is there's nothing in the data that would allow to define "the full combination of individual vaccines that makes up a completed MMR vaccine".
Can you please elaborate?
April 6, 2012 at 11:22 am
It's always great to get a reply like "it won't run"...
You might want to take the time and read the error message SQL Server is kind enough to provide.
@Lynn: columns...
April 6, 2012 at 10:59 am
njdevils39 (4/6/2012)
...Where should I put this query in my original SQL CODE? Note: Include EMP_NAME, EMP_ORGANIZATION, EMP_DEPARTMENT and EMP_DT_TERMINATION.
I have no idea.
It would make sense to place it somewhere after...
April 6, 2012 at 10:52 am
The bottom-up might be simpler. But internally, it'll "climb up" one and two nodes for each "bottom" element. Depending on the xml size and structure this approach is less efficient...
April 6, 2012 at 10:48 am
Are you looking for something like this?
WITH cteRates AS
(
SELECT
o.EMP_ID,
(ROW_NUMBER() over(partition by o.EMP_ID order by x.r.value('@date_changed','DATETIME') desc)) as RowNum,
convert(VARCHAR(10), x.r.value('@date_changed','DATETIME'), 101) AS DATE_CHANGED,
...
April 6, 2012 at 10:32 am
It seems like you're dealing with a denormalized table. I'd probably use UNPIVOT to get values for amt_* into one column and then use a simple join.
April 6, 2012 at 7:04 am
GilaMonster (4/6/2012)
LutzM (4/6/2012)
April 6, 2012 at 5:41 am
paramjit4 (4/6/2012)
can you give me coords on sql server 2000.,,if you don't mindsorry :
Yes, I'll post a coded solution for 2000 if you take te time and post ready to...
April 6, 2012 at 4:02 am
paramjit4 (4/6/2012)
it's not working on sql server 2000
You posted in the SQL 2005 forum and didn't mention the solution should work on SQL2000.
Neither the table variable nor the CTE will...
April 6, 2012 at 3:55 am
Do you really need a processor based license?
Depending on how the SQL Server is used, a UserCAL or DeviceCAL based license might be good enough.
Another option would be to buy...
April 6, 2012 at 3:46 am
As a side note:
Usually I vote against table variables used in a join due to the risk of bad performance caused by missing statistics. (SQL Server will assume there's only...
April 6, 2012 at 3:20 am
Viewing 15 posts - 451 through 465 (of 5,504 total)