CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 10:36:52 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=402010ea6a11694a73891f4f61505210899378d78582d9a52de9d9934f24e003a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%2224rHAZ3EKq1bneEDUpxgWBlOIrN1GMrr%22%3B%7D; HttpOnly; Path=/
cf-ray: 98cdb807fe0158e1-BLR
10. geometry 1 - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE Renewable_Energy_Devices (
- device_id NVARCHAR(26) PRIMARY KEY,
- device_status INT CHECK (device_status >= 0 AND device_status <= 6),
- device_power DECIMAL(18,0),
- company_id INT,
- device_location GEOGRAPHY,
- device_location_geom GEOMETRY,
- device_hierarchy HIERARCHYID,
- device_description XML
- );
- DECLARE @latitude DECIMAL(9, 6), @longitude DECIMAL(9, 6);
- DECLARE @point GEOMETRY;
- DECLARE @device_hierarchy HIERARCHYID;
- DECLARE @device_description XML;
- DECLARE @i INT = 1;
- WHILE @i <= 50
- BEGIN
- SET @latitude = RAND() * 180 - 90;
- SET @longitude = RAND() * 360 - 180;
- SET @point = GEOMETRY::Point(@latitude, @longitude, 4326);
- -- Tworzenie hierarchii z użyciem losowej wartości dodanej do korzenia
- IF @i = 1
- SET @device_hierarchy = HIERARCHYID::GetRoot().GetDescendant(NULL, NULL);
- ELSE
- SET @device_hierarchy = @device_hierarchy.GetDescendant(NULL, NULL);
- SET @device_description = '<description>Device_' + CAST(@i AS NVARCHAR(5)) + '</description>';
- INSERT INTO Renewable_Energy_Devices (device_id, device_status, device_power, company_id, device_location, device_location_geom, device_hierarchy, device_description)
- VALUES (
- 'Device_' + CAST(@i AS NVARCHAR(5)),
- CAST(RAND() * 6 AS INT),
- CAST(RAND() * 1000 AS DECIMAL(18, 0)),
- CAST(RAND() * 10 AS INT) + 1,
- GEOGRAPHY::Point(@latitude, @longitude, 4326),
- @point,
- @device_hierarchy,
- @device_description
- );
- SET @i = @i + 1;
- END;
- Zapytanie wybierze wszystkie urządzenia z tabeli Renewable_Energy_Devices, których geometria umiejscowienia (kolumna device_location_geom) znajduje się w odległości mniejszej niż 1000 jednostek od punktu o współrzędnych (0, 0).
- -- Wybierz wszystkie urządzenia, których geometria umiejscowienia jest w odległości mniejszej niż 1000 jednostek od punktu o współrzędnych (0, 0)
- SELECT *
- FROM Renewable_Energy_Devices
- WHERE device_location_geom.STDistance(geometry::Point(0, 0, 4326)) < 1000;
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐⭐⭐ G2A Payment Exploit ✅ NEVER SEEN BEFORE ⭐...
JavaScript | 5 sec ago | 0.24 KB
-
⭐✅ MAKE $2500 IN 15 MIN ✅ NEVER SEEN BEFORE ⭐...
JavaScript | 37 sec ago | 0.24 KB
-
⭐ ✅ Free Products Method ✅ ✅ NEVER SEEN BEFOR...
JavaScript | 48 sec ago | 0.24 KB
-
⭐ G2A Bug ⭐ (Get more on BTC swaps) ✅ NEVER S...
JavaScript | 57 sec ago | 0.24 KB
-
⭐✅ Jack's Profit Method ✅ NEVER SEEN BEF...
JavaScript | 1 min ago | 0.24 KB
-
⭐✅ Online Marketplace Exploit ✅ NEVER SEEN BE...
JavaScript | 1 min ago | 0.24 KB
-
⭐✅ Trading Profit Method ✅ NEVER SEEN BEFORE...
JavaScript | 1 min ago | 0.24 KB
-
⭐ Instant BTC Profit Method ✅ NEVER SEEN BEFO...
JavaScript | 1 min ago | 0.24 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand