Viewing 15 posts - 5,491 through 5,505 (of 13,468 total)
couldn't you just add row_number to the results with the PARTITON BY and with DESC, then wrap it to exclude the "first" row (the last change?)
something like this?
(untested:)
SELECT * FROM...
May 18, 2012 at 12:39 pm
right along the lines of what opc.three was suggesting, you could look at the code behind the scenes of sp_help and do something with it.
on my shared hosted server i...
May 18, 2012 at 11:56 am
looks like a sum of case statements to me:
you have to group by the patient,and then selectively sum the charges based on the Department(code?)
something like this, i would think:
SELECT...
May 18, 2012 at 11:28 am
add a rownumber() :
ie:
ROW_NUMBER() OVER (PARTITION BY [The text Column] ORDER BY [The text Column] ,[TheNumeric Column] ) As RW
with that, you could join the data against itself with...
May 18, 2012 at 6:05 am
MysteryJimbo (5/15/2012)
May 15, 2012 at 1:34 pm
in a similar situation, i've used a function dbo.StripNonNumeric, which leaves just the string 0-9, which i could convert to an integer;
then i could do
ORDER BY
CONVERT(int,dbo.StripNonNumeric(SomeColumn)),,
SomeColumn
As long as you understand...
May 15, 2012 at 10:24 am
for testing backup validity, i would think the Developer version (~$50 dollars on Amazon) is ideal; it has all the abilities of the Enterprise version, but is for testing and...
May 15, 2012 at 9:52 am
access denied is due to the account running SQL server.
To access anything outside of actual databases, SQL uses a different account than you might think it should.
you will probably want...
May 15, 2012 at 8:38 am
pwalter83 (5/15/2012)
george sibbald (5/15/2012)
does the object exist on both servers? Is the owner of the object the same on both servers?
As far as I know, the login name on both...
May 15, 2012 at 8:06 am
there's an extended stored procedure to help you with that situation.
you can use it to query an iindividual's domain login, or a group from the domain:
try these out and see...
May 14, 2012 at 2:50 pm
Only way i see getting those totals would be by using Change data cature on those tables in question.
Then you can query the cdc schema rltables for the counts
May 12, 2012 at 4:26 pm
One example i can think of when see that behavior if you ALTER TABLE , and then insert into the table while referencing the new row; to get it...
May 11, 2012 at 1:32 pm
SQL formatting is important for me, and i tested the RedGate tools, which are really nice, but they were more than I wanted to spend.
I ended up purchasing "SQL Pretty...
May 11, 2012 at 11:12 am
others will certainly do it differently than I do, but I have three different tables for accomplishing Tally-related objectives:
Tally, which starts with 1,
TallyCalendar, which is all date related.
and Numbers, which...
May 11, 2012 at 11:04 am
if it helps, i usually create this temp table, and then insert multiples into it via the script below:
i don't keep track of the specific file the way Bhuvnesh ...
May 11, 2012 at 10:11 am
Viewing 15 posts - 5,491 through 5,505 (of 13,468 total)