Arnaud Denoyelle
Arnaud Denoyelle

Reputation: 31225

Navigate to sql position

IntelliJ pro comes with an embedded SQL editor.

Sometimes, I type a wrong request and the database returns an error and the corresponding SQL position.

Example :

[2017-01-02 16:32:35] [42P01] ERROR: missing FROM-clause entry for table "customer" Position : 516

Problem : for readability reasons, the request is written on multiple lines, making it harder to find the position 516.

Up to now, the only solution I got is to delete the \n characters in order to have the request on only one line then navigate to the 516th column.

But I guess there is a better way, like a fancy keyboard shortcut?

Upvotes: 7

Views: 6091

Answers (3)

Isan Hawke
Isan Hawke

Reputation: 300

It's been a while you asked but I'll answer anyway to help others:

Character position will be shown in the bottom-left corner of the editor.

Upvotes: 9

Krzysztof Wlezień
Krzysztof Wlezień

Reputation: 35

In my case I press F2 and cursor go there.

Upvotes: -1

Tome Pejoski
Tome Pejoski

Reputation: 1582

The current caret position (line number and offset) is displayed in the Status Bar. You can click it to open the Go To Line dialog box.

enter image description here

Change the second number to the needed position of your character and will be navigated directly.

Upvotes: -3

Related Questions