Viewing 15 posts - 421 through 435 (of 1,241 total)
komal145 (11/8/2016)
Thank you. Merge join worked .
Just a note, make sure the input streams are sorted in the same manner. I have seen where they were not and the data...
November 9, 2016 at 11:37 am
Assuming it is the 'Sick' hours that you are mainly focusing on , the following is as simple as I can code it:
selectcid,
sum(case when hr_type = 'sick' then 0...
November 9, 2016 at 11:09 am
Are you querying everything from one table or doing some type of join(s)?
November 9, 2016 at 10:56 am
Thanks Steve. Good straightforward question. I take it the capital Q means Quit (I'm not a sqlCmd user).
November 9, 2016 at 10:46 am
Koen Verbeeck (11/8/2016)
Somehow completely missed that the data type was bit.Moar caffeine needed!
Ok maybe the defaulting of the bit field to 'false' is a little "bit" tricky. Part of the...
November 8, 2016 at 11:25 am
Ditto,
First name can be 'John' OR 'Linda' but cannot be both at the same time (which is what a AND condition is implying).
November 7, 2016 at 10:58 am
I figured B, though I was struggling with D and was glad that the options were this or not this rather than figuring out the math on D 🙂
November 4, 2016 at 6:13 pm
This may not sound elegant, but a two step approach is to query out the entire xml string with the Results To File setting selected. Save the results to a...
November 3, 2016 at 11:49 am
Tommy 70494 (11/2/2016)
Thank you!it works, right out of the box.
I don't know why I didn't think of this.
I guess I got caught up in the fact that it was XML.
The...
November 2, 2016 at 11:58 am
Briceston (11/1/2016)
November 2, 2016 at 11:26 am
Does this help ?
DECLARE @tbl TABLE
(
id INT,
col XML
)
INSERT INTO @tbl
VALUES
(1,'<name><name1>aht</name1></name>'),(2,'<name>6</name>')
select *
from @tbl
where col.value('(/name)[1]','varchar(10)')='aht'
November 1, 2016 at 7:07 pm
Ed Wagner (11/1/2016)
I had to read it twice because I was looking for the trick. Nice, straightforward question. Thanks.
Thanks Ed. No tricks, though it is the day after...
November 1, 2016 at 12:30 pm
Below is a sample of the underlying data. Please excuse me if I did not use the correct code, and for the headers not being completely aligned.
Reporting YearReg AreaOrignalAdmissionOrignalDischargeReadmissiondischargedatedays between...
October 31, 2016 at 2:45 pm
Hello, our server hard disk crashed due to power failure and all the backups were on the hard disk. Before just before it did we had managed to copy the...
October 28, 2016 at 1:43 pm
Lynn Pettis (10/28/2016)
Chris Wooding (10/27/2016)
October 28, 2016 at 12:01 pm
Viewing 15 posts - 421 through 435 (of 1,241 total)