Viewing 15 posts - 391 through 405 (of 475 total)
Hi
This should do the trick. You will need to make the tally big enough to split your largest string
;with smallTally AS (
SELECT row_number() OVER (ORDER BY (SELECT NULL)) N...
February 27, 2013 at 11:34 am
Hi
If I've understood your question right, you could create a check function for your year ranges and use that in a constraint. Something like:
CREATE FUNCTION chkOverLap(@fromYear tinyint, @toYear tinyint)...
February 26, 2013 at 12:15 pm
I may be reading the question wrong, but this may do what you want
SELECT Columns
FROM HRCandidateProject
ORDER BY CASE
WHEN TotalExperience BETWEEN 1 and 2 THEN 1
...
February 26, 2013 at 11:32 am
Yep, you can have multiple queries in your cte. It can make things a lot easier to read and understand, but sometimes I think it may have an...
February 22, 2013 at 1:11 pm
Hi
Try this, it should give the result you want
with Samples as (
-- Sample Data
SELECT * FROM (VALUES ('A','X'), ('A', 'Y'), ('A','Z')) AS S(SampleID, ClassID)
)
,Tests as (
SELECT * FROM (VALUES(1,'X'),(2,'X'),(3,'X'),(4,'Y'),(5,'Z')) AS...
February 21, 2013 at 2:59 pm
Hi
You're very close to getting the result you want, you just need to combine the results of your drill up with a drill down from FTID, rather than drilling down...
February 21, 2013 at 12:24 pm
Hi
I think you need some way to group the dates into quarters.
I'll let someone else suggest the best method as I don't deal with dates frequently and wouldn't want to...
February 20, 2013 at 12:12 pm
mikeallenbrown (2/18/2013)
Great! ...thank you. That worked.Yes, PrimDiag is a char field ...probably should be dec(18,2) but a few clients have letters in this field so changing would be problematic.
No problem....
February 18, 2013 at 6:40 pm
You could use and EXISTS in you case statement rather than an =
Not sure if I've got you logic right, but something like the following
-- Some Test Data
;with Fact as...
February 18, 2013 at 6:15 pm
Hi
Not sure if this is what you want
SELECT t.SSN, t.StartOfCare, t.PrimDiag, t.ClientID,
c.[required columns]
FROM
(
SELECT ROW_NUMBER() OVER (PARTITION...
February 18, 2013 at 5:48 pm
Hi
If I've understood your question, you've saved your code using 'Save solution'. If your SQL was copied into a new query window then you would have been prompted for...
February 17, 2013 at 11:25 am
There are a number of ways of doing this. Here's a few ways of writing essentially the same query.
SELECT completed, auditdate, a.agentNumber
FROM tblAudit_AuditSchedule a
INNER JOIN (
SELECT agentNumber, MAX(auditdate) maxdate...
February 13, 2013 at 1:23 pm
Viewing 15 posts - 391 through 405 (of 475 total)