Wildcards in exteral table datafile name
Can I use wildcards in exteral table data file name?
user6293502 wrote:
Can I use wildcards in exteral table data file name?Please review your question and compare to purpose of this forum - note forum title which states "Forum: Community Feedback and Suggestions (Do Not Post Product-Related Questions Here)"
It seems like your question relates to database. (Given that Oracle has over 100 products, identifying product/version/OS is considered a minimum courtesy). If true, consider asking your quiestion over in the Oracle Database forums.
Similar Messages
-
SQL Loader: refer datafile name in the control file
Hi All:
Database: 10GR2
I have a table as following:
test (
filename varchar2(100),
mydata varchar2(1000)
I am using sql loader to populate data for this table. I also need store the datafile name to column test.filename as part of dataload. How to refer datafile name in the control file?
Again, I am processing multiple files in a batch mode. I need store datafile name in filename column so that I can know which "mydata" come from which datafile.
Thanks in advance!
KevinAs Bravid says, you can't do that from within SQL*Loader, unless the control files are dynamically generated by a script and the filename included as the default value for that particular column as a hardcoded literal.
It's easier if you use external tables as the table definition contains the "location" which is the list of filenames it is accessing, and the value can be queried as well as being dynamically changed (though if you're dynamically changing it, then you'll programatically know the filename anyway. hint hint!)
;) -
Get datafile name in database column using ctl file - SQLLDR
I have a shell script(ksh) and calling control file using SQLLDR. I want to pass the datafile name in database table column. Can anyone give an example of this. Appreciate your response.
--TV2703Create the control file dynamically before you start SQL*Loader
Something like
echo LOAD DATA > load.ctl
echo INTO TABLE dept >> load.ctl...
Another option is to use external tables -
How to find internal table column names
Hi Friends,
I have declared one internal table with 45 fields.
Here is my situation.
I need to create dynamic table with all above 45 fields and some more fields (approx 10 fields).
I got the solution for creating dynamic table. Only thing is
I have to assign all the above 75 columns to other internal table.
is there any way we can read internal table field names in the program.
we can acheive this by hard coding the all 75 field names.
since it is 75 columns, i want to pass one by one field dynamically to the other table.
Pls give me a solution.
thanks in advance.HI,
Find the code for dynamical internal table., which helps to increase the fields in the internal table dynamically.
REPORT ZTEST_R3.
FIELD-SYMBOLS: <L_TABLE> TYPE TABLE,
<L_LINE> TYPE ANY,
<L_FIELD> TYPE ANY.
DATA: IS_LVC_CAT TYPE LVC_S_FCAT,
IT_LVC_CAT TYPE LVC_T_FCAT.
DATA: NEW_TABLE TYPE REF TO DATA,
NEW_LINE TYPE REF TO DATA.
START-OF-SELECTION.
IS_LVC_CAT-FIELDNAME = 'KUNNR'.
APPEND IS_LVC_CAT TO IT_LVC_CAT.
IS_LVC_CAT-FIELDNAME = 'NAME1'.
APPEND IS_LVC_CAT TO IT_LVC_CAT.
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = IT_LVC_CAT
IMPORTING
EP_TABLE = NEW_TABLE.
*Create a new Line with the same structure of the table.
ASSIGN NEW_TABLE->* TO <L_TABLE>.
CREATE DATA NEW_LINE LIKE LINE OF <L_TABLE>.
ASSIGN NEW_LINE->* TO <L_LINE>.
DO 2 TIMES.
ASSIGN COMPONENT 'KUNNR' OF STRUCTURE <L_LINE> TO <L_FIELD>.
<L_FIELD> = SY-INDEX.
ASSIGN COMPONENT 'NAME1' OF STRUCTURE <L_LINE> TO <L_FIELD>.
<L_FIELD> = 'A'.
INSERT <L_LINE> INTO TABLE <L_TABLE>.
ENDDO.
LOOP AT <L_TABLE> INTO <L_LINE>.
WRITE:/ <L_LINE>.
ENDLOOP.
READ TABLE <L_TABLE> INTO <L_LINE> INDEX 2.
<L_LINE>+10(2) = 'B'.
MODIFY <L_TABLE> FROM <L_LINE> INDEX 2.
LOOP AT <L_TABLE> INTO <L_LINE>.
WRITE:/ <L_LINE>.
ENDLOOP. -
I need the "Real" Table / Table Column names from a sql view
Firstly, we have a system with ~1000 tables and ~250 views. We have field level security on the table columns (in our code)
Now we have a lot of views which select data from the tables, but I need to get the "Table Column Name" that is linked in the view.
I know there are view columns that is not linked to a specific table column, (or concatenation of columns) so those columns can just return NULL.
From the sample you will see there is a view selecting data from another view. I know it is not the best sql performance (execution path) but that is another topic on its own.
I went through a lot of the sys.* stored procs or sys.* views to try and figure out if there is a view that we can use to get the expected results.
here is the sql code:
if
Exists (select
* from
sys.all_objects
where name =
'AliasView2')
drop view dbo.AliasView2
if
Exists (select
* from
sys.all_objects
where name =
'AliasView1')
drop view dbo.AliasView1
if
Exists (select
* from
sys.all_objects
where name =
'Table4')
BEGIN
alter table dbo.Table4
DROP CONSTRAINT [FK_T4_T3]
alter table dbo.Table4
DROP CONSTRAINT [PK_T4_Constraint]
drop table dbo.Table4
END
if
Exists (select
* from
sys.all_objects
where name =
'Table3')
BEGIN
alter table dbo.Table3
DROP CONSTRAINT [FK_T3_T2]
alter table dbo.Table3
DROP CONSTRAINT [PK_T3_Constraint]
drop table dbo.Table3
END
if
Exists (select
* from
sys.all_objects
where name =
'Table2')
BEGIN
alter table dbo.Table2
DROP CONSTRAINT [FK_T2_T1]
alter table dbo.Table2
DROP CONSTRAINT [PK_T2_Constraint]
drop table dbo.Table2
END
if
Exists (select
* from
sys.all_objects
where name =
'Table1')
BEGIN
alter table dbo.Table1
DROP CONSTRAINT [PK_T1_Constraint]
drop table dbo.Table1
END
create
Table dbo.Table1
T1_PK int
NOT NULL
Identity(1, 1)
CONSTRAINT [PK_T1_Constraint]
PRIMARY KEY (T1_PK),
T1_Field1 varchar
NULL,
T1_Field2 varchar
NULL,
create
Table dbo.Table2
T2_PK int
NOT NULL
Identity(1, 1)
CONSTRAINT [PK_T2_Constraint]
PRIMARY KEY (T2_PK),
T2_Field1 varchar
NULL,
T2_Field2 varchar
NULL,
T2_FK int
NOT NULL
CONSTRAINT [FK_T2_T1]
FOREIGN KEY (T2_FK)
REFERENCES dbo.Table1
(T1_PK)
create
Table dbo.Table3
T3_PK int
NOT NULL
Identity(1, 1)
CONSTRAINT [PK_T3_Constraint]
PRIMARY KEY (T3_PK),
T3_Field1 varchar
NULL,
T3_Field2 varchar
NULL,
T3_FK int
NOT NULL
CONSTRAINT [FK_T3_T2]
FOREIGN KEY (T3_FK)
REFERENCES dbo.Table2
(T2_PK)
create
Table dbo.Table4
T4_PK int
NOT NULL
Identity(1, 1)
CONSTRAINT [PK_T4_Constraint]
PRIMARY KEY (T4_PK),
T4_Field1 varchar
NULL,
T4_Field2 varchar
NULL,
T4_FK int
NOT NULL
CONSTRAINT [FK_T4_T3]
FOREIGN KEY (T4_FK)
REFERENCES dbo.Table3
(T3_PK)
GO
--Create a basic view to select some data
CREATE
VIEW dbo.AliasView1
AS
select
t2.T2_FK as Table2_ForeignKey,
t1.T1_Field1 as Table1_FieldOne,
t2.T2_Field1 as Table2_FieldOne
FROM Table1 t1
Left outer
join Table2 t2 on t2.T2_FK
= t1.T1_PK;
GO
--Create another view that select basic data, and also selecting data from view 1
CREATE
VIEW dbo.AliasView2
AS
select
v1.Table1_FieldOne
as Table1_FieldOne,
v1.Table2_FieldOne
as Table2_FieldOne,
t3.T3_Field1 as Table3_FieldOne,
t3.T3_Field2
FROM Table3 t3
Left outer
join AliasView1 v1 on v1.Table2_ForeignKey
= t3.T3_PK;
GO
--My attempt to get the desired output, but no luck
SELECT
col.COLUMN_NAME as AliasColumnName, col.DATA_TYPE, col.CHARACTER_MAXIMUM_LENGTH
as max_length, colu.*
FROM
information_schema.COLUMNS col
left
outer join
(SELECT
VIEW_SCHEMA, VIEW_NAME, COLUMN_NAME,
min(TABLE_NAME)
as TABLE_NAME
FROM information_schema.VIEW_COLUMN_USAGE colu
WHERE VIEW_NAME =
'AliasView2'
Group by VIEW_SCHEMA, VIEW_NAME, COLUMN_NAME
) COLU ON colU.VIEW_NAME
= col.TABLE_NAME
and colu.COLUMN_NAME
= col.COLUMN_NAME
left
outer join
(select a.name
as TableName, c.name
as FieldName
from sys.foreign_key_columns fk
join sys.all_objects a
on a.object_id
= fk.parent_object_id
join sys.all_columns c
on c.object_id
= a.object_id
and c.column_id
= fk.parent_column_id
join sys.all_objects ar
on ar.object_id
= fk.referenced_object_id
join sys.all_columns cr
on cr.object_id
= ar.object_id
and cr.column_id
= fk.referenced_column_id
join sys.schemas scr
on scr.schema_id
= ar.schema_id
) fks on fks.TableName
= colu.TABLE_NAME
and fks.FieldName
= colu.COLUMN_NAME
WHERE COL.TABLE_NAME
= 'AliasView2'
order
by col.ORDINAL_POSITION
This is the results being returned: (That is not 100% what I am looking for)
AliasColumnName
DATA_TYPE
max_length
VIEW_SCHEMA
VIEW_NAME
COLUMN_NAME
TABLE_NAME
Table1_FieldOne
varchar
1
dbo
AliasView2
Table1_FieldOne
AliasView1
Table2_FieldOne
varchar
1
dbo
AliasView2
Table2_FieldOne
AliasView1
Table3_FieldOne
varchar
1
NULL
NULL
NULL
NULL
T3_Field2
varchar
1
dbo
AliasView2
T3_Field2
Table3
The desired results must be like the following:
AliasColumnName
DATA_TYPE
max_length
VIEW_SCHEMA
VIEW_NAME
COLUMN_NAME
TABLE_NAME
Table1_FieldOne
varchar
1
dbo
AliasView2
T1_Field1
Table1
Table2_FieldOne
varchar
1
dbo
AliasView2
T2_Field1
Table2
Table3_FieldOne
varchar
1
dbo
AliasView2
T3_Field1
Table3
T3_Field2
varchar
1
dbo
AliasView2
T3_Field2
Table3
NOTE: the COLUMN_NAME and TABLE_NAME must the REAL field of the TABLE it belongs to and not only ONE LEVEL Higher’s ALIAS View NameNow we have a lot of views which select data from the tables, but I need to get the "Table Column Name" that is linked in the view.
If you are using SQL Server 2012/2014, then you can use
sys.dm_exec_describe_first_result_set (Transact-SQL) to gte the informations.
Olaf Helper
[ Blog] [ Xing] [ MVP] -
Please help me I am not seeing Database table column names in field explorer view
Hi,
I am developing a crystal report using eclipse and sql server. After creating connection, when i drag and drop tables, The table name and its columns should apper in field explorer view. Then we drag the columns onto crystal report. Unfortunately I am just seeing only table names but not column names in field explorer view. Could anyone help me?
After downloading eclipse I have plugged in the crystal report using the following instructions
1. Click on the Help menu, and then Software Updates > Find and Install... to open the Install/Update wizard.
2. Select Search for new features to install and click Next.
3. Click the New Remote Site button. This will launch the New Update Site wizard
4. Type the Business Objects Updsate Site for the Name field and the following for the URL: http://www.businessobjects.com/products/dev_zone/eclipse/
5. Click OK to complete the wizard.
6. Enable the newly created Business Objects Update Site checkbox as well as the Callisto Discovery Site (which should appear by default with Eclipse 3.2) and click Finish.
Expand the Business Objects Update Site node and enable the Crystal Reports for Eclipse 1.0.0v555 checkbox.
8. Expand the Callisto Discovery Site and click the button "Select Required". This will automatically select the required Eclipse features necessary to successfully install Crystal Reports for Eclipse.
Thank You
Rajavardhan SarkapallyNow we have a lot of views which select data from the tables, but I need to get the "Table Column Name" that is linked in the view.
If you are using SQL Server 2012/2014, then you can use
sys.dm_exec_describe_first_result_set (Transact-SQL) to gte the informations.
Olaf Helper
[ Blog] [ Xing] [ MVP] -
Finding source database table/column name for a column in a view
Hi i need to be able to identify the original database table/column name for a column in a view.
e.g. say i have a view like this
create v1 as select a.name fname, b.name bname, c.name cname,......
from u1.names a, u2.names b. u3.names c
where .....
Now I want to find out that the database table/column name for the fname, bname and cname columns in the view v1, which in this instance is u1.name.name, u2.names.name, u3.names.name.
But i need to be able to do it for any view. Short of parsing the SQL is there an easy way of doing this?
Now obviusly I can't do this for virtual columns but I will know my column is not virtual as it has an index on it.But i need to be able to do it for any view. Short of
parsing the SQL is there an easy way of doing this?No, parsing the SQL is the only way. Good luck it is not something I would want to attempt. -
What is table schema name?
Hi,
I was looking at DatabaseMetaData::getColumns() while searching for a way to get a table's column names and I run into these ugly params catalog and schemaPattern. Of course nowhere on the sun's site could I find a definition of these terms although they're used quite often in the API documentation. So I turned to a specific DBMS provider and found out that catalog is a fancy term for the system metadata. But what about the String schema param? I usually see a table's schema referred to as the "structure" of the table, what columns it contains of which types. But I've never known this "schema" can have a string name. Anyone so kind to explain it to me or better point me to a text that has definitions and explanations of the concepts used in the JDBC API documentation? And more generally for JDK where do you folks usually go when you want a simple explanation of how things work, not the dry listing of function and parameter names? Look at MSDN for example, it is both a good reference and a reasonable self-contained tutorial. Not that I praise Microsoft but...
BTW I found that probably ResultSetMetaData is more suitable for my initial purposes, but still the questions bother me. So if you have any suggestion please let me know.
Thank you in advanceTo answer your question, what is a table schema name?, it is the name of the schema that the table belongs to. If you have an Oracle database, MYDB, it will have at the very least two users which are SYS and SYSTEM, these are schema names, there are objects that exists in their schema. If you create a new user, JAKE, and then create a bunch of objects as JAKE, these objects are said to belong to the JAKE schema. All objects are like this, not just tables (indexes, sequence tables, triggers, etc.).
-
How to modify a table column name
Hi all,
How to modify a table column name...
Thankscould type the command here... but will not do that..because you are supposed to read the docs.
You can find the command here..
http://www.faqs.org/docs/ppbook/r22871.htm
Regards,
G. -
Authorization object to display table field names in english text in SE17
Hi,
One of users have issues with the filed name getting displayed in technical format instead of english text while browsing table information in SE17. Normally we can set this in through Settings->User Parameters. But here for this user, user parameter option is greyed out and he doesn't have access to SE16.
Is there any other way to change user specific parameters, instead of granting him accesss to SE16 or enabling user parameters in SE17?
Thanks,
ManoHi,
I made him run SU53 on SE17 transaction the log is showing that authorization check failed for S_ALV_LAYO with value 23.
Actually i have access SE16 and for me also, user parameter option is greyed out in SE17. I ran SU53 on SE17 in my session i also got same log.
One more observation is, the user's colleague also doesn't have access to SE16 and user parameter option is greyed out in SE17 but he can view the table field names in english. So we are wondering if some authorization object is missing here.
We do not want user to make any changes through GUI.
Thanks,
Mano. -
Remain case for table column name
Hello, i am a java developer. I had helped my company to develop a java application all the while and before this we are using ms sql server database. Recently, we want to migrate the database to oracle database. The problem is, in our application, we use the resultsetmetadata to retrieve all the table column name and respective data and store in hashtable, but in ms sql server the table column name is not all in uppercase. When our application try to get the data using hashtable.get("aColumnName"), it will fail because in oracle the column name is all in uppercase. There are more than 1000 jsp page and java code that used the same method to get data, so if i want to change all the code to uppercase, it will consume a lot of unproductive time, is there any way to solve this?
I assume that your code builds an SQL statement like "select * from ??? where table_name = '????';".
If this is correct just wrap the table_name in UPPER(table_name).
If my assumption is incorrect then please give more information.
James. -
Read from a internal table whose name is decided in runtime
Dear ABAPers
I've an internal table's name in a variable, the name is populated in runtime (user_command->ls_selfield-tabname). Now that using the name (in the variable) i need to read a row from that particular internal table (which is populated into the variable). How can i do that.
Regards
Prabumanoharanhi see the coding and do the changes accordingly...
report ztests .
DATA:
o_ref TYPE REF TO data.
FIELD-SYMBOLS:
<lt_table> TYPE STANDARD TABLE,
<fs> TYPE ANY,
<field> TYPE ANY,
<field1> TYPE ANY.
PARAMETERS:
p_tab TYPE tabname default 'MARA', " Table name (eg: MARA)
p_field(20) TYPE c default 'MATNR'. " Field name (eg: MATNR)
START-OF-SELECTION.
CREATE DATA o_ref TYPE TABLE OF (p_tab).
ASSIGN p_field TO <field1>.
ASSIGN o_ref->* TO <lt_table>.
SELECT *
INTO TABLE <lt_table>
FROM (p_tab).
LOOP AT <lt_table> ASSIGNING <fs>.
ASSIGN COMPONENT <field1> OF STRUCTURE <fs>
TO <field>.
IF sy-subrc = 0.
WRITE:/ <field>.
ENDIF.
ENDLOOP. -
Sql developer not showing table/view names
I just set up a new machine, the database settings are same as in the old machine. But I cannot see the table/view names when expending the "+" sign before Tables or Views. When using "select * from tab", the result of all tables/views returns correctly. Is there any other settings I missed?
I'm using Oracle Database 10g Express Edition, and Oracle SQL Developer 1.5.5.The same issue exists in 2.1.1.64.39
All of a sudden: list of tables empty, views still viewable,tables are still there though.
In the logging window I get ora-904 messages on sys.o.name
Sybrand Bakker
Senior Oracle DBA -
does any body know where can i get tables full name
cause in the db browser i get names like AACT.
i wanna get the full name like invoice order header
thanks for your helpHi, Achref zaidi!
Just check the "View->Debug Information" menu item in SAP. Move a mouse on the necessary field in the form, and you will see the table/field names on any form in the left down corner in the main SAP window. And the names will be "like AACT" It's the only names the tables have. -
Links associated with a table of names/ids
Is there a better way to do this in faces?
My page has a table of names, I wish to associate a modify/delete actions with each one, allowing the user to just click say the modify link on one and end up in a page to modify that entry. I ended up generate the links as something like:
<table>
<tr>
<h:form>
<input name="scoutId" type="hidden" value="${scoutBean.scoutId}"/>
<h:commandLink action="#{scoutListActionBean.doModify}" value="Modify Scout"/>
</h:form>
</td>
<td>
<h:form>
<input name="scoutId" type="hidden" value="${scoutBean.scoutId}"/>
<h:commandLink action="#{scoutListActionBean.doRemove}" value="Remove Scout"/>
</h:form>
</tr>
</table>
Then in my action routine, I find the value associated with the request paramter "scoutId" to prepopulate the next modify/delete page.
This seemed pretty clumsy to me, anybody got a better way?Yes. Try DBA_TRIGGER_COLS (or the USER, ALL variants)
APC
Maybe you are looking for
-
Patch Wizard - Support Filter question
I've installed the Support Filter on my 11.5.10 CU2 system and ran it as a test to make sure my system would qualify for Extended Support. The overall status of the job shows Recommended=0 and New Code level=0 so at first appearance it looks good. Ho
-
Setting directory dynamically in File adapter in BPM 11g
Hi, I am using file adapter in BPM 11g for writing perpose. While configuring, it is required to provide the directory location, which can be either physical path or logical. The location where the new file will be stored/saved is written in a text f
-
Edit photos in external application: Pixelmator
I'd like to set Pixelmator as the application which opens when I want to edit photos in an external application. Presently the choice I have in the drop-down menu is only Photoshop. How can change this since there is no option to choose the external
-
Save Large Value example & FCKeditor
Hi, I have been trying to use code from example application 'Save Large Value' with FCKeditor. It doesn't work for me. So how make that code to work with FCKeditor text area? Your suggestions are really appreciated. Thanks, Vladimir
-
Help me!!