I'm trying to browse an ms-access data base on a mac. Best results so far, I had with using OpenOffice on a Mac like described here.
Now I can see all the tables. But when I try to access the data with selects, I only see 3 lines of the result set and the contents of string columns is only shown with the first letter.
However, somehow I can access all the data:
select count(*) from SomeTable gives me correct row count.
select * from SomeTable where SomeStringCol='SomeWord' returns the
expected row(s)(so the select seems to use more than the first
letter... and select * from SomeTable where SomeStringCol='S'
returns empty result)
Any idea why it is like it is and how to access the full data? (It's not necessary to go with OpenOffice, that was just the best way up to now)
select * from SomeTable where SomeStringCol='S' only selects those rows where the only text in SomeStringCol is the letter 'S'. This is probably unlikely (but not impossible)
You would need to change the query to select * from SomeTable where left(SomeStringCol, 1) ='S' or select * from SomeTable where SomeStringCol like 'S*'
. when I try to access the data with selects, I only see 3 lines of the result set
As mentioned in the comments to the blog post cited in the question, the unlicensed version of that ODBC driver is crippled and will only return 3 rows.
I recently answered a similar question here regarding LibreOffice Base on Linux. The solution was to use the (free) UCanAccess JDBC driver to connect LibreOffice to the Access database. The actual steps would be slightly different for Mac OS X, but the basic approach would be the same.
I finally installed MDB Tool which opened the full DB and allowed me csv-exports.
Related
So I am new in SQL DEVELOPER tools and I have written a simple select statement like:
SELECT * FROM employee;
it worked fine but there was a yellow warning mark underneath SELECT and I clicked on that and my query changes into the following query:
SELECT "A1"."EMPLOYEE_ID" "EMPLOYEE_ID","A1"."FIRST_NAME" "FIRST_NAME","A1"."LAST_NAME" "LAST_NAME","A1"."SALARY" "SALARY", "A1"."DEPARTMENT_ID" "DEPARTMENT_ID","A1"."MANAGER_ID" "MANAGER_ID","A1"."HIRE_DATE" "HIRE_DATE"
FROM "INTRO_USER"."EMPLOYEE" "A1";
My Quest is what is the difference between these two queries? although their output is the same
The glob * has been expanded to all column of the table. The table name EMPLOYEE is aliased to A1 to make it shorter.
The feature you are seeing is called 'SQL Text Expansion,' and it's setup to allow you to see what your query would look like if you were working with one or more VIEWS.
For example, SELECT * FROM ALL_TABLES is quite complicated. This feature allows you to see what's actually involved when running that SQL.
https://www.thatjeffsmith.com/archive/2014/12/sql-developer-and-a-12c-magic-trick/
There is probably no change or expected delta in the performance or execution plan of the 2 versions of your query.
I am working with huge table which has 9 million records. I am trying to take backup of the table. As below.
First Query
Create table newtable1 as select * from hugetable ;
Second Query
Select * into newtable2 from hugetable ;
Here first query seems to be quite fast. I want to know the functional difference and Why it is fast compare to second query?, Which one is to be preferred?
Quote from the manual:
This command (create table as) is functionally similar to SELECT INTO, but it is preferred since it is less likely to be confused with other uses of the SELECT INTO syntax. Furthermore, CREATE TABLE AS offers a superset of the functionality offered by SELECT INTO.
So both do the same thing, but CREATE TABLE AS is part of the SQL standard (and thus works on other DBMS as well), whereas the SELECT INTO is non-standard. As the manuals says, you should prefer CREATE TABLE AS over the non-standard syntax.
Performance wise both are identical, the differences you see are probably related to caching or other activities on your system.
CR XI Developer R2. Version 11.5.12.1838, talking to Oracle 11.2.0.3 64bit
A report is driven by an SQL Command. It is (necessarily) a complex report consisting of 7 separate SELECT statements UNION ALLed together. The report also starts with a CTE (or whatever they're called in Oracle)
WITH MYCTE AS (
SELECT x, y, z
FROM N)
SELECT ....
The SQL Command was edited thousands of times when under development. It was last changed six months ago.
Now when I edit the SQL Command, (Database Expert - Right click on Command - Edit Command - Close I am greeted by the 'Map Fields' screen
which is telling me that my query doesn't have any columns in it, and well, proceeding further is useless.
It turns out that if the first line of the report is anything other than SELECT ... then this condition occurs. My environment hasn't changed, this report used to work, and now doesn't.
And it's a general thing as well. From scratch I created a report fed by an SQL Command that was
SELECT * FROM DUAL
and it worked fine. Then I created another report fed by an SQL Command that was
/*This is perfectly valid SQL*/
SELECT * FROM DUAL
Result was that no fields were found. I tried again (expecting failure, I wasn't disappointed) with
WITH STUFF AS (
SELECT * FROM DUAL)
SELECT * FROM STUFF
Does anyone know what's going on? I wouldn't mind if SQL Commands didn't support CTEs, but they clearly do, because I managed to create / edit the existing report in the first place ....
Thanks in advance
Wow. It turns out it's a bug in the 11.2.0.3 Version of the oracle client installer. It OLEDb provider correctly. The fix is simply to run
C:\Windows\SysWOW64\regsvr32 <PathToYourOracleClientInstallFolder>\Client32bin\OraOLEDB11.dll
Actually found the answer at https://scn.sap.com/thread/3382251
I am using SQLManager Lite for firebird and it was impossible so far to write a query which would do an operation on char/varchar columns. Character set is win1252.
A query like
select * from Person where name = 'John'
won't return any results despite the fact that the record exists in the database. A similar query on a numerical column works just fine.
AM I am missing anything here?
Also, this query runs fine from my application. The only issue is that I would like to be able to run it within SQLManager Lite too. As a side note, values for char and varchar columns are not displayed properly within the same SQLManager Lite.
change to like
select * from Person where name like 'John'
The following SQLite query is accepted by the SQLite shell (version 3.7.5, which is the latest one), despite containing a "strange" insertion of the word qwerty:
sqlite> select distinct DOB from (select * from MyTable qwerty);
It works whatever the word put after MyTable. Is this normal? I did not find this syntax in the syntax diagrams from the official sites.
You're aliassing the table MyTable as querty. Since you're not using either name in the rest of the query, this has no effect. The query is expressed by the documentation you linked, it's taking the path in single-source that skips database-name and AS.