Viewing 15 posts - 466 through 480 (of 600 total)
If you tell us a bit more about the table you are querying we can figure something out.
Its tough to demonstrate when we are guessing at information.
For...
June 28, 2011 at 11:58 am
dva2007 (6/28/2011)
We have a table with each patient record where they can have multiple opeation code (up to 15 operation). it has to be in a separate column as most...
June 28, 2011 at 11:37 am
You could use row_number to achieve this.
The question is whether you actually need to do this to get the unique count for the report. If you could explain...
June 28, 2011 at 11:30 am
Could you explain a bit more in detail what you are trying to do and give us table definitions for the tables you are using?
In your sample data, how do...
June 28, 2011 at 8:58 am
FYI, you can format IF logic into a WHERE clause using CASE if you need to.
In the above example, though, you probably shouldn't be using all those dateparts in the...
January 14, 2011 at 9:05 am
At a quick glance, couldnt see why you would only be getting one hit.
But some quick observations:
1)Your code is looking for zip codes within a search box, not radius (as...
January 10, 2011 at 2:47 pm
Can you post the table definitions so that we can give you a working query instead of pseudocode?
December 17, 2010 at 1:36 pm
This sounds a lot like a homework / test question
November 26, 2010 at 12:55 pm
Try putting the CTE definition into the string for the dynamic sql. I'm pretty sure you can't link dynamic sql to a CTE the way you tried to.
November 19, 2010 at 1:36 pm
NOTE: Actually I have a small logical error in the above. If the "gap" in category is for the entire activeperiod I won't find it.
Adding the following...
October 20, 2010 at 9:48 am
Wow, this one was nasty.
First of all, a couple clarifications as housekeeping.
There are 29 days in Feb in 2008 (affects your expected output)
Based on your expected output, I think...
October 20, 2010 at 9:30 am
Learner1 (10/19/2010)
it is dynamic sql, Can be any column in the table like Age ,Salary, Name,...
October 19, 2010 at 7:06 pm
Learner1 (10/19/2010)
Is there any way that I can pass the column names in where clause and select them.
like
select * from employee
where column_name in (age,salary)
this shows me only Age and...
October 19, 2010 at 2:22 pm
Dominic Gagné (10/19/2010)
I figured out that, by using a derived table, it works fine:
SELECT * FROM
(
SELECT DISTINCT
a.perID,
a.rxDate,
a.rowID,
a.cntNom,
a.cntOrdre,
STUFF(
(SELECT '; ' + CAST(Quantite AS VARCHAR) + ',' + medNom...
October 19, 2010 at 1:33 pm
Could you describe briefly what you want your case in the order by to accomplish?
There are multiple things wrong here (as noted above, the order by needs to be a...
October 19, 2010 at 12:37 pm
Viewing 15 posts - 466 through 480 (of 600 total)