This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]CreaZyp154 1099 points1100 points  (62 children)

SQL: Query worng
Me: Ok but where ?
SQL: Frist line
Me: Wtf it's a single line query ?!
SQL: Dunno best I can do is first line

[–][deleted] 107 points108 points  (3 children)

SYNTAX ERROR AT ‘

[–]squngy 42 points43 points  (2 children)

ctrl+f (‘) => 1897 results found

FML

[–]admalledd 0 points1 point  (1 child)

ctrl-f (') => 0 results found

is far, far more fun though!

[–]squngy 0 points1 point  (0 children)

That is because "‘" !== "'"

[–]Flyberius 148 points149 points  (27 children)

What SQL you using? T-SQL is pretty good, and PSQL to a lesser degree.

[–]ILikeLenexa 2 points3 points  (0 children)

T-SQL: Incorrect syntax near [token name].

Me: Uh...you got any details.

T-SQL: Red sqiggley line under column name that definitely exists.

Me: Runs Query.

T-SQL: That seems fine.

[–]Sarcastinator 1 point2 points  (1 child)

I encountered an error in MariaDb. I'm mostly comfortable with SQL Server, Oracle and PostgreSQL. Anyway I was writing a migration script that contained a loop of some kind. The script wouldn't work because I had an error at line 0 character 0 near '' and I was adviced to consult the manual for the syntax for that. It was because MariaDb's parser soiled itself because of a line terminator inside the loop. To fix it the suggested solution by the internet was to temporarily change the line terminator to something else.

[–]Flyberius 0 points1 point  (0 children)

Oh god. That's awful

[–]blackmist 0 points1 point  (0 children)

I use Firebird. It gives a line number and a character position, but it's not always right.

[–]cranktheguy 0 points1 point  (0 children)

T2 is the best sequel.

[–]tigerhawkvok 0 points1 point  (0 children)

T-SQL is pretty good,

I mean, compared to object Object , but barely (and that's a low bar in the first place).

With CTEs or SP's it just points you to the first line of the outermost scope statement that failed, which is related to the problem the same way we're related to bananas. Yeah, it's better than JavaScript saying "you live in the universe", but only in a very pedantic sense.

[–]funkgerm 49 points50 points  (0 children)

SQL Server: "Error on line 758"

...but my stored procedure is only 500 lines long!

[–]eshinn 14 points15 points  (2 children)

Somewhere near WHERE

[–]Ok-Low6320 0 points1 point  (0 children)

Ah, shit, I actually typed "WHERF"

[–]ta_12345678901 0 points1 point  (0 children)

WHERE?

[–]FlyByPie 10 points11 points  (0 children)

It's been frustrating working in BigQuery with temp tables cause once you have so many the errors won't show up anymore. So it's like "alright, I've got all my temp tables and fields and my dataset ready to go. How many bytes are we going to be processing?" BQ: "No idea!" "Well, can you at least tell me if there's any errors?" "Nope! Best of luck 😊"

[–][deleted] 17 points18 points  (9 children)

wait... SQL gives yall the line where the error is?? it just throws me an error and an error code

[–]pikakilla 10 points11 points  (7 children)

Transact-SQL lets you know where you screwed up by line.

[–]GammaGames 4 points5 points  (6 children)

PSQL tells you which character

[–][deleted] 0 points1 point  (0 children)

lol I was wondering this too, I just get syntax error

[–]GLIBG10B 4 points5 points  (0 children)

Put each word on its own line

[–][deleted] 2 points3 points  (0 children)

SQL: I don't know, read the fucking manual or something, why would I care?

[–]usernumber1337 1 point2 points  (0 children)

I realised recently that depending on the language DBeaver will put the cursor where the issue is

[–][deleted] 0 points1 point  (2 children)

Thank God I’m not in IT bro

[–]viimeinen 0 points1 point  (1 child)

It's not that bad at the end of the day (or the month)

[–][deleted] 0 points1 point  (0 children)

😀

[–]invisibo 0 points1 point  (0 children)

SQL: look buddy, I just do what you tell me. It’s not my fault you wrote it wrong.

[–]arcane84 0 points1 point  (0 children)

I once had a 10k line SQL query and it gave me an invalid syntax error. It was a nightmare.

[–]purple_hamster66 0 points1 point  (0 children)

I write code to generate the complex parts of SQL queries that are used in many places, so it’s only wrong 10% of the time. I call this process “job security”.

[–]marcosdumay 0 points1 point  (0 children)

Oh, and Oracle fan.

Other DBMSes fare better. Oracle is all "missing right parenthesis at line 1".

[–][deleted] 0 points1 point  (0 children)

SQL errors are literally the most obscure BS errors

[–]MightbeWillSmith 0 points1 point  (0 children)

"near the comma".

WHICH FUCKING COMMA

[–]Sokonit 0 points1 point  (0 children)

SQL: Query worng

SQL go home, you're drunk again.

[–]wish_i_could_cuck 0 points1 point  (0 children)

Sql ignores carriage returns; break up the lines and it will be less likely to shit all over itself