This question already has answers here:
Syntax array for mysql [closed]
(1 answer)
Is there any array data type in MySQL like in PostgreSQL?
(4 answers)
Closed 5 months ago.
I am moving from Postgres to Mysql (using Prisma as my connector).
This schema used to work:
model Page {
slug String #id
someValue String
...
tags String[]
}
However, mysql doesn't seem to like String[]
Unable to get DMMF from Prisma Client: Error: Schema parsing error:
Field "tags" in model "Page" can't be a list. The current connector
does not support lists of primitive types.
What am I supposed to do in mysql instead?
This question already has answers here:
using (-) dash in mysql table name
(2 answers)
Closed 9 months ago.
username:admintest
password:' or 1=1#
(and it works perfectly)
But here is the problem
username:a-dmintest
password:' or 1=1#
(and it doesnt work)
when the username have a dash it don't work
Why ?
Maybe you just dont have a user called "a-dmintest"
The dash is not a operator in SQL
This question already has answers here:
MySQL String to DATE / TIME or TIMESTAMP
(1 answer)
MySQL date conversion
(2 answers)
Closed 1 year ago.
I have a XML XML that we download from a health board.
The date stamp formatted as a string 'Mon, 22 Mar 2021 20:50:32 GMT'
Is there a way to get the proper date on this, when I try using either
CONVERT(BathroomTotal,UNSIGNED) or Str_to_date(LastUpdated,'%M/%d/%Y)
it returns null values - so i am assuming that the initial format is the cause of the issue.
Any help will be appreciated
Tahnks
RB
This question already has answers here:
STRING to DATE in BIGQUERY
(4 answers)
Closed 4 years ago.
I have query that uses the following:
STR_TO_DATE(JSON_EXTRACT_SCALAR(fb.p_dataforanalytics,'$.birthday'), '%m/%d/%Y'),
STR_TO_DATE(JSON_EXTRACT_SCALAR(g.p_dataforanalytics,'$.birthday'), '%Y-%m-%d'),
date_format(p_birthday, '%Y-%m-%d')
This syntax works in MySQL but it doesn't work in BigQuery.
I somehow needs to convert it using PARSE_DATE(?) but I can't find the proper syntax for this.
EDIT:
PARSE_DATE('%m/%d/%Y', JSON_EXTRACT_SCALAR(fb.p_dataforanalytics,'$.birthday') ),
PARSE_DATE('%Y-%m-%d', JSON_EXTRACT_SCALAR(g.p_dataforanalytics,'$.birthday')),
PARSE_DATE('%Y-%m-%d', p_birthday)
Dosent work.
I get:
Invalid result from parsing function
and also
on the p_birthday row:
No matching signature for function PARSE_DATE for argument types:
STRING, INT64. Supported signature: PARSE_DATE(STRING, STRING) at
[15:33]
Easy one, with standard SQL:
#standardSQL
SELECT PARSE_DATE('%m/%d/%Y', '6/22/2017')
2017-06-22
https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#supported-format-elements-for-date
JSON_EXTRACT_SCALAR should work unchanged.
This question already has answers here:
Got error 'invalid repetition count(s)' from regexp
(1 answer)
MySql Regex Expression test
(1 answer)
Closed 5 years ago.
I'm having an issue with a query I'm running on MySQL that contains some regex, here it is: SELECT * FROM dump WHERE Hours REGEXP '^\d{337}1{8}'
When I test my regex separately it's working fine, here's some sample data that it matches with:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111100000000
Any idea where it fails?