Questions tagged [number-table]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers
44 views

TSQL count 2 different columns by using number table

I am trying to count 2 different date columns on a monthly interval by using a number table: numbers table: num 0 1 2 3 Originating Table (Example): Gender Subscription_Date Cancel_Date male ...
RaGe's user avatar
  • 13
0 votes
1 answer
1k views

Postgresql Search for a 6 digit number in text

I have a table with one field Address - varchar(250), is it possible to search this field for a 6 digit (integer) Pincode. Is it also possible to list out records without any 12 digit Pincode. Sl No |...
Rama Krishna Majety's user avatar
0 votes
1 answer
40 views

What is the largest whole number in Oracle SQL table that can be stored without rounding errors?

I want to "concatenate" numbers to create temporary ids for tuples of objects, but I am worrying about precission loss and rounding errors. Query below suggests that there are no problems with ...
Stepan's user avatar
  • 213
8 votes
3 answers
874 views

Cross join on a numbers table to get line vertices, is there a better way?

The Question: I have a spatial table (road lines), stored using ESRI's SDE.ST_GEOMETRY user-defined datatype in an Oracle 12c geodatabase. I want to list the line vertices so that I can ultimately ...
User1974's user avatar
  • 1,447
1 vote
1 answer
5k views

MySQL - Number format - Separated with Comma

I have a query of MySQL like this- SELECT avg('total_cost') FROM 'employee' And then I am getting output like this- 1254589687.26587952 But I like to have a output like this- 1,25,45,89,687.26 ...
Abrar Jahin's user avatar
3 votes
1 answer
2k views

Insert a range of numbers from a call to sp_sequence_get_range

Given the following code: CREATE SEQUENCE dbo.NextTestId AS [bigint] START WITH 10 INCREMENT BY 2 NO CACHE GO DECLARE @variableNumberOfIdsNeeded INT = 7, -- This will change for each call @...
Vaccano's user avatar
  • 2,484
1 vote
2 answers
6k views

A database of all combinations of 39 numbers taken 5 at a time, total combinations = 575757

I want to create a numerical database of all combinations of 39 integers(1 Through 39) taken 5 at a time. I know the total possible combinations = 575757. This would be the size of the database. I ...
David Mathews's user avatar