Questions tagged [number-table]

7 questions
8
votes
3 answers

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 access & update their coordinates. If I was using…
User1974
  • 1,517
  • 25
  • 54
3
votes
1 answer

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 @FirstSeqNum SQL_VARIANT , @LastSeqNum sql_variant,…
Vaccano
  • 2,550
  • 5
  • 31
  • 56
1
vote
2 answers

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 would then like to query the database for various…
David Mathews
  • 11
  • 1
  • 2
1
vote
2 answers

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…
RaGe
  • 13
  • 3
1
vote
1 answer

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 So, a comma separator should be added and number…
0
votes
1 answer

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 | Address 1 | "16/127, Off M G Road, Goregaon…
0
votes
1 answer

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 rounding at least up to 10^27. select t.remvalue,…
Stepan
  • 213
  • 3
  • 13