Sql row separation2019 Community Moderator ElectionSql concatenate of row data into columnHow can I prevent SQL injection in PHP?How do I perform an IF…THEN in an SQL SELECT?Add a column with a default value to an existing table in SQL ServerHow to return only the Date from a SQL Server DateTime datatypeHow to check if a column exists in a SQL Server table?How to concatenate text from multiple rows into a single text string in SQL server?Parameterize an SQL IN clauseInserting multiple rows in a single SQL query?How do I UPDATE from a SELECT in SQL Server?Finding duplicate values in a SQL table

Should we release the security issues we found in our product as CVE or we can just update those on weekly release notes?

My adviser wants to be the first author

Min function accepting varying number of arguments in C++17

Unexpected result from ArcLength

Do the common programs (for example: "ls", "cat") in Linux and BSD come from the same source code?

How do I hide Chekhov's Gun?

Professor being mistaken for a grad student

Happy pi day, everyone!

Charles Hockett - 'F' article?

What are substitutions for coconut in curry?

Define, (actually define) the "stability" and "energy" of a compound

Most cost effective thermostat setting: consistent temperature vs. lowest temperature possible

Time travel from stationary position?

How Could an Airship Be Repaired Mid-Flight

(Calculus) Derivative Thinking Question

Why do Australian milk farmers need to protest supermarkets' milk price?

Use void Apex method in Lightning Web Component

Interplanetary conflict, some disease destroys the ability to understand or appreciate music

Life insurance that covers only simultaneous/dual deaths

A limit with limit zero everywhere must be zero somewhere

Can a druid choose the size of its wild shape beast?

Why did it take so long to abandon sail after steamships were demonstrated?

It's a yearly task, alright

Hacking a Safe Lock after 3 tries



Sql row separation



2019 Community Moderator ElectionSql concatenate of row data into columnHow can I prevent SQL injection in PHP?How do I perform an IF…THEN in an SQL SELECT?Add a column with a default value to an existing table in SQL ServerHow to return only the Date from a SQL Server DateTime datatypeHow to check if a column exists in a SQL Server table?How to concatenate text from multiple rows into a single text string in SQL server?Parameterize an SQL IN clauseInserting multiple rows in a single SQL query?How do I UPDATE from a SELECT in SQL Server?Finding duplicate values in a SQL table










0















Table Schema:



Create Table
(
Transaction CHAR(18),
Serial INT,
Project CHAR(3),
Amount MONEY
CONSTRAINT [PK_TRANSACTION_SERIAL] PRIMARY KEY CLUSTERED
(
Transaction ASC,
Serial ASC
)
)


Data set:



+-----------------+-------+---------+---------+
| Transaction | Serial| Project | Amount |
+-----------------+-------+---------+---------+
| A00000000000001 | 1 | 100 | 500 |
| A00000000000001 | 2 | 200 | -200 |
| A00000000000001 | 3 | 200 | -100 |
| A00000000000001 | 4 | 101 | -200 |
| A00000000000002 | 1 | 100 | 100 |
| A00000000000002 | 2 | 101 | -100 |
| A00000000000003 | 1 | 100 | 300 |
| A00000000000003 | 2 | 200 | -300 |
| A00000000000004 | 1 | 200 | -200 |
| A00000000000004 | 2 | 100 | 100 |
| A00000000000004 | 3 | 101 | 100 |
| A00000000000005 | 1 | 200 | 200 |
| A00000000000005 | 2 | 100 | -300 |
| A00000000000005 | 3 | 101 | 100 |
+-----------------+-------+---------+---------+


For any transaction there will be either 1 positive balance against multiple negative balance or 1 negative against multiple positive.
There will be no transaction as many positive amount against many negative amount.



Transactions with 1 positive and 1 negative amount is the best case scenario.



My target is to make all transactions 1 to 1 as following.



In first row at output amount for project 200 is merged as 2nd and 2rd row of dataset has same transaction ans same project.



Here the max ABS(amount) row for each transaction is being splitted into multiple rows according to the value of amount of other rows of that transaction.



Output:



+-----------------+---------+---------+
| Transaction | Project | Amount |
+-----------------+---------+---------+
| A00000000000001 | 100 | 300 |
| A00000000000001 | 200 | -300 |
---------------------------------------
| A00000000000001 | 100 | 200 |
| A00000000000001 | 101 | -200 |
---------------------------------------
| A00000000000002 | 100 | 100 |
| A00000000000002 | 101 | -100 |
---------------------------------------
| A00000000000003 | 100 | 300 |
| A00000000000003 | 200 | -300 |
---------------------------------------
| A00000000000004 | 200 | -100 |
| A00000000000004 | 100 | 100 |
---------------------------------------
| A00000000000004 | 200 | -100 |
| A00000000000004 | 101 | 100 |
---------------------------------------
| A00000000000005 | 200 | 200 |
| A00000000000005 | 100 | -200 |
---------------------------------------
| A00000000000005 | 101 | 100 |
| A00000000000005 | 100 | -100 |
+-----------------+---------+---------+


I am using SQL SERVER 2012 or higher.










share|improve this question
























  • It makes no sense how split value 500 for A...1 and Project 100 into 2 amounts? The rest really is a select sum(Amount) group by transaction, project from table.

    – nolaspeaker
    Dec 30 '15 at 3:56











  • For Transaction A...1 Project 100 has amount 500 and project 200 has amount -300(after summation of same project in same transaction) and project 101 has amount -200. So I want to relate Project 100 to 200 with amount 300 & -300 and Project 100 to 101 with amount 200 & -200.

    – Esty
    Dec 30 '15 at 4:00











  • is there ANY other column available such as ID (unique to each row)? How do you intend to ensure a row isn't included more than once?

    – Used_By_Already
    Dec 30 '15 at 4:10












  • See my updated dataset.

    – Esty
    Dec 30 '15 at 4:13















0















Table Schema:



Create Table
(
Transaction CHAR(18),
Serial INT,
Project CHAR(3),
Amount MONEY
CONSTRAINT [PK_TRANSACTION_SERIAL] PRIMARY KEY CLUSTERED
(
Transaction ASC,
Serial ASC
)
)


Data set:



+-----------------+-------+---------+---------+
| Transaction | Serial| Project | Amount |
+-----------------+-------+---------+---------+
| A00000000000001 | 1 | 100 | 500 |
| A00000000000001 | 2 | 200 | -200 |
| A00000000000001 | 3 | 200 | -100 |
| A00000000000001 | 4 | 101 | -200 |
| A00000000000002 | 1 | 100 | 100 |
| A00000000000002 | 2 | 101 | -100 |
| A00000000000003 | 1 | 100 | 300 |
| A00000000000003 | 2 | 200 | -300 |
| A00000000000004 | 1 | 200 | -200 |
| A00000000000004 | 2 | 100 | 100 |
| A00000000000004 | 3 | 101 | 100 |
| A00000000000005 | 1 | 200 | 200 |
| A00000000000005 | 2 | 100 | -300 |
| A00000000000005 | 3 | 101 | 100 |
+-----------------+-------+---------+---------+


For any transaction there will be either 1 positive balance against multiple negative balance or 1 negative against multiple positive.
There will be no transaction as many positive amount against many negative amount.



Transactions with 1 positive and 1 negative amount is the best case scenario.



My target is to make all transactions 1 to 1 as following.



In first row at output amount for project 200 is merged as 2nd and 2rd row of dataset has same transaction ans same project.



Here the max ABS(amount) row for each transaction is being splitted into multiple rows according to the value of amount of other rows of that transaction.



Output:



+-----------------+---------+---------+
| Transaction | Project | Amount |
+-----------------+---------+---------+
| A00000000000001 | 100 | 300 |
| A00000000000001 | 200 | -300 |
---------------------------------------
| A00000000000001 | 100 | 200 |
| A00000000000001 | 101 | -200 |
---------------------------------------
| A00000000000002 | 100 | 100 |
| A00000000000002 | 101 | -100 |
---------------------------------------
| A00000000000003 | 100 | 300 |
| A00000000000003 | 200 | -300 |
---------------------------------------
| A00000000000004 | 200 | -100 |
| A00000000000004 | 100 | 100 |
---------------------------------------
| A00000000000004 | 200 | -100 |
| A00000000000004 | 101 | 100 |
---------------------------------------
| A00000000000005 | 200 | 200 |
| A00000000000005 | 100 | -200 |
---------------------------------------
| A00000000000005 | 101 | 100 |
| A00000000000005 | 100 | -100 |
+-----------------+---------+---------+


I am using SQL SERVER 2012 or higher.










share|improve this question
























  • It makes no sense how split value 500 for A...1 and Project 100 into 2 amounts? The rest really is a select sum(Amount) group by transaction, project from table.

    – nolaspeaker
    Dec 30 '15 at 3:56











  • For Transaction A...1 Project 100 has amount 500 and project 200 has amount -300(after summation of same project in same transaction) and project 101 has amount -200. So I want to relate Project 100 to 200 with amount 300 & -300 and Project 100 to 101 with amount 200 & -200.

    – Esty
    Dec 30 '15 at 4:00











  • is there ANY other column available such as ID (unique to each row)? How do you intend to ensure a row isn't included more than once?

    – Used_By_Already
    Dec 30 '15 at 4:10












  • See my updated dataset.

    – Esty
    Dec 30 '15 at 4:13













