Deafaul Value using SQL query
Hi
I'm trying to make a default value using Computations;
when I create computation,
I select
Computation item: PXX_TEST
computation type: SQL query
computation Point: I tried all
Computation: select X FROM Y WHERE X= '1'
This is the way to get Default Value ??
I need to display the value when the page is open
Thanks
MM
MM,
You can use the default value attribute of the item to set a value if the item's source produces a null. A computation (before/after header) can work too, but it's possible that the item source and Source Used attribute (Always/Only) are interfering with your computation so you might want to try setting Source Used to 'Only...' if you have a computation setting the item.
Scott
Similar Messages
-
Viewing blob datatype value using sql query
How can i view the text stored in a column of data type blob.
Thanks.using pl/sql developer sql window i want to see the result.Is there any way of converting blob type to varchar type
-
How to read repeated tag values using sql query
Database version
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE 11.2.0.2.0 Production
TNS for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
Question
How to get repeated tag values?
<TXLife>
<TXLifeRequest>
<TransRefGUID>10bc80e7d60e59b0:a134d0:10d7c4674ad:-7ffd</TransRefGUID>
<TransType tc="1203">OLI_TRANS_TRNHLD</TransType>
<TransExeDate>2011-02-27</TransExeDate>
<TransExeTime>15:06:35</TransExeTime>
<InquiryLevel tc="3">OLI_INQUIRY_OBJRELOBJ</InquiryLevel>
<InquiryView>
<InquiryViewCode>PLANUPDATE_CHBM_1203A</InquiryViewCode>
</InquiryView>
<OLifE>
<SourceInfo>
<SourceInfoName>CHBM Admin Tool</SourceInfoName>
</SourceInfo>
<Activity id="Activity1" HoldingID="Holding1">
<UserCode>User123</UserCode>
<LastUpdate>2011-02-27</LastUpdate>
<ActivityCode>CHBM10001</ActivityCode>
<OLifEExtension VendorCode="0098" ExtensionCode="Activity">
<ActivityExtension>
<SubActivityCode>CHBM20002</SubActivityCode>
<LastUpdateTime>15:06:35</LastUpdateTime>
</ActivityExtension>
</OLifEExtension>
</Activity>
<Holding id="Holding1">
<HoldingTypeCode tc="6">Group Master Contract</HoldingTypeCode>
<Purpose tc="36">Business Protection and Preservation</Purpose>
<Policy>
<CarrierAdminSystem>CHBM</CarrierAdminSystem>
<PolNumber>CHB0001234</PolNumber>
<OLifEExtension VendorCode="0098" ExtensionCode="Policy">
<PolicyExtension>
<BillingDetail>
<PaymentMode tc="3">Quarterly</PaymentMode>
<BillingOrder tc="1009800002">Employee ID</BillingOrder>
</BillingDetail>
<SalaryAllotment>12354333</SalaryAllotment>
</PolicyExtension>
</OLifEExtension>
</Policy>
<Attachment id="Attach1">
<DateCreated>2011-02-27</DateCreated>
<UserCode>System</UserCode>
<AttachmentBasicType tc="1">Text</AttachmentBasicType>
<Description>Event 4</Description>
<AttachmentData>Event Log</AttachmentData>
<AttachmentType tc="1009800001">Transaction Log</AttachmentType>
<AttachmentLocation tc="1">Inline</AttachmentLocation>
<OLifEExtension VendorCode="0098" ExtensionCode="Attachment">
<AttachmentExtension>
<Sequence>2</Sequence>
<CreationTime>16:05:45</CreationTime>
</AttachmentExtension>
</OLifEExtension>
</Attachment>
<Attachment id="Attach2">
<DateCreated>2011-02-27</DateCreated>
<UserCode>System</UserCode>
<AttachmentBasicType tc="1">Text</AttachmentBasicType>
<Description>Event 3</Description>
<AttachmentData>Event Log</AttachmentData>
<AttachmentType tc="1009800001">Transaction Log</AttachmentType>
<AttachmentLocation tc="1">Inline</AttachmentLocation>
<OLifEExtension VendorCode="0098" ExtensionCode="Attachment">
<AttachmentExtension>
<Sequence>1</Sequence>
<CreationTime>16:01:54</CreationTime>
</AttachmentExtension>
</OLifEExtension>
</Attachment>
<Attachment id="Attach3">
<DateCreated>2011-02-27</DateCreated>
<UserCode>P62350</UserCode>
<AttachmentBasicType tc="1">Text</AttachmentBasicType>
<Description>Note 2</Description>
<AttachmentData>Enter notes on changes or edits to plan</AttachmentData>
<AttachmentType tc="14">Note</AttachmentType>
<AttachmentLocation tc="1">Inline</AttachmentLocation>
<OLifEExtension VendorCode="0098" ExtensionCode="Attachment">
<AttachmentExtension>
<Sequence>2</Sequence>
<CreationTime>16:02:23</CreationTime>
</AttachmentExtension>
</OLifEExtension>
</Attachment>
</Holding>
</OLifE>
</TXLifeRequest>
</TXLife>
Expected output shoulb be like this
Description AttachmentType AttachmentData
Event 4 Transaction Log Event Log
Event 3 Transaction Log Event Log
Note 2 Note Enter notes on changes or edits to plan
Please help me any one on this
Edited by: LRAJESH on Apr 20, 2011 8:27 AMSELECT
t2. Description des,
t2.AttachmentType attty,
t2.DateCreated DateCreated,
t2.UserCode UserCode,
t1.Planid Planid,
t2.createdtime,
t1.Ausercode Ausercode
FROM (
SELECT xData doc
FROM dual
) temp_table,
XMLTable ( '/TXLife/TXLifeRequest/OLifE' passing doc
COLUMNS
Planid varchar2(20) path 'Holding/Policy/PolNumber',
AttachmentType xmltype path 'Holding//Attachment' ,
Ausercode varchar2(20) path 'Activity/UserCode'
) t1,
XMLTable
'/Attachment'
passing t1.AttachmentType
columns
Description varchar2(1000) path 'Description',
AttachmentType varchar2(1000) path 'AttachmentType/@tc',
DateCreated varchar2(20) path 'DateCreated',
createdtime varchar2(20) path 'OLifEExtension/AttachmentExtension/CreationTime',
UserCode varchar2(200) path 'UserCode'
) t2 -
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 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 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 -
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 -
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
-
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? -
Default form value using sql with bind variable
I wish to create a form based upon a table with a foreign key. I wish to add a field to the form that is an uneditable text field with a default value using sql of 'select name from other_table where other_table_id = ?' where ? is a bind variable defined by a hidden field which is the value of the foreign key identified at runtime. How can this be done?
nullI don't think that will work. I have multiple people accessing the Portal at the same time with the same login (or lack of as public will be the most common user). I could set it easily enough as the value is passed to the form by a link object, so I could add it to the before page plsql block and set the value. But I am uncertain how it will behave in a multi-user mutlitasking environment.
Maybe I should describe what I am looking to accomplish. I want to create a display above a form that will list static details from other tables (i.e. when editing a user's phone number, which is in one table, you want the user to see the person's name, which is in another table, and the form is based upon the phone table) ...
Just as I am thinking about it, I thought of an idea. I could put some specific code in the before displaying page plsql section to query the database and use htp to output the information for data not in the table the form is based upon. I will try this and see how it works. It would have been nice to have just created a field that is not editable and had a default value, but this should work as well.
Let me know if you see any problem with this or if you have any better suggestions.
Thanks for the fast response. -
ReportViewer using SQL Query error states: Incorrect syntax near ','.
Hello Community
Using Visual Studio 2008 and SQL Server 2008 I created a Windows Application
that uses SQL Server Reporting Services. The application uses ReportViewer and
calls a method written using SQL query.
1-First I created the form.
2-Next I dragged the ReportViewer (Toolbox) and Table (from DataSource) onto the form.
The problem is that when it reaches the last line of the SQL query (ie, da.Fill(ds, "TableOne");)
the code fails stating the error message:
"Incorrect syntax near ','."
The following is the code behind the form containing the query:
private void ReportPgm1_Load(object sender, EventArgs e)
// TODO: This line of code loads data into the 'ReportDBDataSet.TableOne' table. You can move, or remove it, as needed.
this.TableOneTableAdapter.Fill(this.ReportDBDataSet.TableOne);
reportViewer1.ProcessingMode = ProcessingMode.Local;
LocalReport ReportOneLocalReport = reportViewer1.LocalReport;
DataSet ds = new DataSet("ReportDBDataSet.TableOne");
pgmReportOne(FromDate, ToDate, ds);
ReportDataSource ds = new ReportDataSource("ReportDBDataSet.TableOne");
ds.Value = dataset.Tables["TableOne"];
ReportOneLocalReport.DataSources.Clear();
ReportOneLocalReport.DataSources.Add(ds);
this.reportViewer1.RefreshReport();
private void pgmReportOne(DateTime FromDate, DateTime ToDate, DataSet ds)
SqlConnection connection = new SqlConnection("Data Source=ReportDBServer;Initial Catalog=ReportDB;Uid=sa;pwd=Password");
string sqlReportOne = "Select ([InDate], [FirstName], [LastName], [AGe]" +
"from TableOne";
SqlCommand command = new SqlCommand(sqlReportONe, connection);
command.Parameters.Add(new SqlParameter("paramFDate", FromDate));
command.Parameters.Add(new SqlParameter("paramTDate", ToDate));
SqlDataAdapter da = new SqlDataAdapter(command);
da.Fill(ds, "TableOne");
Why does the last line throw an error?
Thank you
Shabeaut--NOTE: The statement below cannot be run on SQL Server 2012
--If you have an earlier version and can set the compatibility
--level to 80, it can be run.
SELECT sso.SpecialOfferID, Description, DiscountPct, ProductID
FROM Sales.SpecialOffer sso,
Sales.SpecialOfferProduct ssop
WHERE sso.SpecialOfferID *= ssop.SpecialOfferID
AND sso.SpecialOfferID != 1
Hi Scott
The *= is old syntax and not compatible with SQL Server 2012 (as stated in the comments).
You could do something like this instead
SELECT sso.SpecialOfferID
,Description
,DiscountPct
,ProductID
FROM Sales.SpecialOffer sso
left outer join Sales.SpecialOfferProduct ssop on sso.SpecialOfferID = ssop.SpecialOfferID
WHERE sso.SpecialOfferID != 1 -
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] -
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
Maybe you are looking for
-
How do I get an external hard drive to mount?
I have two Maxtor One Touch 4 Plus External Hard Drives. One works the other doesn't. The one that works is over a year old and has been a trusty loyal aid. The one that doesn't is only a couple of weeks old. It worked fine initially. Now no icon app
-
ITunes 10. Moved m4a files from ext harddrive to my new laptop
I had an older laptop with an external harddrive storing my music. That laptop since died and was repalced with a new one. looks like the files are m4a files on the harddrive. The iTunes 10 looks like it processes the files when I add that folder to
-
Can I find out who has opened a document in Sharepoint 2013 document library?
Is it possible to use PowerShell you find out who opened a certain document in a library in a users MySite? Or can I interrogate the audit logs? I also have Harepoint installed, but I don't know if this works to a MySite document level?
-
I have a form with combo boxes that is working fine inside of my movie. But, when I put the movie inside of it's parent movie via loadMovie function, the combo box no longer drops down? The rest of the form is working? Anyone out there that has exper
-
I have an older 30 gb classic ipod.Can the 3.5mm"jack" be replaced inside?
I have an older 30gb classic ipod. Can the "jack" sleeve inside be replaced or fixed? the prong connection inside has broke off and you need to push the jack to one side to get both sides of the earbuds to work. Thanks