| Welcome, Guest |
You have to register before you can post on our site.
|
| Forum Statistics |
» Members: 743
» Latest member: petunia
» Forum threads: 4,229
» Forum posts: 72,234
Full Statistics
|
| Online Users |
There are currently 15 online users. » 0 Member(s) | 15 Guest(s)
|
| Latest Threads |
test 2
Forum: Opinion and Politics
Last Post: king1
28-11-2025, 03:03 PM
» Replies: 0
» Views: 10
|
test 1
Forum: Opinion and Politics
Last Post: king1
26-11-2025, 08:51 AM
» Replies: 0
» Views: 9
|
mn,n,
Forum: Opinion and Politics
Last Post: king1
14-10-2025, 07:27 AM
» Replies: 0
» Views: 56
|
test
Forum: Opinion and Politics
Last Post: king1
10-10-2025, 06:05 PM
» Replies: 0
» Views: 57
|
Thousands give up medic a...
Forum: News and Current Affairs
Last Post: Lilith7
10-08-2025, 11:48 AM
» Replies: 8
» Views: 457
|
Idiot govt apparently als...
Forum: Opinion and Politics
Last Post: Lilith7
10-08-2025, 11:43 AM
» Replies: 8
» Views: 393
|
Sayings & Quotes
Forum: General Discussion
Last Post: Lilith7
10-08-2025, 11:38 AM
» Replies: 1,572
» Views: 234,944
|
You can never have enough...
Forum: Sewing, embroidery and knitting
Last Post: Oh_hunnihunni
10-08-2025, 11:05 AM
» Replies: 13,279
» Views: 1,900,351
|
Secret Diary time...
Forum: Opinion and Politics
Last Post: Oh_hunnihunni
10-08-2025, 11:02 AM
» Replies: 0
» Views: 89
|
Winston's Hi viz performa...
Forum: Opinion and Politics
Last Post: Oh_hunnihunni
10-08-2025, 08:59 AM
» Replies: 12
» Views: 472
|
|
|
| ChatGPT SQL Query |
|
Posted by: king1 - 03-05-2023, 07:32 PM - Forum: Computing and Technology
- Replies (3)
|
 |
Had a need for a small project, a database query on three different database types, since I only use mysql I asked ChatGPT - here's the answer. 
A lot of industries should be rightly worried I would think...
Anyone know how correct these results are?
Question: can you convert a MYSQL query to be compatible with pgsql
ChatGPT Answer
Yes, I can help you convert a MySQL query to be compatible with PostgreSQL (pgsql).
Here's an example MySQL query:
Code: SELECT *
FROM users
WHERE age > 25
ORDER BY last_name DESC
LIMIT 10;
Here's the equivalent PostgreSQL query:
Code: SELECT *
FROM users
WHERE age > 25
ORDER BY last_name DESC
LIMIT 10;
As you can see, the syntax for the SELECT statement is almost identical in both MySQL and PostgreSQL. However, there may be slight differences in the syntax for certain functions or clauses. For example, PostgreSQL uses "ILIKE" instead of "LIKE" for case-insensitive pattern matching, and it uses "::" to cast a value to a specific data type.
If you have a specific MySQL query that you need help converting to PostgreSQL, feel free to provide it and I can assist you with the conversion.
Question : I Provide the query
Quote:CREATE TABLE mybb_chkProxyPlus (
eventid int NOT NULL AUTO_INCREMENT,
dateline int unsigned NOT NULL default '0',
ipaddress varbinary(16) NULL default NULL,
giiScore DECIMAL(7,2) NOT NULL default 0,
sfsConf DECIMAL(7,2) NOT NULL default 0,
errorMsg text,
PRIMARY KEY (eventid)
[/font][/color]Here's the equivalent PostgreSQL statement for creating the mybb_chkProxyPlus table
Code: CREATE TABLE mybb_chkProxyPlus (
    eventid SERIAL PRIMARY KEY,
    dateline integer NOT NULL default 0,
    ipaddress inet NULL default NULL,
    giiScore NUMERIC(7,2) NOT NULL default 0,
    sfsConf NUMERIC(7,2) NOT NULL default 0,
    errorMsg text
);
The SERIAL type in PostgreSQL is equivalent to the AUTO_INCREMENT attribute in MySQL. PostgreSQL also has an inet data type for storing IP addresses. The NUMERIC data type in PostgreSQL is equivalent to the DECIMAL data type in MySQL.
Note that the varbinary data type in MySQL is not directly supported in PostgreSQL. The closest equivalent is the bytea data type, but since the ipaddress column is not used as a binary field in this case, I've used the inet data type instead.
Question :  and in sqlite?
Here's the equivalent SQLite statement for creating the mybb_chkProxyPlus table
Code: CREATE TABLE mybb_chkProxyPlus (
    eventid INTEGER PRIMARY KEY AUTOINCREMENT,
    dateline INTEGER NOT NULL DEFAULT 0,
    ipaddress BLOB,
    giiScore NUMERIC(7,2) NOT NULL DEFAULT 0,
    sfsConf NUMERIC(7,2) NOT NULL DEFAULT 0,
    errorMsg TEXT
);
The INTEGER data type in SQLite is equivalent to the INT data type in MySQL and integer data type in PostgreSQL. SQLite also has an AUTOINCREMENT attribute to generate auto-incrementing primary keys.
The BLOB data type in SQLite is equivalent to the varbinary data type in MySQL. The NUMERIC data type in SQLite is equivalent to the DECIMAL data type in MySQL and NUMERIC data type in PostgreSQL.
Note that SQLite does not have a specific data type for storing IP addresses. In this case, I've used the BLOB data type to store the IP address as a binary field.
|
|
|
| transgender community demanding funding for their drugs |
|
Posted by: C_T_Russell - 03-05-2023, 12:11 PM - Forum: Opinion and Politics
- Replies (24)
|
 |
Just seen a petition going round that is demanding pharmac fund more drugs and even funding for reassignment surgery.
This is just nuts.
They really think the taxpayer should fund their lifestyle choice?
All the health implications that this shit does to their body is also a burden to the health system in later years.
Pharmac has far better things to fund like cancer treatments, waiting lists are bad enough for far more serious surgeries.
The delusion here is just next level.
If they succeed in getting this funded, then so should botox and Propecia get funded too.
|
|
|
Sky Sport Now channels vs Sky Go/normal satellite Sky |
|
Posted by: GameJunkie - 29-04-2023, 08:18 PM - Forum: PC World Chat
- Replies (6)
|
 |
Hi,
I'm just wanting to see if anyone can help me understand this 'problem' I've noticed on Sky.
I am subscribed to Sky Sport Now to watch F1, Cricket etc, which I'm fairly happy with.
However, I have noticed the following 'issue' when it comes to their pop-up channels for endurance racing, namely the FIA WEC 6 hours of Spa starting at 10:45pm tonight.
On Sky Sport Now, I get channels 1-7, premier league (8), 9, Select, ESPN/ESPN2 and Pop-up 1.
The WEC race is nowhere to be seen on any of the channels, but if I look at the TV guide for Sky Go, they are showing the race on Pop-up 2.
I fail to understand why they are showing the race on traditional Sky (satellite) and Sky Go on Pop-up 2, but they have not made Pop-up 2 available throught the Sky Sport Now streaming platform they run.
It's incredibly frustrating that there is the further gatekeeping of content through the traditional Sky platform.
Why are they doing it this way??
They also did the same thing for the previous race at Sebring for WEC.
I just don't get it...
|
|
|
|