0












0








0








Table Schema:



Create Table
(
Transaction CHAR(18),
Serial INT,
Project CHAR(3),
Amount MONEY
CONSTRAINT [PK_TRANSACTION_SERIAL] PRIMARY KEY CLUSTERED
(
Transaction ASC,
Serial ASC
)
)


Data set:



+-----------------+-------+---------+---------+
| Transaction | Serial| Project | Amount |
+-----------------+-------+---------+---------+
| A00000000000001 | 1 | 100 | 500 |
| A00000000000001 | 2 | 200 | -200 |
| A00000000000001 | 3 | 200 | -100 |
| A00000000000001 | 4 | 101 | -200 |
| A00000000000002 | 1 | 100 | 100 |
| A00000000000002 | 2 | 101 | -100 |
| A00000000000003 | 1 | 100 | 300 |
| A00000000000003 | 2 | 200 | -300 |
| A00000000000004 | 1 | 200 | -200 |
| A00000000000004 | 2 | 100 | 100 |
| A00000000000004 | 3 | 101 | 100 |
| A00000000000005 | 1 | 200 | 200 |
| A00000000000005 | 2 | 100 | -300 |
| A00000000000005 | 3 | 101 | 100 |
+-----------------+-------+---------+---------+


For any transaction there will be either 1 positive balance against multiple negative balance or 1 negative against multiple positive.
There will be no transaction as many positive amount against many negative amount.



Transactions with 1 positive and 1 negative amount is the best case scenario.



My target is to make all transactions 1 to 1 as following.



In first row at output amount for project 200 is merged as 2nd and 2rd row of dataset has same transaction ans same project.



Here the max ABS(amount) row for each transaction is being splitted into multiple rows according to the value of amount of other rows of that transaction.



Output:



+-----------------+---------+---------+
| Transaction | Project | Amount |
+-----------------+---------+---------+
| A00000000000001 | 100 | 300 |
| A00000000000001 | 200 | -300 |
---------------------------------------
| A00000000000001 | 100 | 200 |
| A00000000000001 | 101 | -200 |
---------------------------------------
| A00000000000002 | 100 | 100 |
| A00000000000002 | 101 | -100 |
---------------------------------------
| A00000000000003 | 100 | 300 |
| A00000000000003 | 200 | -300 |
---------------------------------------
| A00000000000004 | 200 | -100 |
| A00000000000004 | 100 | 100 |
---------------------------------------
| A00000000000004 | 200 | -100 |
| A00000000000004 | 101 | 100 |
---------------------------------------
| A00000000000005 | 200 | 200 |
| A00000000000005 | 100 | -200 |
---------------------------------------
| A00000000000005 | 101 | 100 |
| A00000000000005 | 100 | -100 |
+-----------------+---------+---------+


I am using SQL SERVER 2012 or higher.










share|improve this question
















Table Schema:



Create Table
(
Transaction CHAR(18),
Serial INT,
Project CHAR(3),
Amount MONEY
CONSTRAINT [PK_TRANSACTION_SERIAL] PRIMARY KEY CLUSTERED
(
Transaction ASC,
Serial ASC
)
)


Data set:



+-----------------+-------+---------+---------+
| Transaction | Serial| Project | Amount |
+-----------------+-------+---------+---------+
| A00000000000001 | 1 | 100 | 500 |
| A00000000000001 | 2 | 200 | -200 |
| A00000000000001 | 3 | 200 | -100 |
| A00000000000001 | 4 | 101 | -200 |
| A00000000000002 | 1 | 100 | 100 |
| A00000000000002 | 2 | 101 | -100 |
| A00000000000003 | 1 | 100 | 300 |
| A00000000000003 | 2 | 200 | -300 |
| A00000000000004 | 1 | 200 | -200 |
| A00000000000004 | 2 | 100 | 100 |
| A00000000000004 | 3 | 101 | 100 |
| A00000000000005 | 1 | 200 | 200 |
| A00000000000005 | 2 | 100 | -300 |
| A00000000000005 | 3 | 101 | 100 |
+-----------------+-------+---------+---------+


For any transaction there will be either 1 positive balance against multiple negative balance or 1 negative against multiple positive.
There will be no transaction as many positive amount against many negative amount.



Transactions with 1 positive and 1 negative amount is the best case scenario.



My target is to make all transactions 1 to 1 as following.



In first row at output amount for project 200 is merged as 2nd and 2rd row of dataset has same transaction ans same project.



