This question already has answers here:
Of Countries and their Cities [closed]
(10 answers)
Closed 8 years ago.
I want to build a database of all countries (with longitude and latitude) and their cities. The database will be used in my android application. Any idea where I can find this information to build the database ?
Here is a link that I found that shows a list of all countries, capitals, longitude and latitude.http://www.csgnetwork.com/llinfotable.html
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
The examples I saw about designing a URL shortened all suggest first to create an sequential ID column in the database, and then use this DB-generated ID to get a shortened URL after converting it for an example to base 62. My question is, why not just use the DB generated ID as the shortened ID?
For an example, if I save the URL in the db www.google.com, and the db generated ID for that was 348, then why not just use that as the shortened URL? eg bit.ly/348
Lets say, you're provisioning your system to accommodate 9 billion urls (There are an estimated 1.8 billion web sites in 2018, considering average 5 urls per website). And lets say, you will use (a-z, A-Z, 0-9) to encode the shortened URLs. If you call x as minimum number of characters to represent 9 billion total URLs, then will be the smallest integer such that x^62 > 9*10^9.
Log (9*10^9) to the base 62 = 6
So, you will need 6 characters to be able to uniquely identify all 6 billion urls.
This question already has answers here:
Oracle DB: How can I write query ignoring case?
(9 answers)
Closed 4 years ago.
I am working with database where i need to retrieve distinct values. Example [English enGLish english ....] all this should be displayed as English only. Can anyone tell me how to achieve this.
Thanks in advance
Looks like you need function initcap():
demo
select distinct initcap(column_name) from your_table
This question already has answers here:
Date formats from device based on locale
(5 answers)
Closed 5 years ago.
I want a method that returns the local date format as a string.
E.g., the method would return the string "dd/MM/yyyy" for UK users and "MM/dd/yyyy" for USA users.
What you are looking for is NSDateFormatter's dateFormatFromTemplate:options:locale: method. This takes a template containing the elements of the date you wish included and returns the appropriate format for the supplied locale.
This question already has answers here:
Synchronize independent spreadsheet rows, filled by IMPORTRANGE()
(2 answers)
Closed 7 years ago.
I am looking for some advice on how to approach this, I would like to sort a spreadsheet across 2 sheets using a google script. I know how to use sort () but it only works on a single sheet. First sheet has 2 columns, student name and student number, second sheet has columns student name and student number linked from the first sheet (ex. =Sheet1!A1) and additional columns to enter student marks. Problem is if I use sort on the first sheet then the mark columns will no longer align with the student names and numbers because they are referenced from the first sheet. I know combining into 1 sheet would solve this but I need them in different sheets as it's part of a bigger project.
I could use some advice on how to approach this using a google script.
You could also use VLOOKUP in your second sheet instead of direct references. Then you can rearrange the rows in Sheet1 all you want without affecting Sheet2. e.g. =VLOOKUP(A1, Sheet1!$A$1:$B,2,false)
Place that formula into all cells in column B of the second sheet.
I'm assuming that the student name is always in column A and the student number in column B.
This question already has an answer here:
How to check if a columns value was explicitly specified in a PL/SQL BEFORE UPDATE trigger?
(1 answer)
Closed 8 years ago.
Is there an efficient method to identify which column has changed in a table in Oracle using a trigger? How to check if only one column (of interest) or all other columns also changed?
As the post Alex Pole pointed in your comments states, you could use the UPDATING function.
But you can also develop different triggers for updating specific columns with "BEFORE UPDATE OF" clause, witch is the optimal option if there is no code to share among the actions for the involved columns.