Viewing 15 posts - 481 through 495 (of 2,452 total)
This article may get you on your way
http://www.sqlservercentral.com/articles/T-SQL/63681/
Hint :
SELECT ID,
Value,
ROW_NUMBER() OVER (PARTITION BY ID ORDER BY Value) rn
FROM <yourtablename>
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
July 30, 2016 at 12:35 pm
losstww (7/29/2016)
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
July 30, 2016 at 11:47 am
first off please read this
https://spaghettidba.com/2015/04/24/how-to-post-a-t-sql-question-on-a-public-forum/
then post back with the necessary script that allows us to easily set on our own systems.
suggest that you also post some more sample...
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
July 30, 2016 at 10:34 am
One of the arguments was way faster.
what were your other arguments?
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
July 28, 2016 at 3:43 pm
further to the good ideas by Kevin....I am wondering if your requirement of "data movement" translates to audit tables that record changes made to the SQL data, by whom and...
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
July 28, 2016 at 9:38 am
maybe a start ?
SET DATEFIRST 1 -- WEEK IS MONDAY THRO SUNDAY
DECLARE @input INT= 201552;
DECLARE @wk INT= RIGHT(@input, 2);
DECLARE @yr INT= LEFT(@input, 4);
DECLARE @fdow DATE =
(SELECT CONVERT( DATE,...
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
July 27, 2016 at 7:10 am
raghuldrag (7/26/2016)
Without setting a financial year start and end date I wanna get the output
i.e
the user takes a report from '01-jun-2010' and '30-jun-2010' (only input from...
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
July 27, 2016 at 3:18 am
drew.allen (7/26/2016)
just be easier to do it manually.Drew
agree
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
July 26, 2016 at 12:57 pm
qucik google threw up this
any good for you?
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
July 26, 2016 at 12:09 pm
jmann84 (7/26/2016)
I am in clean up mode from a previous DBA who loved to nest views when he was building scripting.
I can peel these apart by hand, but some...
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
July 26, 2016 at 10:38 am
well you could always do it online at http://poorsql.com/...maybe a few more key strokes ( cut and paste ) but if its important what the heck 🙂
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
July 26, 2016 at 10:23 am
DBA From The Cold (7/26/2016)
Downloaded and installed first the express dbforge version and then the full trial but unfortunately it doesn't work for backup/restore statements either.Ah well...
can you post some...
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
July 26, 2016 at 9:59 am
ChrisM@Work (7/26/2016)
J Livingston SQL (7/26/2016)
cant see how "Order data based on latest year first and then City code and then Subcitycode " delivers what you...
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
July 26, 2016 at 9:24 am
cant fathom your sort order...please explain
cant see how "Order data based on latest year first and then City code and then Subcitycode " delivers what you have posted?
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
July 26, 2016 at 8:41 am
is it as simple as this ....??
SELECT * FROM (
SELECT * FROM #City
UNION ALL
SELECT * FROM #Subcity) x
ORDER BY Years DESC, Citycode, subcitycode
edit....just rechecked my results.....aint what you have...
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
July 26, 2016 at 8:17 am
Viewing 15 posts - 481 through 495 (of 2,452 total)