Here the max ABS(amount) row for each transaction is being splitted into multiple rows according to the value of amount of other rows of that transaction.



Output:



+-----------------+---------+---------+
| Transaction | Project | Amount |
+-----------------+---------+---------+
| A00000000000001 | 100 | 300 |
| A00000000000001 | 200 | -300 |
---------------------------------------
| A00000000000001 | 100 | 200 |
| A00000000000001 | 101 | -200 |
---------------------------------------
| A00000000000002 | 100 | 100 |
| A00000000000002 | 101 | -100 |
---------------------------------------
| A00000000000003 | 100 | 300 |
| A00000000000003 | 200 | -300 |
---------------------------------------
| A00000000000004 | 200 | -100 |
| A00000000000004 | 100 | 100 |
---------------------------------------
| A00000000000004 | 200 | -100 |
| A00000000000004 | 101 | 100 |
---------------------------------------
| A00000000000005 | 200 | 200 |
| A00000000000005 | 100 | -200 |
---------------------------------------
| A00000000000005 | 101 | 100 |
| A00000000000005 | 100 | -100 |
+-----------------+---------+---------+


I am using SQL SERVER 2012 or higher.







sql sql-server






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 7 at 14:04









Cœur

18.9k9110153




18.9k9110153










asked Dec 30 '15 at 3:21









EstyEsty

1,3531927




1,3531927












  • It makes no sense how split value 500 for A...1 and Project 100 into 2 amounts? The rest really is a select sum(Amount) group by transaction, project from table.

    – nolaspeaker
    Dec 30 '15 at 3:56











  • For Transaction A...1 Project 100 has amount 500 and project 200 has amount -300(after summation of same project in same transaction) and project 101 has amount -200. So I want to relate Project 100 to 200 with amount 300 & -300 and Project 100 to 101 with amount 200 & -200.

    – Esty
    Dec 30 '15 at 4:00











  • is there ANY other column available such as ID (unique to each row)? How do you intend to ensure a row isn't included more than once?

    – Used_By_Already
    Dec 30 '15 at 4:10












  • See my updated dataset.

    – Esty
    Dec 30 '15 at 4:13

















  • It makes no sense how split value 500 for A...1 and Project 100 into 2 amounts? The rest really is a select sum(Amount) group by transaction, project from table.

    – nolaspeaker
    Dec 30 '15 at 3:56











  • For Transaction A...1 Project 100 has amount 500 and project 200 has amount -300(after summation of same project in same transaction) and project 101 has amount -200. So I want to relate Project 100 to 200 with amount 300 & -300 and Project 100 to 101 with amount 200 & -200.

    – Esty
    Dec 30 '15 at 4:00











  • is there ANY other column available such as ID (unique to each row)? How do you intend to ensure a row isn't included more than once?

    – Used_By_Already
    Dec 30 '15 at 4:10












  • See my updated dataset.

    – Esty
    Dec 30 '15 at 4:13
















It makes no sense how split value 500 for A...1 and Project 100 into 2 amounts? The rest really is a select sum(Amount) group by transaction, project from table.

– nolaspeaker
Dec 30 '15 at 3:56





It makes no sense how split value 500 for A...1 and Project 100 into 2 amounts? The rest really is a select sum(Amount) group by transaction, project from table.

– nolaspeaker
Dec 30 '15 at 3:56













For Transaction A...1 Project 100 has amount 500 and project 200 has amount -300(after summation of same project in same transaction) and project 101 has amount -200. So I want to relate Project 100 to 200 with amount 300 & -300 and Project 100 to 101 with amount 200 & -200.

– Esty
Dec 30 '15 at 4:00





For Transaction A...1 Project 100 has amount 500 and project 200 has amount -300(after summation of same project in same transaction) and project 101 has amount -200. So I want to relate Project 100 to 200 with amount 300 & -300 and Project 100 to 101 with amount 200 & -200.

– Esty
Dec 30 '15 at 4:00













is there ANY other column available such as ID (unique to each row)? How do you intend to ensure a row isn't included more than once?

– Used_By_Already
Dec 30 '15 at 4:10






is there ANY other column available such as ID (unique to each row)? How do you intend to ensure a row isn't included more than once?

– Used_By_Already
Dec 30 '15 at 4:10














See my updated dataset.

– Esty
Dec 30 '15 at 4:13





See my updated dataset.

– Esty
Dec 30 '15 at 4:13












1 Answer
1






active

oldest

votes


















1














I am not sure about Row separation approach but for getting this 1-1 (negative and positive) value you can order your output.



you can order based on transaction and then absolute value of your amount like -



