Querying the tables from CIS
Hi,
I need to query the stellent content store( database) and get the values through my CIS application code.Is it possible ? if so how ?
For ex : if want to check the existence of a folder name , how can i query and check that from CIS Code.
The Query is:-SELECT A.ID, A.NAME, A.COMB, B.C1,B.C2, B.C3 FROM NT_KFD_RFT_TEST_DATE A, TABLE(OB_KFD_RFT_DATA) B
Nested Table structure Example:-
ID NAME COMB OB_KFD_RFT_DATA
01 TEST ALL
The inner table (OB_KFD_RFT_DATA) structure is
C1 C2 C3
23.5 56.7 78.9
00.9 76.9 53.3
12.4 33.4 23.2
Here outer record is 01 TEST ALL, and inner record is the 3 row decimal numbers.
In Universe, I need to create Objects from C1, C2, C3 columns.
Currently i'm doing it with derived table (by running above query). Is there any other option to do it?
Thanks,
Anu
Similar Messages
-
Why compilation error--when trying to access the table from itcsi schema
Hi,
when querying the table from itcsi.app iam able to see the data but used in proc saying invalid table name. Whats the problem
when declared p_app_i_old app.app_i%type----It is throwing pls-00201 error
1 Create or replace procedure Test_insert(p_app_i_old integer,
2 p_app_i_new integer,
3 p_APP_ISAC_CPT_I varchar2)
4 is
5 cursor c1 is
6 select distinct table_name,owner
7 from all_tab_columns
8 where owner = 'ITCSI' and column_name='APP_I';
9 t_tablename varchar2(25);
10 t_string varchar2(300);
11 t_num number;
12 Begin
13 For c2 in c1 loop
14 t_num := 0;
15 t_string := 'SELECT count(*) FROM ' || c2.owner ||'.'||c2.table_name||' WHERE APP_I = '||p_
16 execute immediate t_string into t_num;
17 if t_num > 0 then
18 -- dbms_output.put_line('The table name is '||c1_rec.table_name);
19 if c2.Table_name = 'APP' Then
20 INSERT INTO itcsi.App
21 SELECT p_app_i_new,
22 app_acrnym_c,
23 app_x,
24 app_desc_t,
25 app_ipads_t,
26 app_prdcn_stat_t,
27 app_prdcn_stat_d,
28 app_isd_tier_c,
29 app_bus_cont_c,
30 app_extnl_cstm_c,
31 app-ecrpt_lvl_c,
32 app_isac_cpt_i,
33 dsw_gpn_i,
34 ed_cntnt_srce_t,
35 usr_upd_uunm_i,
36 ed_upd_m
37 FROM itcsi.APP
38 WHERE app_i = p_app_i_old;
39 elsif c2.Table_name = 'APP_CETRN' Then
40 Insert into itcsi.APP_CETRN
41 select p_app_i_new,
42 app_cetrn_i,
43 app-curr_cmplnc_t,
44 app_rqr_cmplnc_t,
45 dsw_gpn_i,
46 ed_cntnt_srce_t,
47 usr_upd_uunm_i,
48 ed_upd_m
49 FROM itcsi.APP_CETRN
50 WHERE app_i = p_app_i_old;
51 elsif c2.Table_name = 'APP_GPC' Then
52 Insert into itcsi.APP_GPC
53 select p_app_i_new,
54 gpc_dpnt_x,
55 gpc_elemy_x,
56 pro_i,
57 dsw_gpn_i,
58 ed_cntnt_srce_t,
59 usr_usr_upd_uunm
60 FROM itcsi.APP_GPC
61 WHERE app_i = p_app_i_old;
62 End if;
63 End if;
64 End loop;
65 --Commit;
66* End;
SQL> /
Warning: Procedure created with compilation errors.
SQL> show errors
Errors for PROCEDURE TEST_INSERT:
LINE/COL ERROR
20/2 PL/SQL: SQL Statement ignored
37/23 PL/SQL: ORA-00942: table or view does not exist
40/2 PL/SQL: SQL Statement ignored
Thankshow do i check the grant?
if am in my own schema,how do i connect to itcsi
schema?if you are using a schema other than the ITCSI schema, you need to login as ITCSI. or if you have dba user account you can grant a privilege of
GRANT ALL on ITCSI.APPS to <other SCHEMA>; -
How to Move or Copy the Tables from One Database to Another Database ?
HI,
Can any one help me on this, How i can move or copy the tables from one database to another database in SQL server 2005 by using SQL query. Hope can anyone provide me the useful and valuable response.
Thanks
GopiHello,
Maybe these links help you out
http://www.microsoft.com/downloads/en/details.aspx?familyid=56E5B1C5-BF17-42E0-A410-371A838E570A&displaylang=en
http://www.suite101.com/content/how-to-copy-a-sql-database-a193532
Also, you can just detach the database make a copy and move it to the new server. -
How to delete/drop all the tables from SQL Server Database without using Enterprise Manager?
I tried using DROP Tables, Truncate Database, Delete and many more but it is not working. I want to delete all tables using Query Analyzer, i.e. through SQL Query.
Please help me out in this concern.
Nishith ShahInformative thread indeed. Wish I saw it early enough. Managed to come up with the code below before I saw this thread.
declare @TTName Table
(TableSchemaTableName
varchar
(500),
[status] int
default 0);
with AvailableTables
(TableSchemaTableName)
as
(select
QUOTENAME(TABLE_SCHEMA)
+
+
QUOTENAME(TABLE_NAME)
from
INFORMATION_SCHEMA.TABLES)
insert into @TTName
(TableSchemaTableName)
select *
from AvailableTables
declare @TableSchemaTableName varchar
(500)
declare @sqlstatement nvarchar
(1000)
while 1=1
begin
set @sqlstatement
=
'DROP TABLE '
+ @TableSchemaTableName
exec
sp_executeSQL
@sqlstatement
print
'Dropped Table : '
+ @TableSchemaTableName
update @TTName
set [status]
= 1
where TableSchemaTableName
= @TableSchemaTableName
if
(select
count([Status])
from @TTName
where [Status]
= 0)
= 0
break
end -
Synonym required to query custom tables from Oracle Apps database
When creating an Answers report that queries from a table owned by a custom schema (not APPS), I cannot query the table and get error. Once I add a Synonym for APPS on this table, then OBIEE works normally.
Since OBIEE is logging in as the APPS user, are Synonyms required for all non-APPS tables/views or is there another feature of the Administrator where it can store the table alias (our typical owner of custom tables is XXFI)?OK, well "compare" can mean one of two things: Compare structure or compare contents. Here is a quick script to compare column structures of two tables on one database:
(select COLUMN_NAME,
DATA_TYPE,
DATA_LENGTH,
DATA_PRECISION,
DATA_SCALE,
NULLABLE
from dba_Tab_columns
where owner=:OWNR1
and table_name = :tablename
minus
select COLUMN_NAME,
DATA_TYPE,
DATA_LENGTH,
DATA_PRECISION,
DATA_SCALE,
NULLABLE
from dba_Tab_columns
where owner=:ownr2
and table_name = :tablename)
union all
(select COLUMN_NAME,
DATA_TYPE,
DATA_LENGTH,
DATA_PRECISION,
DATA_SCALE,
NULLABLE
from dba_Tab_columns
where owner=:ownr2
and table_name = :tablename
minus
select COLUMN_NAME,
DATA_TYPE,
DATA_LENGTH,
DATA_PRECISION,
DATA_SCALE,
NULLABLE
from dba_Tab_columns
where owner=:ownr1
and table_name = :tablename)
If this query returns any rows, then these indicate that there are structural differences between the tables. We do a minus in both directions to ensure that an additional column in either schema will be returned in the query.
If you are going across dblinks to remote tables then you have to amend the "dba_tab_columns" to "sys.dba_tab_columns@yourdblink"
If you also want to compare indexes, triggers, etc then do the same sort of thing for the associated dba_ views for those objects.
And if you want to compare table contents, then often the fastest way is also to check minuses in both directions, if the tables are not too big:
e.g.
(select * from schema1.table@dblink1
minus
select * from schema2.table@dblink2)
union all
(select * from schema2.table@dblink2
minus
select * from schema1.table@dblink1)
local tables, of course, simply omit the "@dblink" issues.
There are tools to help in such things. TOAD, for example, has a pretty good schema comparison tool, and there are plenty of other options out there. But if you need to script this yourself then the logic I've shown is a good starting point.
Cheers,
Mike -
How to transfer the tables from one file group to another file group in SQL 2008.?
Hello all,
I have few issues regarding the transfer of the tables from one file group to another file group in SQL 2008 and also How can we backup
and restore the particular database based on file group level.
Let’s say I have a tables stored within the different FG. such as
Tables
File group
Dimension tables
Primary
Fact tables
FG1
FG2…
zzz_tables
DEFAULT_FG
dim.table1 DEFAULT_FG
dim.table2 DEFAULT_FG
Here all I want to transfer the dim.table1 ,dim.table2 from DEFAULT_FG to the Primary File
group .So is there simple methods for transfer the dim.table1,2 from one FG to another .I have tried somewhat but I couldn’t get the exact way .So if someone have better idea please share your knowledge that would be really appreciated.
Secondly after moving those dim.table1 ,dim.table2 from DEFAULT_FG to Primary ,All I want to backup and restore the database only containing the Primary and FG1,FG2… not
a DEFAULT_FG.Is it possible or not.?
Hope to hear from the one who knows better approach for this kind of task .Your simple help will be much appreciated.
Regards,
Anil MaharjanWell after all my full day research on this topic had paid off, I finally got the solution and am so happy to research on these things. It makes
us feel really happy after all our research and hard work doesn't goes as waste.
Finally I got what I am looking for and want to make sure that I am able to transfer the tables from DEFAULT_FG to another FG without tables
having clustered index on that tables .
With the help of the link below I finally got my solution where Roberto’s coded store procedure simply works for this.
Really thanks to him for his great post and thanks to all for your response and your valuable time.
http://gallery.technet.microsoft.com/scriptcenter/c1da9334-2885-468c-a374-775da60f256f
Regards,
Anil Maharjan -
Error in importing the tables from database
HI ,
while importing the table from the metada by using OCI call 10g/11g i am getting the below exception:
*"Some objects are not imported because of invalid names : (DESCRIPTION =(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)))"*
i am getting this exception after selecting the objects which i want to import from the database.....it first imports the tables and the throws the above exception and then removies from the repository view.
How can i get this resolved???Hi,
I'm also hitting this problem, did anyone solve this, I'm not able to import any data to the repository, error message is: -
*"Some objects are not imported because of invalid names"*
Thanks,
Mike -
How to transport the data contains in the table from development to product
How to transport the data contains in the table from development to production.
Please let me know ASAP.Hello Dilip
Create a workbench request and add the following entries to the request:
Object key: R3TR TABU <name of z-table>
For this object add the following value key:
- client-independent table: '*'
- client-dependent table (e.g. client 100): '100*'
See also: [SAP Network Blog: Transport Table Entries|/people/community.user/blog/2007/01/07/transport-table-entries]
Regards
Uwe -
How can query the table MARD using the parameters
Hi,
I have inputs as material number , sales organization , distribution chanel and plant , using this i have query the table MARD . in MARD table material number and plant is available , how can i relate sales organization and distribution chanel to query the table, please help.
Regards,
RatheeshHi,
MVKE table contains the relationship between material, sales org. and distribution channel.
You can hence create a join between MARD and MVKE tables and create a query.
Regards,
Aditya -
Insert Multiple rows into the table from that table data
Hi All,
I have a requirement like to insert mulitple rows into the table from that table data only(I need to replicate the data).
In this table primary key is composite primary key with all foreign keys.primary key also including the Date foreign key.I need to change that date at the of insertion.
INSERT
INTO myschema.Fact_page_performance
time_sk ,
batch_id ,
delta_msec ,
delta_user_msec,
error_code_sk ,
content_errs ,
element_count ,
page_bytes ,
Available ,
date_sk
VALUES
(SELECT time_sk ,
batch_id ,
delta_msec ,
delta_user_msec,
error_code_sk ,
content_errs ,
element_count ,
page_bytes ,
Available
FROM myschema.FACT_PAGE_PERFORMANCE_BACKUP
WHERE date_sk=20090509,20090510
But it is giving the error like missing Expression.
Could anyone please help to me.
Thanks and Regards
Swetha.You can have either VALUES or SELECT not both
INSERT
INTO myschema.Fact_page_performance
time_sk ,
batch_id ,
delta_msec ,
delta_user_msec,
error_code_sk ,
content_errs ,
element_count ,
page_bytes ,
Available ,
date_sk
SELECT time_sk ,
batch_id ,
delta_msec ,
delta_user_msec,
error_code_sk ,
content_errs ,
element_count ,
page_bytes ,
Available
FROM myschema.FACT_PAGE_PERFORMANCE_BACKUP
WHERE date_sk=20090509,20090510; -
Need To Create a table in Sql Server and do some culculation into the table from Oracle and Sql
Hello All,
I'm moving a data from Oracle to Sql Server with ETL (80 tables with data) and i want to track the number of records that i moving on the daily basis , so i need to create a table in SQL Server, wilth 4 columns , Table name, OracleRowsCount, SqlRowCount,
and Diff(OracleRowsCount - SqlRowCount) that will tell me the each table how many rows i have in Oracle, how many rows i have in SQL after ETL load, and different between them, something like that:
Table Name OracleRowsCount SqlRowCount Diff
Customer 150 150
0
Sales 2000 1998
2
Devisions 5 5
0
(I can add alot of SQL Tasks and variables per each table but it not seems logicly to do that, i tryid to find a way to deal with that in vb but i didn't find)
What the simplest way to do it ?
Thank you
Best Regards
DanielHi Daniel,
According to your description, what you want is an indicator to show whether all the rows are inserted to the destination table. To achieve your goal, you can add a Row Count Transformation following the OLE DB Destination, and redirect bad rows to the Row
Count Transformation. This way, we can get the count of the bad rows without redirecting these rows. Since the row count value is stored in a variable, we can create another string type variable to retrieve the row count value from the variable used by the
Row Count Transformation, and then use a Send Mail Task to send the row count value in an email message body. You can also insert the row count value to the SQL Server table through Execute SQL Task. Then, you can check whether bad rows were generated in the
package by querying this table.
Regards,
Mike Yin
TechNet Community Support -
Error while importing the tables from MySQL using the data source connection
Hi,
I am trying to import tables from MySQL into Powerpivot using the data source connection, if use the import using the Query option its working fine but not with the select list of table option.
when i click on the select list of tables option, i get the below error after selecting all the tables to be imported:
OLE DB or ODBC error.
An error occurred while processing table 'XXXXXXXXXX'.
The current operation was cancelled because another operation in the transaction failed.Hi Bharat17an,
Please provide the detail information when create the MySQL connection in your PowerPivot model. Here is a good article regarding "how to Use MySQL and Microsoft PowerPivot Together" for your reference, please see:
http://www.datamensional.com/2011/09/how-to-use-mysql-and-microsoft-powerpivot-together-2/
If this issue still persists, please help to collection windows event log information. It maybe helpful for us to troubleshoot this issue.
Regards,
Elvis Long
TechNet Community Support -
Query DB2 tables from oracle using normal view
This is with regard to querying db2 tables using oracle views. The view is created using dblink. The querying is not an one time activity.querying will be done once in a day. Can i use normal view (will it work ) or should i use materialised view. will i be able to view the added records in db2 table using normal view?
thanks,
vinodhVinodh2 wrote:
This is with regard to querying db2 tables using oracle views. The view is created using dblink. The querying is not an one time activity.querying will be done once in a day. Can i use normal view (will it work ) or should i use materialised view. will i be able to view the added records in db2 table using normal view?How can the SQL select statement via a dblink not work for a view, but the same SQL select statement work for a materialised view?
Do you think the database link or remote database care whether the select SQL that hits it, comes from a PL/SQL procedure, a view, a materialised view, a job or whatever else? It has no idea what/who is behind that select SQL - and nor does it care.
As for the benefits of a view vs. a materialised view - that depends on the requirements for needing to use that foreign database's data in the local database. -
Query builder: tables from Database Link
Hi APEX people,
Is there a way to use tables from a (remote) Database Link in the Query Builder?
In the Query Builder I seem to have only access to locally (schema) stored tables.
I already tried to define a Synonym for the remote tables I wanted to use, but that didn't work either.
Thanks in advance.
MauriceHi,
First of all, can you select from them ie
SELECT *
FROM my_table@my_linkAlso you can't see them as tables in the schema because they're not tables in the schema.
Try creating a view like...
CREATE OR REPLACE FORCE VIEW m_table_vw AS
SELECT *
FROM my_table@my_link;You should be able to see the view in the schema in the query builder and use that.
Cheers
Ben -
Querying Nested Tables from BO
Hi,
I have a nested table [VA_GT_HC_ASIA_SGP ] in Oracle. The Inner Object in the nested table has got 4 columns, which has to be displayed in the WebI Report.
Hece I created the table as derived table in Universe by the below query.
select a.COL1, b.COL2, b.COL3, b.COL4, b.COL5 from VA_GT_HC_ASIA_SGP a, Table(a.OB_GT_HC_MAINT_INFO) b
But performance is very slow. Please advice if there exists a better way to do this.
Best Regards,
AnuThe Query is:-SELECT A.ID, A.NAME, A.COMB, B.C1,B.C2, B.C3 FROM NT_KFD_RFT_TEST_DATE A, TABLE(OB_KFD_RFT_DATA) B
Nested Table structure Example:-
ID NAME COMB OB_KFD_RFT_DATA
01 TEST ALL
The inner table (OB_KFD_RFT_DATA) structure is
C1 C2 C3
23.5 56.7 78.9
00.9 76.9 53.3
12.4 33.4 23.2
Here outer record is 01 TEST ALL, and inner record is the 3 row decimal numbers.
In Universe, I need to create Objects from C1, C2, C3 columns.
Currently i'm doing it with derived table (by running above query). Is there any other option to do it?
Thanks,
Anu
Maybe you are looking for
-
How do you change the number of processes in XE
Processes are set to 40 in XE, how do i change this?
-
Hi folks, I have one create page in that i need to take one image and i need to save it in data base how can i achive that can any one help it svery urgent for me
-
Ordered my iPhone 6 64gb Silver
Ordered my iPhone 6 64gb Silver on10/10/2014. My estimated shipping date is 10/24/2014. I still have no updates on when my phone is going to be shipped or when I might receive it. They say that you'll receive tracking info about 2 days before it actu
-
Rollover on dock displays a gray screen
Since I installed OS Mountain Lion on a new iMac when I rollover with mouse on dock all screen turns gray and dock disappear and appear again, I tried restarting dock to factory settings but It doesn't work.
-
hi, i would like to seek advice on below. 1) when say post statistically, like "A profit center is always posted to statistically", it means no FI accounting document generated? so statistical means no fi accounting document generated? 2) profit segm