|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
newbie: can't select *
I've migrated a db over from Access; i can log in with isql and "show tables;" lists all tables including "foo"; when I look at the db from an admin tool I can see data in the tables, but when I try "select * from foo;" it tells me:
Statement failed, SQLCODE = -104 Dynamic SQL Error -SQL error code = -104 -Token unknown - line 1 char xx -foo Where can I start to troubleshoot this? Thanks for any help. -Bill |
|
#2
|
||||
|
||||
|
You must have SELECT privilege granted:
GRANT SELECT ON foo TO <user>, or you have to login as SYSDBA user. |
|
#3
|
|||
|
|||
|
.An answer and one further question:
This db was created by a script generated by InterBase DataPump; because the table names were specified in quotes during the creation, it turns out that they must be referred to with quotes:
SELECT * from "foo"; BTW: How would I do this on IB/Firebird: GRANT SELECT ON * TO <user>; ? (grant privileges to all tables in a db) atb -s Last edited by sporb : September 24th, 2003 at 12:10 PM. |
|
#4
|
||||
|
||||
|
Quote:
1). you can create a stored procedure to grant all privileges (SIUDR) to an user on all tables/views in database: CREATE PROCEDURE SP_GRANT_ALL ( M_USER CHAR(31)) AS DECLARE VARIABLE M_TABLE CHAR(31); begin for select RDB$RELATION_NAME as myTable from rdb$relations WHERE SUBSTRING(RDB$RELATION_NAME from 1 for 4) <> 'RDB$' INTO :m_table do begin execute statement 'grant all on ' || :m_table || ' to ' || :m_user; end suspend; end (to execute SP_GRANT_ALL(<cUser>) you must have EXECUTE ON PROCEDURE privilege) 2).or GRANT ALL on <table> to PUBLIC; * ALL = select + insert + update + delete + reference |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > newbie: can't select * |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|