select *
from <your_table_name>
order by Transaction, abs(Amount)






share|improve this answer























  • With your approach order by transaction and ABS(Amount) and taking the max(Amount) for each transaction I may find which row I need to split in multiple. But How I am going to split it?

    – Esty
    Dec 30 '15 at 3:56











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f34522483%2fsql-row-separation%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














I am not sure about Row separation approach but for getting this 1-1 (negative and positive) value you can order your output.



you can order based on transaction and then absolute value of your amount like -



select *
from <your_table_name>
order by Transaction, abs(Amount)






share|improve this answer























  • With your approach order by transaction and ABS(Amount) and taking the max(Amount) for each transaction I may find which row I need to split in multiple. But How I am going to split it?

    – Esty
    Dec 30 '15 at 3:56
















1














I am not sure about Row separation approach but for getting this 1-1 (negative and positive) value you can order your output.



you can order based on transaction and then absolute value of your amount like -



select *
from <your_table_name>
order by Transaction, abs(Amount)






share|improve this answer























  • With your approach order by transaction and ABS(Amount) and taking the max(Amount) for each transaction I may find which row I need to split in multiple. But How I am going to split it?

    – Esty
    Dec 30 '15 at 3:56














1












1








1







I am not sure about Row separation approach but for getting this 1-1 (negative and positive) value you can order your output.



you can order based on transaction and then absolute value of your amount like -



select *
from <your_table_name>
order by Transaction, abs(Amount)






share|improve this answer













I am not sure about Row separation approach but for getting this 1-1 (negative and positive) value you can order your output.



you can order based on transaction and then absolute value of your amount like -



select *
from <your_table_name>
order by Transaction, abs(Amount)







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 30 '15 at 3:50









pratik gargpratik garg

2,79211221




2,79211221












  • With your approach order by transaction and ABS(Amount) and taking the max(Amount) for each transaction I may find which row I need to split in multiple. But How I am going to split it?

    – Esty
    Dec 30 '15 at 3:56


















  • With your approach order by transaction and ABS(Amount) and taking the max(Amount) for each transaction I may find which row I need to split in multiple. But How I am going to split it?

    – Esty
    Dec 30 '15 at 3:56

















With your approach order by transaction and ABS(Amount) and taking the max(Amount) for each transaction I may find which row I need to split in multiple. But How I am going to split it?

– Esty
Dec 30 '15 at 3:56






With your approach order by transaction and ABS(Amount) and taking the max(Amount) for each transaction I may find which row I need to split in multiple. But How I am going to split it?

– Esty
Dec 30 '15 at 3:56




















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f34522483%2fsql-row-separation%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Thal And Out Agency railway station See also References External links Navigation menuOfficial Web Site of Pakistan RailwaysArchivedOfficial Web Site of Pakistan Railwayseeexpanding ite

Understanding generators in Python2019 Community Moderator ElectionGenerator function not working pythonFor loop not executing two timesGenerators - Printing generated valuesWhy can a python generator only be used once?What exactly do generators do?What does the “yield” keyword do?What does “list comprehension” mean? How does it work and how can I use it?sklearn Kfold acces single fold instead of for loopIs a generator the callable? Which is the generator?Apply Border To Range Of Cells Using OpenpyxlCalling an external command in PythonWhat are metaclasses in Python?What is the difference between @staticmethod and @classmethod?Finding the index of an item given a list containing it in PythonDifference between append vs. extend list methods in PythonHow can I safely create a nested directory in Python?Does Python have a ternary conditional operator?Understanding slice notationUnderstanding Python super() with __init__() methodsDoes Python have a string 'contains' substring method?

How can I change the color of pagination dots of UIPageControl?How to change UIPageControl dotsIs there a way to change page indicator dots colorCustomize dot with image of UIPageControl at index 0 of UIPageControlNo visible @interface for 'NSObject<PageControlDelegate>' declares the selector 'pageControlPageDidChange:'How to change the color of pagination dots in UIPageControl with a different color per pagepagecontrol indicator custom image instead of DefaultChanging the colour of UIPageControl dots in MonoTouchpagecontrol selectable page visibility color?Alternative way to load ViewControllers on a UIPageControlHow to set only layer.border-color for UIpage control dots in swiftHow can I develop for iPhone using a Windows development machine?How to change the name of an iOS app?UITableView - change section header coloruipagecontrol indicator(dot)issueCustom UIPageControl dots color not changingchange the interspace between UIPageControl dotsHow to change Status Bar text color in iOSHow can I change image tintColor in iOS and WatchKitUIPageControl dots with larger space in between each dotsHow to change the color of pagination dots in UIPageControl with a different color per page