Using SQL query directly in DI
Hi,
I have a five long SQL query that extracts columns from 2 tables based on conditions and creates 5 new tables with new columns. The query looks some thing like this:
select a.num_1, b.unid, c.tycod, min(b.csec) - min(a.csec) turnout into
#tab1
from un_hi a
left join un_hi b on a.num_1 = b.num_1
and ((a.unid = b.unid and left(b.unid,1) not in ('E','Q') and
left(a.unid,1) not in ('E','Q'))
or (right(a.unid,len(a.unid)-1) = right(b.unid,len(b.unid)-1)
and left(b.unid,1) in ('E','Q') and left(a.unid,1) in ('E','Q')))
and b.unit_status = 'ER'
left join aeven c on a.num_1 = c.num_1 and c.rev_num = 1
where a.num_1 like 'F011%' and a.unit_status in ('DP','XE')
group by a.num_1, b.unid, c.tycod;
Is there any way i can directly incorporate the above query in DI and run? The source file is excel sheet and output is SQL server.
Should i use the script in the work flow to execute the query?
Appreciate your inputs.
Thanks,
Arun
I am not sure if BODI can execute SQL directly from Excel sheet as source...
Though, you may try to create a File Format for your excel sheet (& multiple tabs), set it as source then use the Query Transform to apply your SQL?
As stated in the Designer Guide:
The Query transform can perform the following operations:
u2022 Choose (filter) the data to extract from sources
u2022 Join data from multiple sources
u2022 Map columns from input to output schemas
u2022 Perform transformations and functions on the data
u2022 Perform data nesting and unnesting
u2022 Add new columns, nested schemas, and function results to the output
schema
u2022 Assign primary keys to output columns
Hope this helps!
Similar Messages
-
Help Required -- Can we use SQL Query to READ data from SAP MDM Tables
Hi All,
Please help.........
Can we use SQL Query to READ(No Creation/Updation/Deletion just Read) Data from SAP MDM tables directly, without using MDM Syndicator.
Or direct SQL access to SAP MDM tables is not possible. Only through MDM Syndicator can we export data.
Thanks in Advance
RegardsAll the tables you create in Repository comes under A2i_CM_Tables in Database named as your repository name. So the tables names are fields of table A2i_CM_Tables. Now i tried it but cant make it.
Now, I dont think its possible to extract all fields in tables and there values using select query. May be pure sql guy can do that or not.
But there is no relation of data extraction and syndicator. Data is viewed in Data Manager. and you can also store data in a file from DM also.
BR,
Alok -
List of Project Permission in PS 2010 Using SQL query
Hi
Is there any way to get a list of Project permissions associated with user using sql query. If i go manually Project center --> select project plan --> project permission it would take lot of time to find out for each user
Regards
SantoshBefore you continue (which you probably will overlook) - please understand that you should only be querying the REPORTING database and not the published database. A recommendation is to use a select statement statement to insert the tables into a table
int the reporting database, then query that table for your results/report.
The following page I believe has what you're looking for (Users with direct permissions- query below)
and more
http://pmpspecialists.com/Blog/2013/10/
SELECT MSP_RESOURCES.RES_NAME AS Resourcename, CONV.CONV_STRING AS Permission, MSP_WEB_SECURITY_SP_CAT_PERMISSIONS.WSEC_DENY AS Denied,
MSP_WEB_SECURITY_SP_CAT_PERMISSIONS.WSEC_ALLOW AS Allowed
FROM MSP_WEB_SECURITY_SP_CAT_PERMISSIONS INNER JOIN
MSP_WEB_SECURITY_SP_CAT_RELATIONS ON
MSP_WEB_SECURITY_SP_CAT_PERMISSIONS.WSEC_REL_UID = MSP_WEB_SECURITY_SP_CAT_RELATIONS.WSEC_REL_UID INNER JOIN
MSP_WEB_SECURITY_FEATURES_ACTIONS ON
MSP_WEB_SECURITY_FEATURES_ACTIONS.WSEC_FEA_ACT_UID = MSP_WEB_SECURITY_SP_CAT_PERMISSIONS.WSEC_FEA_ACT_UID INNER JOIN
MSP_WEB_CONVERSIONS AS CONV ON CONV.CONV_VALUE = MSP_WEB_SECURITY_FEATURES_ACTIONS.WSEC_FEA_ACT_NAME_ID INNER JOIN
MSP_RESOURCES ON MSP_WEB_SECURITY_SP_CAT_RELATIONS.WSEC_SP_GUID = MSP_RESOURCES.RES_SECURITY_GUID
WHERE (CONV.LANG_ID = 1033)
ORDER BY Resourcename, Permission -
Retreving Hexadecimal Values from a table using SQL query.
Hi,
I'm looking for a query to retreive Hexadecimal values contained in a column using SQL query.
The column contains the values of all types, alphanumeric, numeric and hexadecimal.
I need to retreive only hexadecimal values.
any help to me in this regard will be appreciated.
ThanksPresumably, you can be sure that any valid hex value is indeed MEANT to BE a hex value. For example the value 'ACE' is meant to be a hexadecimal value and not the word.
-
How to get tax break up of TDS using SQL query ?
Hi all,
We are developing a TDS report using SQL query
Report will contain VendorCode,Date(ap inv date),Vendor name,
Bill value,TDS Amount,
Bill Value 100.000,
TDS (2%) - 2.000,
TDS Surcharge(10% on TDS) - 0.2,
TDS Cess(2%(TDS+TDS Surcharge)) - 0.044,
TDS HeCess(1%(TDS+TDS Surcharge)) - 0.022.
We have developed this report which displays upto
VendorCode,Date(ap inv date),Vendor name,
Bill value,TDS Amount.
How to show tax break up of TDS in SQL query ?
Thanks,
With regards,
Jeyakanthan.Hi gauraw,
Thank for your reply.
I modified the query , pasted the query
as below in query generator,
Select T0.DocNum,T0.DocDate,T0.CardCode as 'Ledger',T1.TaxbleAmnt As 'Bill value',T1.WTAmnt as 'TDSAmt',(TDSAmt * 0.1) as 'TDS_Surch',
(((TDSAmt0.1) + TDSAmt)0.02) as 'TDSCess',
(((TDSAmt0.1) + TDSAmt)0.01) as 'TDSHCess'
FROM OPCH T0 INNER JOIN PCH5 T1 ON T0.DocEntry = T1.AbsEntry
WHERE (T0.DocDate >= '[%0]' and T0.DocDate <= '[%1]')
on clicking execute its showing error message invalid column
name 'TDSAmt'.
With regards,
Jeyakanthan -
How to retrive the blob data from a table using sql query
Hi gurus,
I have a table which has " BLOB "content in a column .I want to view the data From BLOB column using sql query .It would be helpfull If some one share their idea.
Regards,
vardhani.You can use data templates.
See this: http://blogs.oracle.com/xmlpublisher/entry/blob_clob_raw_and_looooong
http://blogs.oracle.com/xmlpublisher/entry/inserting_blobs_into_your_repo
Thanks,
Bipuser -
How to use sql query in java ?
i don't know how to use sql query in java code.
who can give me some advice?
thankshttp://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/
-
hi i am face with problem that is i want to show the how much approximate space required for backup or .bak file to get backup using sql query because i want to show the required memory for backup file on my java application
Hi FIROZ
TENNALI
Is this still an issue, or can we close the thread?
* closing a thread by marking the answer/s (there is a link beneath each response) and you can vote for useful responses as well (there is a link to vote on the left of each response)
Ronen Ariely
[Personal Site] [Blog] [Facebook] -
How to Use SQL Query having IN Clause With DB Adapter
Hi,
I am using 11.1.1.5 want to find out how to Use SQL Query having IN Clause With DB Adapter. I want to pass the IN values dynamically. Any ideas.
Thanksinvoke a stored procedure, it's safer than trying to put together an arbitrary SQL statement in the JCA adapter
-
Using SQL query on user defined table
Hi all,
i'am currently working on a project which use user defined table and i would like to know if sap allow us to do insertion/deletion/update on those table using sql query or if we have to use the DI only?
thanks
Best regards,Hi,
Definitely you can insert in UDT. You can update but you cant change the Code field after added the rest of the field
can be updated. You cant delete in UDT but you cant delete anytime in SQL Management Studio.
THanks.
CLint -
How to numberformat when using sql:query alogn with c:forEach JSTL tags
Is there anyway to format the numeric values returned from the database when using <sql:query> alogn with <c:forEach> tags
Here is my jsp code
<sql:query..../>
<c:forEach var="row" items="${queryResults.rows}">
<tr>
<td><c:out value="${row.COL1}" /></td>
<td><c:out value="${row.COL2}" /></td>
</tr>
</c:forEach>
Col1 values are numeric without any formats Eg: 1000, 10000, 1000000 etc.
how can i format them to 1,000 , 10,1000 , 100,000 etcIt is polite to mention what your answer was. These posts are not just here for you to ask questions, but to be used as a resource for other people to find answers. Saying "I solved it" with no details helps noone.
I presume you discovered the JSTL <fmt:formatNumber> tag? -
How to show the VALUE as the Column Header using SQL query?
Hi
I have a requirement to show the picked value as the column header using SQL query.
Example:
======
SELECT EMPNO FROM EMP
WHERE EMPNO=7934;
Result Should be:
7934
7934I have a requirement to show the picked value as the column header using SQL query.In sql*plus you can do
SQL> set verify on
SQL> def e = 7934
old: SELECT empno "&&e" FROM emp WHERE empno = &&e
new: SELECT empno "7934" FROM emp WHERE empno = 7934
SQL> SELECT empno "7934" FROM emp WHERE empno = 7934
7934
7934
1 row selected. -
How to backup database using sql query?
Hello,i'm student, i'm researching oracle database,i want to backup database that using sql query (like backup query in SQL SERVER) ,how to do that ??
Thank!No, database backups cannot be done from within the database.
Commands for backups are outside of the database.
See the "2 Day DBA Guide" http://download.oracle.com/docs/cd/E11882_01/server.112/e10897/toc.htm
and the "Backup and Recovery Users's (actually Adminsitrator's) Guide : http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/toc.htm
Hemant K Chitale -
Information about constraints by using SQL query?
Hi
how can we view all the definition of a constraint by using SQL query.
Suppose I create following tables:
CREATE TABLE supplier
( supplier_id numeric(10) not null,
supplier_name varchar2(50) not null,
contact_name varchar2(50),
CONSTRAINT supplier_pk PRIMARY KEY (supplier_id, supplier_name)
CREATE TABLE products
( product_id numeric(10) not null,
supplier_id numeric(10) not null,
supplier_name varchar2(50) not null,
CONSTRAINT fk_supplier_comp
FOREIGN KEY (supplier_id, supplier_name)
REFERENCES supplier(supplier_id, supplier_name)
ON DELETE CASCADE
e.g. CONSTRAINT fk_supplier_comp: Plz write me the SQL query that tells that this is a FOREIGN KEY (supplier_id, supplier_name) and REFERENCES supplier(supplier_id, supplier_name) .....etc.
thanksYou mean "What is an Oracle Metalink?"
Then, Oracle Metalink (www.metalink.oracle.com) is an official web site of Oracle Corporation. This is the area where you can get an ultimate and immediate fixes for any sort of Oracle/Issues/Problems. And also, Patches/fixes/Notes/Procedures can be used as reference and can be downloaded from this.
Note: Sharing of Oracle Metalink information/credentials is highly illegal act.
Fore more information and benefits on Oracle Metalink, please take a look at the below URL.
http://www.oracle.com/support/premier/metalink.html
Regards,
Sabdar Syed. -
How to get this output using sql query?
Hi,
How to get this output using sql query?
Sno Name Age ADD Result
1 Anil 23 delhi Pass
2 Shruti 25 bangalor Pass
3 Arun 21 delhi fail
4 Sonu 23 pune Pass
5 Roji 26 hydrabad fail
6 Anil 28 delhi pass
Output
Sno Name Age ADD Result
1 Anil 23 delhi pass
28 delhi passHi Vamshi,
Your query is not pretty clear.
write the select query using Name = 'ANIL' in where condition and display the ouput using Control-break statements.
Regards,
Kannan
Maybe you are looking for
-
I have installed the new version 13, called Aurora. I am currently using it, but if I start not liking the new features (so far I do! But I have to ask) can I "go back" to the "good old" Firefox 11? Will I be loosing my data and settings? History and
-
Sender File Adapter missing processing parameters
Hi All, On my Dev box in ID for configurations of Sender File adapter I am able to see the following options: 1) Handling of Empty Files 2) Archive Source Files with Errors But I am unable to see them on QA box.What could be the error.
-
Modify Contents of DW Document
Hey I just want to know if this is possible at this point. I want a button the user can click and it will do a global find and replace on their current opened DW document. I try doing this and everytime it tells me I cannot modify the document. Says
-
Hey everyone. I have a Logitech USB webcam that I would like to use to acquire still images. I am using LV 8.2. All the posts I have read suggest using NI-IMAQ for USB Cameras. I have tried to install it, but it says "You must have Vision 7.1 or
-
Safari crashes every time we open it
Our Safari was fine until yesterday, but since then has been crashing every time we open it. Grateful for any advice on how to resolve this. Thanks! Madeline Process: Safari [736] Path: /Users/madelineroelofsma/Desktop/Safari.app/Contents/