How to copy tables between diff data source ?
if copy tables in same datasource, the problem is easy , just
CREATE TABLE DESTDB.TABLE as select * from SOURCEDB.TABLE
but in diff data source, such as copy access table to a non-exsit oracle table,
need to create the target table first . my problem is how to create the target table by source table structure. though the source table structure can be read out, but parse it and make the SQL statement to create the table is a tough job.
anyone have good idea ??
thanks.
You are explaining a huge topic in simple terms.
You are trying to do Database Migration from MS-Access to Oracle. It's not all that easy. But if you are restricting to creating few tables then, do a small exercise.
1. Use ResultSetMetaData to get the no of coluns and their data types.
2. Construct a create statement by using above information.
3. Then query the table1 for all the records and insert those records into created table.
Sudha
Similar Messages
-
How to find tables related to data sources
Hi...
Can anybody tell me how to fine Database tables related to Data source.
Ex: I have a data source 0fi_ap_3. How can i fine From which tables it is extracting the data.
Thanks & Regards
Pankaj AngraHi Pankaj,
This has already been discussed in the following forum links,.. they will be helpful...
Re: Find R/3 tables which are in the datasource
Tables associated with DataSource!
Find R/3 tables which are in the datasource
Hope this helps...
Thanks,
Raj -
R/3 tables for a data source
HI all,
How to find the R/3 tables for a perticular data sources..
like 2lis_13_vditm etc...
Thanks,
PoojaHi Pooja,
U can get the same from LBWE t-Code.. where for ur Extractor.. look at the Maintain Extractor Structure.
If u click that u wil get the Extract Structure.. where u can see the Communication Filed names which starts with MC<Table Name> - <Field Name>...... for every field in ur data source u can see the corresponding the table entry.
Or u can use the below link for more options:
How to find tables related to data sources
Thanks
Hope this helps -
Multiple transformation between one data source & Target
Hi ,
Is Multiple transformation between one data source & one Target possible.
If possible in which way?
Thanks,
Erickhello,
No it is not possible,
you can have different gorups
or
in case of Flat File datasource you can copy the datasource give it a different name and then create a new transformation.
not sure how this works on R/3
Regards
Nitin Bhatia -
For a function module how can I find its assigned data source name?
Hi BW Gurus,
If i know the data source name then the assigned fn. module/Table/Infoset I could find from RSO2. But for function module How do I know its assigned data source name?
Thanks a lot for the response.
Regards
VenHi Ram,
In SE16, enter the table name as ROOSOURCE and in contents choose field EXTRACTOR for selection and enter the name of the function module.
It will return the list of datasources where the function module has been used.
Best Regards,
Ankit Agrawal -
How to make search between two dates accept null not obligatory search proplem
Hi guys when i search record between two dates it works ok success but you must enter date from and dateto first to to make search
i will show what i need from this example
I need to search dynamic by 4 textbox
1-datefrom
2-dateto
3-EmployeeNo
4-EmployeeName
but search i need must be dynamic meaning
if i enter employee no only give me employee no found in database
if i enter employee name give me employees found with this name using like
if i enter all 4 text box null and enter button search get all data
but i have proplem in this query when i need to search by click search button
i must write date from and date to firstly then write employee no or employee name if i need to search
so that i need to search by employee no alone or employee name alone without using date from and date to
And if i search without using datefrom and dateto it give me message error 'string wasnot recognized as valid datetime"
my stored procedure and code as following :
ALTER proc [dbo].[CollectsearchData]
@StartDate datetime,
@EndDate datetime,
@EmployeeID NVARCHAR(50),
@EmployeeName nvarchar(50)
as
Begin
Declare @SQLQuery as nvarchar(2000)
SET @SQLQuery ='SELECT * from ViewEmployeeTest Where (1=1)'
If (@StartDate is not NULL)
Set @SQLQuery = @SQLQuery + ' And (joindate >= '''+ Cast(@StartDate as varchar(100))+''')'
If (@EndDate is not NULL)
Set @SQLQuery = @SQLQuery + ' And (joindate <= '''+ Cast(@EndDate as varchar(100))+''')'
If @EmployeeID <>''
Set @SQLQuery = @SQLQuery + 'And (EmployeeID = '+ @EmployeeID+') '
If @EmployeeName Is Not Null
Set @SQLQuery = @SQLQuery + ' AND (DriverName LIKE
''%'+@EmployeeName+'%'') '
Print @sqlQuery
Exec (@SQLQuery)
End
Function using
public DataTable SearchDataA(string ConnectionString,string EmployeeNo,string EmployeeName, DateTime StartDate, DateTime EndDate)
SqlConnection con = new SqlConnection(ConnectionString);
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "CollectsearchData";//work
cmd.Parameters.Add("@StartDate", SqlDbType.DateTime);
cmd.Parameters.Add("@EndDate", SqlDbType.DateTime);
cmd.Parameters.Add("@EmployeeID", SqlDbType.NVarChar, 50);
cmd.Parameters.Add("@EmployeeName", SqlDbType.NVarChar, 50);
cmd.Parameters["@StartDate"].Value = StartDate;
cmd.Parameters["@EndDate"].Value = EndDate;
cmd.Parameters["@EmployeeID"].Value = EmployeeNo;
cmd.Parameters["@EmployeeName"].Value = EmployeeName;
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
DataSet ds = new DataSet();
da.Fill(ds);
DataTable dt = ds.Tables[0];
return dt;
interface button search
try
CultureInfo ukCulture = new CultureInfo("en-GB");
FleetManagment.Fleet fleet = new FleetManagment.Fleet();
DataTable Table = fleet.SearchDataA("Data Source=" + value1 + ";Initial Catalog=" + value2 + ";User ID=" + value3 + ";Password=" + value4 + "",textBox3.Text,textBox4.Text, DateTime.Parse(textBox1.Text,
ukCulture.DateTimeFormat), Convert.ToDateTime(textBox2.Text, ukCulture.DateTimeFormat));
dataGridView1.DataSource = Table;
dataGridView1.Refresh();
catch (Exception ex)
MessageBox.Show(ex + "error");Yes, the below code should not be passed any value: (I am not sure of the syntax in .NET,Sorry)
--If startdate len is 0 - do not assign this value
cmd.Parameters["@StartDate"].Value = StartDate;
--If endate len is 0 - do not assign this value
cmd.Parameters["@EndDate"].Value = EndDate; -
HOW TO COPY STANDARDTEXT BETWEEN CLIENTS
Hi All,
HOW TO COPY STANDARDTEXT BETWEEN CLIENTS. I WANT TO COPY BETWEEN 200 TO 110 CLIENTS.
Thanks & Regards,
suman.Hi Suman,
Check below points.
2. goto se09 and create a new
customizing rqeuest.
3. after that
in the object list,
go in edit mode
and a new window will come
where u can add the objects(in table control)
4. there u put
program id = R3TR
object type = TEXT
object name = TEXT,YHRS_FNF_LTR,YHR1,E
where
YHRS_FNF_LTR = name of standard text
YHR1 = TEXT ID
E = english language
How To Transport STANDARD TEXTS??
Transporting standard text
Thanks
Ramakrishna -
How to caluclate tat between two dates of one timestamp field
Hi,
could some one help how to caluclate days between two dates of single timestamp filed and with this
query
Select * from m_activity_transaction where actn_opp_id in (
Select actn_opp_id from m_activity_transaction where ACTN_ACTV_ID = 218
Group by actn_opp_id
having count(*) > 1 ) and ACTN_ACTV_ID = 218
order by actn_performed_on
iam getting output is
ACTN_ID ACTN_OPP_ID ACTN_PERFORMED_ON
319415 95831 27-JAN-12 11.06.20.000000 AM
315249 95831 08-FEB-12 05.32.54.000000 PM
301927 103509 20-DEC-11 04.01.43.000000 PM
301458 103509 19-DEC-11 04.51.03.000000 PM
294841 115840 10-JAN-12 03.20.12.000000 PM
312062 115840 11-JAN-12 05.17.06.000000 PM
and i nedd to caluclate no.of days between two dates like 27-JAN-12 11.06.20.000000 AM and 08-FEB-12 05.32.54.000000 PM where actn_id is unique AND ACTN_OPP_ID IS NOT UNIQUE.
Thanks in Advance,
vvr.This way?
with data as
select 315249 a, 95831 b, to_timestamp('27-JAN-12 11.06.20.000000 AM', 'DD-MON-RR HH.MI.SS.FF6 AM') dt from dual union all
select 319415, 95831, to_timestamp('08-FEB-12 05.32.54.000000 PM', 'DD-MON-RR HH.MI.SS.FF6 AM') from dual union all
select 301927, 103509 , to_timestamp('20-DEC-11 04.51.03.000000 PM', 'DD-MON-RR HH.MI.SS.FF6 AM') from dual union all
select 301458 , 103509 , to_timestamp('19-DEC-11 04.01.43.000000 PM', 'DD-MON-RR HH.MI.SS.FF6 AM') from dual union all
select 363810 , 144656 , to_timestamp('27-JUN-12 12.43.28.000000 PM', 'DD-MON-RR HH.MI.SS.FF6 AM') from dual union all
select 363500 , 144656 , to_timestamp('26-JUN-12 11.41.50.000000 AM', 'DD-MON-RR HH.MI.SS.FF6 AM') from dual union all
select 363354 , 144656 , to_timestamp('25-JUN-12 12.41.13.000000 PM', 'DD-MON-RR HH.MI.SS.FF6 AM') from dual
select a, b, diff
from (
select a, b, extract( day from (dt - lag(dt) over (partition by b order by dt, a)) ) diff
from data
) tab
where tab.diff is not null;
A B DIFF
319415 95831 12
301927 103509 1
363500 144656 0
363810 144656 1 -
Web Analysis : populate the same table with multiple data sources
Hi folks,
I would like to know if it is possible to populate a table with multiple data sources.
For instance, I'd like to create a table with 3 columns : Entity, Customer and AvgCostPerCust.
Entity and Customer come from one Essbase, AvgCostPerCust comes from HFM.
The objective is to get a calculated member which is Customer * AvgCostPerCust.
Any ideas ?
Once again, thanks for your help.I would like to have the following output:
File 1 - Store 2 - Query A + Store 2 - Query B
File 2 - Store 4 - Query A + Store 4 - Query B
File 3 - Store 5 - Query A + Store 5 - Query B
the bursting level should be give at
File 1 - Store 2 - Query A + Store 2 - Query B
so the tag in the xml has to be split by common to these three rows.
since the data is coming from the diff query, and the data is not going to be under single tag.
you cannot burst it using concatenated data source.
But you can do it, using the datatemplate, and link the query and get the data for each file under a single query,
select distinct store_name from all-stores
select * from query1 where store name = :store_name === 1st query
select * from query2 where store name = :store_name === 2nd query
define the datastructure the way you wanted,
the xml will contain something like this
<stores>
<store> </store> - for store 2
<store> </store> - for store 3
<store> </store> - for store 4
<store> </store> - for store 5
<stores>
now you can burst it at store level. -
Copying tables between schema owners
In Timesten, can you copy tables across schemas/owners?
i.e. OWNER_A.TABLE_Y to OWNER_B.TABLE_Y
Where TABLE_Y has the same definition? Basically, I'd like to be able to backup one datastore and restore it in another datastore that has the same table definitions, but may have a different owner name.
Thanks,
LarryI'm not completely clear on exactly what you are looking to do. On one hand you ask about copying tables between schemas. This is easily done:
CREATE TABLE OWNER_B.TABLE_Y AS SELECT * FROM OWNER_A.TABLE_Y;
This only works for TimesTen tables that are not part of a cache group; specifically the source table can be part of a cache group but the target table cannot. if the target table is part of a cache group then you need to:
1. Create the cache group containing the target (cached) table.
2. INSERT INTO OWNER_B.TABLE_Y SELECT * FROM OWNER_A.TABLE_Y;
But then you mention backup and restore. Since TimesTen backup/retore (ttBackup/ttRestore) works at a physical level you cannot rename/copy tables as part of that. You might be able to use ttMigrate with the -rename oldOwner:newOwner option but there are some constraints around this (one being that PL/SQL cannot be enabled in the database).
Chris -
Underlying tables of a data source in r/3
Hi All,
Can anyone explain me where do I need to check to see from which (underlying) tables is the Data Source (Example: <b>2LIS_02_CGR</b> ) getting data from?
Urgent Please!!!
Thanks in advance...http://help.sap.com/saphelp_nw04/helpdata/en/ad/07383fdb800804e10000000a114084/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/77/5c27cf43b290408efe91148095d7ff/frameset.htm
Message was edited by:
KJ (Kamaljeet) -
SQL LOADER , EXTERNAL TABLE and ODBS DATA SOURCE
hello
Can any body help loading data from dbase file .dbt to an oracle 10g table.
I tried last day with SQL LOADER, EXTERNAL table , and ODBC data source.
Why all of these utilities still failing to solve my problem ?
Is there an efficient way to reach this goal ?
Thanks in advanceexport the dbase data file to text file,
then you have choice of using either sql loader or external table option to use.
regards -
How to copy Log text (with Date, Time stamp ) User IDfrom BP to Transaction
Hi Experts,
Can someone guide us how to copy Log text (with Date ,Time & User ID) fron Business partner (Prospect) to transactions by text detrmination procedure.
Regards,
Basavaraj Patilsave text
Fill out following parameters of SAVE_TEXT function module:
HEADER
TDOBJECT C 10 BUT000
TDNAME C 70 10 digit BP number
TDID C 4 Z001
TDSPRAS C 1 Language
INSERT = X
LINES
TDFORMAT TDLINE
|
|testtttttttttttttttttttttttt( Your text)
I would suggest you to use some other BAPI that would attach your text to BP than SAVE_TEXT.
If you still wanted to use SAVE_TEXT then first make sure how the TDNAME is generated. It depends on the text determination procedure. For examples, it can be guid of BP, GUID followed by date or time or else the BP number itself.
Just go to BP transaction, double click on the text pad, it will open you the SAP Script editor. Click on menu GOTO and select Header which will give you info about your TDID, TDOBJECT, TDNAME....
Hope this helps. -
Error while filling set up tables for 2LIS_11 data sources
hello All ,
I tried to fill setup tables for 2LIS_11 data sources in OLI7BW , but the job RMCVENUA is getting cancelled. below is the Job Log ,
Job started
Step 001 started (program RMCVNEUA, variant &0000000000005, )
Start of order processing
Error determining rate: foreign curr. local curr. INR date 10.09.2008 (doc. 1)
Job cancelled
Is there any setting required in R3 side before filling setup tables of SD ?
I am able to fill the setup tables for 2LIS_05 ( Notifications) successfully.
Regards ,
Amol Kulkarni
Edited by: Amol Kulkarni on Dec 4, 2008 3:59 AM
Edited by: Amol Kulkarni on Dec 4, 2008 4:00 AMHi,
one of the sales document currencies is not maintained properly in the system and therefore its failing.
you need to correct those documents before filling the set up tables.
Either you can chose the option fault document toleration limit to 1000...so that 1000 records wrong records can be tolerated or you have to crrect it first before filling up the set up tables.
This will generally happen in test systems.... but very rare in production...so try to maintain currrency again in the system.
generally you will see the sales doc number in the error for which its failing.
May be at the time of filling some óne was working on some sales document and tried it save it.
correct that doc and fill the set up tables again.
Thanks
Ajeet -
How can get difference between 2 dates in the form of days
how can get difference between 2 dates in the form of days
Hi,
Check the following program:
REPORT ZDATEDIFF.
DATA: EDAYS LIKE VTBBEWE-ATAGE,
EMONTHS LIKE VTBBEWE-ATAGE,
EYEARS LIKE VTBBEWE-ATAGE.
PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,
TODATE LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.
call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
exporting
i_date_from = FROMDATE
i_date_to = TODATE
I_FLG_SEPARATE = ' '
IMPORTING
E_DAYS = EDAYS
E_MONTHS = EMONTHS
E_YEARS = EYEARS.
WRITE:/ 'Difference in Days ', EDAYS.
WRITE:/ 'Difference in Months ', EMONTHS.
WRITE:/ 'Difference in Years ', EYEARS.
INITIALIZATION.
FROMDATE = SY-DATUM - 60.
Regards,
Bhaskar
Maybe you are looking for
-
I tried holding down both buttons like everyone said and this doesnt work. My phone was shipped new from Ontario to Sask and took about a week to get here,Could it be because my battery is so low? And shouldnt it power on when it's plugged in or show
-
Public ip behind modem/router - setup
I have been reading this forum's topics thoroughly over the past few days - very helpful advice from some of the top posters. However, I have a very basic question which is beginning to make me tear my hair out - how do I give the external NIC a publ
-
Using Time Capsule to store iTunes library
I use my 1 TB Time Capsule to store my iTunes library and point my iTunes to where it is stored in the Preferences/Advanced section of iTunes. However, iTunes often reverts to the old storage location on my MacBook Pro. Is there another folder or set
-
Using content from PSE's "Content Panel" in Photoshop CS5
I own a copy of both Photoshop CS5 and Photoshop Elements. Overall I use PS for everything though I am not a graphic designer and some of the content in PSE is very handy. Mainly the content in the "Content Panel" (see screenshot below) My question i
-
How can i download the Gotham font family fort AI?
How can i download the Gotham font family fort AI? I can not find Gotham in the Font Styles.