Eclipse SQL Code Assist - sql

Is there some trick to getting SQL Code Assist working in Eclipse? I have opened an SQL scrapbook page, assigned it a type, connection name and database.. and tried to type some SQL.
If I enter a schema name..
select * from public.
It shows me a list of tables.. so I can select one and get:
select * from public.batch_job_instance
but that's it. Once I start on the WHERE clause there is no help. It doesn't matter whether I put public or public.batch_job_instance (or just hurl obscenities at my monitor for five minutes - I tried that a few times) there is no further "assistance".
How exactly do I get this code assist to assist me?

Related

SQL select by field acting weird

I am writing this post because I have encountered something truly weird with an SQL statement I am trying to make.
Context:
I am developing an app which uses JPA in the backend to persist / retrieve objects to/from a postgres database.
Problem:
During some tests I have noticed that when a particular user adds entries in the database and later I try to fetch them by his facebook id, the result is an empty list, even though the entries are there in the database. Doing a select statement on the database returns no rows. This does not happen with other users.
I have noticed that the mentioned user's facebook id is slightly longer then others. I do not know if and how this affects this situation.
Interesting part:
When during debugging I created an entry not programmatically, but manually with a SQL INSERT statement directly on the database (marked red on the 1st screenshot), I could fetch the data by facebook id both in my app and with a select statement.
Do you have any ideas what is going on here?
Please check the screenshots:
result of select * from table:
result of select * from table where user_facebook_id = 10215905779020408 :
Please help,
Thanks

USER INPUT SQL for name

SELECT PNAME,POSITION FROM PLAYER
WHERE Pname = 'Andrew Laken';
So basically im using sql developer and im trying to get a user input box to display to enter then name of the basketball player, have done this sort of thing on MySQL and MS Access but for the life of me cant get it work in SQL Developer. Any idea how? also one thing I don't know how to do on any software that uses SQL is error handling. If data correct display successful, if not error etc. If anyone could add that into the solution for this problem that would be Very helpful :D
Bind variables are indicated by a colon as the first character, like this:
SELECT (...) -- your "SELECT" clause here
FROM (...)
WHERE Pname = :pname
Each interface (like SQL Developer) has its own method for passing in parameters. In SQL Developer in particular, if you enter this query in the Query Builder and try to execute it, a window will pop up asking you for the value you want to enter for :pname.
Error handling: There is no "developer" handling of errors in straight SQL in Oracle; if you want to handle specific (non-system) errors you will have to write your own procedures/functions/packages.
SELECT PNAME,POSITION FROM PLAYER WHERE Pname = &enter_name;

SQLite missing database

I have two database named Main and OutputTax using Firefox SQLite database.My aim is to update database in OutputTax while data in Main is input by selecting certain columns.
The columns in Main are "Date", "Particular", "InvNoSimp", "InvNoFull", "AmountTaxSimp", "GSTSimp", "AmountTaxFull"
While I just need "Date","Particular","InvNoSimp","AmountTaxSimp", "GSTSimp", in OutPutTax database.
String query="insert into OutputTax SELECT
Date,Particular,InvNoSimp,AmountTaxSimp,GSTSimp, from Main";
Whenever I call this query, It shows Query does not return results.
Can anybody tell me what is the problem? Thank you, your answer is much appreciated!
Have you tried this
insert into OutputTax( Date,Particular,InvNoSimp,AmountTaxSimp,GSTSimp) SELECT
Date,Particular,InvNoSimp,AmountTaxSimp,GSTSimp from Main;

ms access 2007 simple select query wizard, the available fields box is empty

I am trying to make a simple select query based on a cross tab query. If I use the query wizard the available fields box is empty and I cannot select any fields. I then tried to make the query manualy: in design view I select the fields to be shown, but when I try to run the query (or see it in datasheet view) I got the error: "Too few parameters. Expected 2. (Error 3061)"
Am I missing something, can you please help me
thank you in advance

MS Access database: Select statement error

I am trying following query in MS Access 2010 database:
Query:
SELECT ID, Title, Priority, Workflow_Instance_Step_ID:ID
FROM Task
Error:
Error Source: Microsoft Office Access Database Engine
Error Message: Syntax error (missing operator) in query expression 'Workflow_Instance_Step_ID:ID'
I know that field "Workflow_Instance_Step_ID:ID" is giving error as it has ':' operator, but I cant change it as it it coming from share point list.
I have tried '[Workflow_Instance_Step_ID:ID]' but still its giving an error.
Please give me your suggestion on the same.
I am unable to recreate your issue, at least with a native Access table in Access 2010. I created a table named [baz] with a single text field named [foo:bar]
foo:bar
-------
this
is
a
test
and the query
SELECT [foo:bar] FROM baz;
works fine, so a field name containing a colon character does not seem to cause problems for Access SQL as such.
An ODBC linked table to a SQL Server table with the same structure does not cause problems either.
In both cases the queries were run from within Access 2010 itself.
So we might be in diagnosis mode, so lets try
SELECT * FROM Task
and then look at the FieldNames that come back.