TestStand SQL reuest maximum of a column
Hello James,
Thank you very much for the reply.
I tried your suggestion, it's but unfortunatelly Teststand gives an error because it cannot properly manage the locals.max in the query.
But I tried others maybe your idea of using the key word "Sub":
First of all, I use:
The Open statement: SELECT MAX (myTAB.Col1) as myTAB MAXI
I don't know how teststand handles the "variable" MAXI.
But when I then add step
Action SQL: Get - retrieve the values of recording with as column/parameter values:
Name/number: "MAXI".
Values: Locals.Max
It works properly
Thank you very much
Ham
Tags: NI Software
Similar Questions
-
Maximum number of columns in model RTF Pivot
HI -.
For the model previously mentioned here matrix report problem with template RTF - text columns
I want to restrict the maximum number of columns per page, and the table should be repeated for the rest of the columns in another page.
For example, if there are 5 columns must be returned, I want the first 3 columns in the first page and the 2 others in a second page (with the hole repeating frame).
It's for keeping data legible printing of the pdf format, otherwise the data seems damaged and unreadable.
Y at - it ideas to achieve this requirement?
Best regards
Rupture of the horizontal column works fine in the attached version of the RTF model.
-
Write a SQL query with lines in columns
All the
I need help in writing a SQL query with lines in columns, let give u an example...
drop table activity;
CREATE TABLE 'ACTIVITY '.
(
"PROJECT_WID" NUMBER (22.0) NOT NULL,
VARCHAR2 (150 CHAR) "PROJECT_NO."
VARCHAR2 (800 CHAR) 'NAME '.
);
Insert in the ACTIVITY (PROJECT_WID, PROJECT_NO, NAME) values (1683691, '10007', 12-121');
Insert in the ACTIVITY (PROJECT_WID, PROJECT_NO, NAME) values (1684994, '10008', 12-122');
Insert in the ACTIVITY (PROJECT_WID, PROJECT_NO, NAME) values (1686296, '10009', 12-123');
Insert in the ACTIVITY (PROJECT_WID, PROJECT_NO, NAME) values (2225222, '9040', 12-124');
drop table lonet;
CREATE TABLE 'LONET.
(
VARCHAR2 (150 CHAR) "NAME."
NUMBER OF THE "ROOT."
VARCHAR2 (150 CHAR) "ENTRYVALUE".
);
INSERT INTO LONET (NAME, ROOT, ENTRYVALUE) VALUES ("GAC", 1683691, "LDE");
INSERT INTO LONET (NAME, ROOT, ENTRYVALUE) VALUES ('NAM', 1683691, 'LME');
INSERT INTO LONET (NAME, ROOT, ENTRYVALUE) VALUES ('BAG', 1683691, 'ICE');
INSERT INTO LONET (NAME, ROOT, ENTRYVALUE) VALUES ('PAP', 1683691, 'IKE');
INSERT INTO LONET (NAME, ROOT, ENTRYVALUE) VALUES ('NAM', 1686291, "QTY");
INSERT INTO LONET (NAME, ROOT, ENTRYVALUE) VALUES ('PAP', 1686291, 'MAX');
INSERT INTO LONET (NAME, ROOT, ENTRYVALUE) VALUES ("GAC", 1684994, "MTE");
INSERT INTO LONET (NAME, ROOT, ENTRYVALUE) VALUES ('PAP', 1684994, 'MAC');
INSERT INTO LONET (NAME, ROOT, ENTRYVALUE) VALUES ('FMT', 1684994, 'NICE');
INSERT INTO LONET (NAME, ROOT, ENTRYVALUE) VALUES ('FMR', 1684994, 'RAY');
INSERT INTO LONET (NAME, ROOT, ENTRYVALUE) VALUES ('BAG', 1686296, "CAQ");
INSERT INTO LONET (NAME, ROOT, ENTRYVALUE) VALUES ("PAP", 1686296, "QAQ");
INSERT INTO LONET (NAME, ROOT, ENTRYVALUE) VALUES ("VANESSA", 1686296, "THEW");
INSERT INTO LONET (NAME, ROOT, ENTRYVALUE) VALUES ("ANDR", 1686296, "REYL");
commit;
Link: activity.project_wid = lonet.root
look like output
Project_wid Project_no NAME GAC NAM BAG RAC 1683691 10007 12-121 LDE LME LCE LKE 1684994 10008 12-122 MTE null null MAC 1686296 10009 12-123 null null CAQ QAQ 2225222 9040 12-124 null null null null two problems, in that I am running
1. I dono how simply we can convert rows to columns
2. for root = 1683691, there are double NAM and RAC in lonet table... ideally these data should not be there, but since its here, we can take a MAX so that it returns a value
3. There are undesirables who should be ignored
Once again my thought process is that we join the activity and 4 alias table lonet.
ask for your help in this
Thank you
Hello
This is called pivoting.
Here's a way to do it:
WITH relevant_data AS
(
SELECT a.project_wid, a.project_no, b.SID
, l.name AS lonet_name, l.entryvalue
Activity one
LEFT OUTER JOIN lonet l.root = a.project_wid l
)
SELECT *.
OF relevant_data
PIVOT (MAX (entryvalue)
FOR lonet_name IN ("GAC" IN the gac
"NAM" AS nam
'BAG' IN the bag
"RAC" AS cars
)
)
ORDER BY project_wid
;
Output:
PROJECT_WID PROJECT_NO GAC NAM BAG RAC NAME
----------- ---------- ---------- ---------- ---------- ---------- ----------
1683691 12 - 10007 121 LDE LME LCE LKE
1684994 MAC MTE 10008 12-122
1686296 12 - 10009 123 QAC QAQ
2225222 9040 12 - 124
To learn more about swivel, see the FAQ in the Forum: Re: 4. How can I convert rows to columns?
Thanks for posting the CREATE TABLE and INSERT statements; It's very useful!
-
Function of loading data - maximum number of columns?
Hello
I was able to create a page with load data wizard. I used this wizard page before with no problems, but in this case specific I want to load a spreadsheet with a lot of columns (99 to be precise). When I run the page, download the spreadsheet in the appropriate table, but only the first 45 columns. The other 56 columns have null for all rows. In addition, there are 100 rows in the spreadsheet and it does not load them all (it charges 39).
Is there a limit to how many columns it can handle?
Also, when I re - download the same file, the results of loading data show that he inserted 0 rows, update of 100 lines, failed 0 zeros. However, there are still only a total of 39 rows in the table.
Thoughts?
SteveSteve wrote:
FYI, I understood why he was not load all 100 lines. Basically, I need to put two dependent columns in the definition of charge instead of one; It was see several rows in the spreadsheet and supposed that some were even record based on a single column. If this part is resolved...I still would like comments on the number of columns of load data wizard can handle, and if there is a way to manage more than 45.
The load data wizard can handle a maximum of 46 columns: + {message identifier: = 10107069} +.
-
Maximum number of columns in the generic report
What is the maximum number of columns in the generic report? I put it to 100, but the data that was displayed are always 60.
Thank you.Hello
It is 100.
Oops, I thought it was, it seems, this maximum has been removed now - see here
Maximum number of columns in the generic reportSee you soon
Ben
http://www.munkyben.WordPress.com
Don't forget to mark the answers useful or correct ;)Published by: Munky on August 28, 2009 11:16
Published by: Munky on August 28, 2009 11:17
-
IR - CubeQuery - no limit to the maximum number of columns or lines?
In IR query processing cube, is there a limit to the maximum number of columns or lines? If so, how?
When downloading of the results, are there limits to the maximum. lol the columns or lines as well?
All documentation on its limits?
Please help someone?Columns cannot be more than 256 upto Hyperion Interactive Reporting Studio 9.2.
No, there is no limit to the maximum number of rows. It depends on the memory and available space on your machine.
Please correct me if I'm wrong.
I hope this helps.
Kind regards
Manmohan Sharma
-
Rename tables and columns in sql running that accessing these columns in the table.
Hello
Using oracle 11.2.0.3
We want to rename columns, tables and work just a sql scripts for this.
If sqls who have access to those running long tables/columns for example reports what is happening
Existing sql running, will work perfectly in that picked up sql before table/colum rename or will they crash if tables/columns renamed during them.
scripts wil take a few seconds to run maximum
Thank you
The only other activity that would go on select is against these tables/columns. No etl isnert/update/delete etc wil, which happened during the name change.
Only possible activities are report instructions srunning select.
Tried to run a long selection and rename that select while that was going on and got no error on the test system.
This is because certain statements does not place locks on tables or lines, so even if a session is reading data, another session can make some ddl (or dml) manipulation.
In this situation (with only selects, no other dml queries), renaming can be done, but the question remains, what the application code?
If it refers to old column names after name change operation, is no good.
-
Reports and maximum size of columns in formula tank and placeholder
Hello
recently, I came across a restriction in the reports (10.1.0.2) regarding the use of the CHARIOT of the columns formulas: there is obviously a maximum length for CHAR columns formulas.
Now, the question is, what is it exactly? The online documentation is a bit obscure in this regard.
Any ideas?
(I managed to get TANK (4000) treated "successfully", but after that, I start to receive obscure error messages...)
I would be grateful,
see you soon,
Jens RettigThe book of Steven Feuerstein:
http://books.google.com/books?id=47WzweLc0uAC&pg=PA187&lpg=PA187&dq=pl+sql+char+max+length&source=bl&ots=UxHBuRbei-&sig=DVW8BxuTjQ0lCfoA47X6jUIXk1o&hl=en&ei=nn8NSvfaJaXuMquVrb8G&sa=X&oi=book_result&ct=result&resnum=1
-
Hello
I have a column with a long text on the database, and when I put this column on OBIEE response it appears not all of the text.
There is a maximum of characters for each column value?
Kind regards
I call the function inside a cast to varchar type and appeared all the characters
-
[SQL * Loader] ORA-01747 on column name 'INDEX '.
Hello
I use SQL * Loader to load the test data for the CSV files. I have a column whose name is "INDEX". SQL * Loader works very well under Linux (Red Hat 6 - Client Oracle 11.2.0.1.0) but I encounter ORA-01747 launch my Workstation Windows (Oracle Server 11.2.0.1.0).
For more information, I target the same instance (Red Hat 6 - Oracle Server 11.2.0.1.0).
You have an idea how to solve the problem (without renaming the column )?
Thanks for any help you can provide.
I finally find the solution surrounding the column name with double quotes ("") within the control file. Thank you to remember the format of "protector".
-
Hi all
I m that extends a view object to restrict the access of the task list.
When I click on the first time on lov torch his works very well and return values...
even if I am able to search also for the first time... If I change the search criteria and click OK again once I'm getting java.sql.SQLException: exception of type of invalid column... I didn't add the binding settings in the query...
below is the error stack...
oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: 27122 Houston: SQL error in the preparation of the statement. Statement: SELECT * FROM (SELECT vo. USER_NAME
vo. DISPLAY_NAME
vo. ORIG_SYSTEM
vo. EMAIL_ADDRESS
vo. ORIG_SYSTEM_ID
vo. ID_PARTITION
haou.name AS ORGANIZATION
pp.name AS POST
hla.location_code as LOCATION
Of
(SELECT WU.NAME AS USER_NAME,
WU. DISPLAY_NAME,
WDP. ORIG_SYSTEM,
WU. EMAIL_ADDRESS,
WU. ORIG_SYSTEM_ID,
WU. ID_PARTITION
WU WF_ROLE_LOV_VL,.
WDP WF_DIRECTORY_PARTITIONS
WHERE WU. ID_PARTITION = OF THE WDP. ID_PARTITION
AND: 1 <>"BY".
UNION ALL
SELECT WU.NAME AS USER_NAME,
WU. DISPLAY_NAME,
WU. ORIG_SYSTEM,
WU. EMAIL_ADDRESS,
WU. ORIG_SYSTEM_ID,
WU. ID_PARTITION
WU WF_ROLE_LOV_VL
WHERE WU. ORIG_SYSTEM = "BY".
AND WU. ID_PARTITION = 1
AND: 2 = "BY".
) vo
per_all_people_f ADP
per_all_people_f paaf_logper
per_all_assignments_f paaf1
fnd_user fu
hr_all_organization_units haou
per_positions pp
hr_locations_all hla
where 1 = 1
and fu.user_name = vo.user_name
and fu.employee_id = paaf.person_id
and paaf_logper.person_id = fnd_global.employee_id
and trunc (sysdate) BETWEEN paaf_logper.effective_start_date AND paaf_logper.effective_end_date
and trunc (sysdate) BETWEEN paaf.effective_start_date AND paaf.effective_end_date
AND trunc (sysdate) BETWEEN paaf1.effective_start_date AND paaf1.effective_end_date
and paaf.business_group_id = paaf_logper.business_group_id
and paaf.person_id = paaf1.person_id
and paaf1.primary_flag = 'Y '.
and paaf1. POSITION_ID = pp.position_id (+)
and paaf1.location_id = hla.location_id (+)
and paaf1.organization_id = haou.organization_id (+)
and decode ((select count (*) in the FND_LOOKUP_VALUES where lookup_type like 'GEN_WORKLIST_ACCESS_EXCLUSIONS' and sense = FND_GLOBAL. (USER_NAME), 0, ' N 'Y') = ' don't
UNION
SELECT the vo. USER_NAME
vo. DISPLAY_NAME
vo. ORIG_SYSTEM
vo. EMAIL_ADDRESS
vo. ORIG_SYSTEM_ID
vo. ID_PARTITION
haou.name AS ORGANIZATION
pp.name AS POST
hla.location_code as LOCATION
Of
(SELECT WU.NAME AS USER_NAME,
WU. DISPLAY_NAME,
WDP. ORIG_SYSTEM,
WU. EMAIL_ADDRESS,
WU. ORIG_SYSTEM_ID,
WU. ID_PARTITION
WU WF_ROLE_LOV_VL,.
WDP WF_DIRECTORY_PARTITIONS
WHERE WU. ID_PARTITION = OF THE WDP. ID_PARTITION
AND: 1 <>"BY".
UNION ALL
SELECT WU.NAME AS USER_NAME,
WU. DISPLAY_NAME,
WU. ORIG_SYSTEM,
WU. EMAIL_ADDRESS,
WU. ORIG_SYSTEM_ID,
WU. ID_PARTITION
WU WF_ROLE_LOV_VL
WHERE WU. ORIG_SYSTEM = "BY".
AND WU. ID_PARTITION = 1
AND: 2 = "BY".
) vo
per_all_people_f ADP
per_all_people_f paaf_logper
per_all_assignments_f paaf1
fnd_user fu
hr_all_organization_units haou
per_positions pp
hr_locations_all hla
where 1 = 1
and fu.user_name = vo.user_name
and fu.employee_id = paaf.person_id
and paaf_logper.person_id = paaf.person_id
and trunc (sysdate) BETWEEN paaf_logper.effective_start_date AND paaf_logper.effective_end_date
and trunc (sysdate) BETWEEN paaf.effective_start_date AND paaf.effective_end_date
AND trunc (sysdate) BETWEEN paaf1.effective_start_date AND paaf1.effective_end_date
and paaf.person_id = paaf1.person_id
and paaf1.primary_flag = 'Y '.
and paaf1. POSITION_ID = pp.position_id (+)
and paaf1.location_id = hla.location_id (+)
and paaf1.organization_id = haou.organization_id (+)
and decode ((select count (*) in the FND_LOOKUP_VALUES where lookup_type like 'GEN_WORKLIST_ACCESS_EXCLUSIONS' and sense = FND_GLOBAL. User_name), 0, ' n, 'Y') = 'Y') QRSLT WHERE (ORIG_SYSTEM in ("FND_USR", "PQH_ROLE", "PER") AND (USER_NAME <>: 3) AND (UPPER (DISPLAY_NAME) as UPPER(:4) AND (DISPLAY_NAME love: 5 OR DISPLAY_NAME as: 6 OR DISPLAY_NAME as: 7 OR DISPLAY_NAME as: 8))) ORDER BY DISPLAY_NAME
at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:912)
at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1169)
at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1435)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2978)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1875)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:543)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:431)
in OA. jspService(_OA.java:204)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:473)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:642)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:391)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:908)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:458)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
to oracle.oc4j.network.ServerSocketReadHandler$ SafeRunnable.run (ServerSocketReadHandler.java:260)
to com.evermind.util.ReleasableResourcePooledExecutor$ MyWorker.run (ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:619)
# # 0 in detail
java.sql.SQLException: invalid column type
at oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical(OraclePreparedStatement.java:8516)
at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:8034)
at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:8767)
at oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement.java:8748)
at oracle.jdbc.driver.OraclePreparedStatement.setObjectAtName(OraclePreparedStatement.java:11907)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.setObjectAtName(OraclePreparedStatementWrapper.java:815)
at oracle.jbo.server.OracleSQLBuilderImpl.bindParamValue(OracleSQLBuilderImpl.java:3919)
at oracle.jbo.server.BaseSQLBuilderImpl.bindParametersForStmt(BaseSQLBuilderImpl.java:3335)
at oracle.jbo.server.ViewObjectImpl.bindParametersForCollection(ViewObjectImpl.java:13827)
at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:804)
at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:669)
at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3723)
at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection (unknown Source)
at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4560)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:743)
at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:892)
at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:806)
at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:800)
at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3643)
at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:439)
at oracle.apps.fnd.framework.server.OAViewObjectImpl.initQuery(OAViewObjectImpl.java:743)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.setCriteriaOnVO(OAWebBeanHelper.java:2334)
at oracle.apps.fnd.framework.webui.OAListOfValuesHelper.processFormRequestAfterController(OAListOfValuesHelper.java:1584)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:851)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385)
at oracle.apps.fnd.framework.webui.OAListOfValuesHelper.processFormRequest(OAListOfValuesHelper.java:1490)
at oracle.apps.fnd.framework.webui.beans.layout.OAListOfValuesBean.processFormRequest(OAListOfValuesBean.java:423)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1031)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:997)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:852)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2974)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1875)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:543)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:431)
in OA. jspService(_OA.java:204)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:473)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:642)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:391)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:908)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:458)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
to oracle.oc4j.network.ServerSocketReadHandler$ SafeRunnable.run (ServerSocketReadHandler.java:260)
to com.evermind.util.ReleasableResourcePooledExecutor$ MyWorker.run (ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:619)
Help, please...
Thank you
Rambaud.Hello
You should check what value deals: 1,: 2 positions when you click GO second time.
Thank you
Pratap -
SQL * more: indicates if a column has been truncated?
So, I have a report where I am squeezing all the columns, I want to see in a 120-character wide display.
I put something like this:
Col some_column format a10
90% of the lines, this works very well, but there are a few that are too wide. So if the value is "snuffleupagus", it shows "snuffleupa", truncating to 10 letters (which are what I told it to do).
Is it possible to have rather print something like "snuffleup *" (or any other character), indicating that he has more output, but he had to truncate?
I am aware of word_wrap, which is exactly what I'm looking for.
If there is an Oracle function that could be achieved, that would be fine, too. I guess that if comes from getting worse, I could write a PL/SQL function to do this.Brute force the way, perhaps?
WITH t AS (SELECT 'snuffleupagus' some_string FROM dual) SELECT CASE WHEN length(some_string) > 9 THEN substr(some_string, 1, 9) || '*' ELSE some_string END actual_display_value FROM t;
-
SQL Help: Derive from 'News' columns based on condition
Hi all
Can someone help me with this please? I am trying to achieve in a SQL (no), if this can be done in two different stages, even that is fine too...
Thanks in advance,
Chavigny
For a "batch - id", there are several Transactions that are denoted by (cr_crncy_cd, dr_crncy_cd, recvr_cntry_cd), and the "NEW_BTCH_NM" column is basically a concatenation of 'BTCH_NM' + above 3 columns (with a ~)SELECT * FROM ( SELECT 2765 BTCH_ID,'payroll' BTCH_NM,'payroll~EUR~EUR~DE'NEW_BTCH_NM,'1234'TMPLT_ID FROM DUAL UNION SELECT 2765,'payroll','payroll~USD~USD~US','1235' FROM DUAL UNION SELECT 2765,'payroll','payroll~USD~USD~US','1236' FROM DUAL UNION SELECT 2765,'payroll','payroll~GBP~GBP~GB','1237' FROM DUAL UNION SELECT 2766,'SALARY','SALARY~USD~USD~US','1238' FROM DUAL UNION SELECT 2766,'SALARY','SALARY~USD~USD~US','1239' FROM DUAL ) T_BATCH;
I'm trying to derive two new columns "SEQ" & "Output_Batch_name".
The SEQ column:
Output_BTCH_NM:For every batch_id, the first row will be assigned by sequence.nextval. For all transactions within BTCH_ID, all the rows with same NEW_BTCH_NM, share the same sequence number if different, then SEQ.nextval for all distinct rows
EXPECTED RESULTSfor a given batch_id, if the NEW_BTCH_NM is the same for all transactions ( batch_id 2766 in the below example) , then Output_BTCH_NM = BTCH_NM should be marked for All transactions which belong to this Batch_id, Else Output_BTCH_NM = New_BTCH_NM END if
Published by: user10711957 on 25 Sep, 2010 16:37*BTCH_ID BTCH_NM NEW_BTCH_NM TMPLT_ID SEQ Output_BTCH_NM* 2765 payroll payroll~EUR~EUR~DE 1234 1 payroll~EUR~EUR~DE 2765 payroll payroll~GBP~GBP~GB 1237 2 payroll~GBP~GBP~GB 2765 payroll payroll~USD~USD~US 1235 3 payroll~USD~USD~US 2765 payroll payroll~USD~USD~US 1236 3 payroll~USD~USD~US 2766 SALARY SALARY~USD~USD~US 1238 4 SALARY 2766 SALARY SALARY~USD~USD~US 1239 4 SALARY
An extension of the solution of the (slightly modified) jiq
function my_sequence(whichval in varchar2) return number is begin if whichval = 'currval' then return your_sequence.currval; else return your_sequence.nextval; end if; end my_sequence; WITH t AS ( SELECT 2765 BTCH_ID,'payroll' BTCH_NM,'payroll~EUR~EUR~DE'NEW_BTCH_NM,'1234'TMPLT_ID FROM DUAL UNION SELECT 2765,'payroll','payroll~USD~USD~US','1235' FROM DUAL UNION SELECT 2765,'payroll','payroll~USD~USD~US','1236' FROM DUAL UNION SELECT 2765,'payroll','payroll~GBP~GBP~GB','1237' FROM DUAL UNION SELECT 2766,'SALARY','SALARY~USD~USD~US','1238' FROM DUAL UNION SELECT 2766,'SALARY','SALARY~USD~USD~US','1239' FROM DUAL ) select btch_id,btch_nm,new_btch_nm,tmplt_id, case when lag(seq,1) over (order by tmplt_id) = seq then my_sequence('currval') else my_sequence('nextval') end seq, out_btch_nm select btch_id,btch_nm,new_btch_nm,tmplt_id, dense_rank() over(partition by btch_id order by new_btch_nm) seq case when count(distinct new_btch_nm) over (partition by btch_id) = 1 then btch_nm else new_btch_nm end out_btch_nm from t
Concerning
Etbin
Posted before you see the following
the sequence # must be continuous, must avoid any shortfall or gaps with the numbering.
the foregoing must be the only user of its own sequence somehow and maybe...
Search for "sequence free gap"... http://asktom.oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:4343369880986
Edited by: Etbin on 26.9.2010 08:21 -
Need for the sql query to have several columns in a single coulumn
Hi all
I need create the query to have several columns in a single column with several lines.
Select a.customer_trx_id, a.previous_customer_trx_id
of ra_customer_trx_all one
where a.customer_trx_id =: customer_trx_id
Here, a.customer_trx_id and a.previous_customer_trx_id are in two columns. I need to put them in a single column.
Say: the foregoing is output
--------------------------------------------------------------------------------
a.customer_trx_id a.previous_customer_trx_id
--------------------------------------------------------------------------------
123456 87654
--------------------------------------------------------------------------------
Need for a single column
As
--------------------------------------------------------------------------------
123456
87654
--------------------------------------------------------------------------------
Please do the needful. Please note that it is not the UNION.
Thank you
AbdulHello
You want a way to confirm that what looks like two rows is really a line?
Here are three ways:
(1) count the lines:
WITH my_original_querry AS ( select a.customer_trx_id || CHR(13) || a.previous_customer_trx_id as id from ra_customer_trx_all a where a.customer_trx_id = 274881 ) SELECT COUNT (*) FROM my_original_query;
(2) in SQL * Plus, have SQL * more count them for you:
SET FEEDBACK 1 select a.customer_trx_id || CHR(13) || a.previous_customer_trx_id as id from ra_customer_trx_all a where a.customer_trx_id = 274881;
(3) implicitly count them with the ROWNUM Pseudo-column
select a.customer_trx_id || CHR(13) || a.previous_customer_trx_id as id , ROWNUM from ra_customer_trx_all a where a.customer_trx_id = 274881;
-
SQL: Values in 2 equal columns can highlight text
Hello
I have a report or a statement of pl/sql for a table in which I got a select statement for a table. and i two values in 2 different columns and rows are equal I want to highlite them but I don't know ho to do. I need the solution for both, a simple report and a pl/sql statement
what I have is like that
Col1 - Col2 - Col3 - Col4 - Col5
Col1Val1 Col2Val1 Col3Val1 Col4Val1 Col5Val1
Col1Val2 Col2Val2 Col3Val2 Col4Val2 V a l u e
Col1Val3 Col2Val3 Col3Val3 Col4Val3 Col5Val3
Col1Val4 Col2Val4 Col3Val4 V a u l e Col5Val4
Col1Val5 Col2Val5 Col3Val5 Col4Val5 Col5Val5
Col1Val6 Col2Val6 Col3Val6 Col4Val6 Col5Val6
Col1Val7 Col2Val7 Col3Val7 Col4Val7 Col5Val7
and what I want is
Col1 - Col2 - Col3 - Col4 - Col5
Col1Val1 Col2Val1 Col3Val1 Col4Val1 Col5Val1
Col1Val2 Col2Val2 Col3Val2 Col4Val2 V a l u e
Col1Val3 Col2Val3 Col3Val3 Col4Val3 Col5Val3
Col1Val4 Col2Val4 Col3Val4 V a l u e Col5Val4
Col1Val5 Col2Val5 Col3Val5 Col4Val5 Col5Val5
Col1Val6 Col2Val6 Col3Val6 Col4Val6 Col5Val6
Col1Val7 Col2Val7 Col3Val7 Col4Val7 Col5Val7
thx for your help
concerning
Falk
Published by: Falk on 24.11.2008 06:51Hi Falk,
Add something like the following in the HTML of your page header:
<script type="text/javascript"> function showmatches(f1, f2) { var h1 = document.getElementById(f1); var h2 = document.getElementById(f2); var t = h1.parentNode; while (t.tagName != 'TABLE') { t = t.parentNode; } var rows = t.rows; var k; var j; var headers = t.getElementsByTagName("TH"); var c1; var c2; var i1; var i2; for (k = 0; k < headers.length; k++) { if (headers[k].id == f1) { c1 = k; } if (headers[k].id == f2) { c2 = k; } } for (k = 1; k < rows.length; k++) { i1 = rows[k].getElementsByTagName("TD")[c1].innerHTML; for (j = 1; j < rows.length; j++) { i2 = rows[j].getElementsByTagName("TD")[c2].innerHTML; if (i1 == i2) { rows[k].cells[c1].style.backgroundColor = 'red'; rows[j].cells[c2].style.backgroundColor = 'red'; } } } } </script>
Then add the following text in the footer of the report in your area:
<script type="text/javascript"> showmatches('VALUE3','VALUE4'); </script>
VALUE3 and VALUE4 replacing the names of the columns for the two columns you want to compare.
Finally, you may need to create a new report based on your existing model. In most of those I've been watching, the row front each parameter looks like:
<tr #HIGHLIGHT_ROW#>
You need a model that excludes the #HIGHLIGHT_ROW # this will start by highlighting the lines with your highlight color and you lose the functionality of javascript.
I made a sample page (with a tabular editing page, so you can test changing figures): http://htmldb.oracle.com/pls/otn/f?p=55041:20
Andy
Maybe you are looking for
-
Email Security issues/Support?
My back "story"... So I got a second hand iPhone 5s in perfect condition about 2 weeks ago but cannot make purchases on the iTunes/App store because I am asked to enter the answer to the 2 security questions. This (I'm sure) is normal on a new device
-
Hi everyone, I am trying to use the report as simple text, to create an Excel file, I want to print a table, can someone explain to me how do?
-
Need help on how to create the transformation of the Park by using the MathScript node?
Hello I want to generate a transformation of the Park by using the MathScript node. But there is an error message which confused me. Please can someone help me to have a look of my program? Thank you! The error message is "error-90011 occurred in err
-
I can't play a dvd I get an C00D116A error code.
-
I need an installation CD for my HP Photosmart 2575 All in One. I lost mine moving.