Print a string below each line
DB version: 11.2.0.4 on Oracle Linux 6.4
create table t (col1 varchar2 (20));
insert into values t ('JOHN');
insert into values t ("KATY");
Insert values into t ("ELYSIUM");
Insert values into t ('KRISHNA');
Insert values into t ('XIANG');
SQL > select * from t;
COL1
--------------------
JOHN
KATY
ELYSEE
KRISHNA
XIANG
I want a string (the CLIENT say) mentioned more down all the records. No idea how I can do this?
Expected results:
COL1
--------------------
JOHN
CUSTOMER
KATY
CUSTOMER
ELYSEE
CUSTOMER
KRISHNA
CUSTOMER
XIANG
CUSTOMER
My futile attempt: the CLIENT string only printed once downstairs!
----------------
Select COL1 from T A
UNION ALL
Select the 'CUSTOMER' has double;
A
--------------------
JOHN
KATY
ELYSEE
KRISHNA
XIANG
CUSTOMER
6 selected lines.
Maybe
Select * | Chr (10) | 'CUSTOMER' of t;
HTH - Antonio NAVARRO
Tags: Database
Similar Questions
-
How to print 1 page for each line of the numbers worksheet
Hello... I am trying to print reports of year-end per person and number.
Is it possible in number to print 1 page for each row of a spreadsheet of numbers?
Or suggestions?
Thank you.
Hi cm,
This looks like a work of fusion and mailing.
The merge document would create in Pages, and the cells of merger on this document référenceriez cells in the table in the document numbers.
See the documentation Pages (on the Help menu) for instructions on the conduct of merger and mailing.
To do this in only numbers, you would need to put in place a 'table of declaration' on a separate sheet (in the same document as the table containing information) which would accept a customer number (or other key ID for each individual) then use it to determine the line of the main table to retrieve information about this pattern.
A more precise answer requires a more specific desription of your table structure and the desired form of the instruction to take.
Kind regards
Barry
-
Any text strings have new lines where they shouldn't
Using AS3 in flash CS4
Hi I have a text imported from a bounded/separated tab (.txt) text file.
I divided the values in a table using .split ('\n').split('\t')
I stored the data imported into a table where each column has a new index and the properties of each line can be obtained from the table [n] .property. For example, array [4] .name would give the "entity name 4th in the original text file."
This all works fine however some of the separate strings are formatted incorrectly that they absorb 2 lines instead of one.
The first string in each line of the original text file is imported into flash with a new line above him. "That is to say: 'Property1' in the text file delimited: original separation/tab is stored in flash as"
Property1"with a new line above it. I need to get rid of this new line in order to correctly display the text in the text fields.
Can someone please.
PS: I will not change my file format import from a file delimited text tab, something like xml, so please don't suggest that he.
those who are not functions of string-band. These are white space characters. all white space characters are ignored by the backslash character.
I used two of them and in my years of using the flash, I've never used more than these two and \t = tab, even if I know two other:
\b = RET.
\f = page break
I used:
\r = carriage return
\n = new line
the code I gave converted a break line, followed by a newline on a new line, only. and he converted a carriage return followed of a new line on a new line, only.
Please mark this thread as answered, if you can.
-
Each line in the document is printed on a separate page, IE: ten lines will print 10 separate pages for printing.
Try of the reset described here:
http://KB.mozillazine.org/Problems_printing_web_pages#Reset_printerMake sure that you reset all the print preferences.
-
Each line print more starts left
Photosmart C4280 running on Windows XP.
Output print starts each line immediately to the left so that I can not even acceptable alignment page cartridge - cartridge jam causes.
I tried hardware & software restores without success.
Try to clean the tape coding as described in this post. Don't forget to heed the warnings, the encoder is fragile and the blades or the top fine lines can be damaged by rough handling.
-
When I print from Windows Live Mail, the left margin is far more than the first letters of each line are missing. Where can I go to change the left margin on Windows Live Mail?
Print settings are in Internet Explorer, the file (ALT + F keyboard), Page Setup
Increase the left? the margin of
-
FileStream.readMultiByte adds an extra carriage return to each line
I have a simple txt file named file1.txt that contains:
Line1 Line2
I have this code that reads the file and puts the content in the variable named str:
var file:File = File.applicationDirectory; file = file.resolvePath("file1.txt"); var fileStream:FileStream = new FileStream(); fileStream.open(file, FileMode.READ); var str:String = fileStream.readMultiByte(file.size, File.systemCharset); str = str.replace(/\n/g, File.lineEnding); fileStream.close(); trace(str);
When I run this code, I get this:
Line1 Line2
(there are an additional empty line at the end of each line).
I've looked everywhere and I understand the text file created in Windows ads, a beginning of additional line after the end of line Flash interprets as extra line so I added recommended (see below) to convert end of line of devices... Any ideas how to solve this problem?
str = str.replace(/\n/g, File.lineEnding);
Maybe this works when you replace the regular expression with a string that contains "\n".
-
Report Classic - Condition evaluated for each line
APEX 4.2.2
I see something strange in a classic report area. A report began to fail at runtime with a strange error of incorrect syntax. When I run the page in debug mode, I see the following
Print column headers
loop lines: line 30 (s)
... Run the statement: begin wwv_flow.g_boolean: = "is not null;
end;
...... Result = false
... Run the statement: begin wwv_flow.g_boolean: = "is not null;
end;
...... Result = false
... Run the statement: begin wwv_flow.g_boolean: = ' embedded string with a 'apostrophe' is not null;
end;
...... Result = true
It seems that the APEX engine evaluates a Boolean expression after rendering and each row in the report. And for some strange reason, it is using a piece of data from the result set of the query and is not due to bad syntax introduced by the single quotation mark in the string.
I have never seen it before. Any idea what's going on?
Thank you
Hi Vikas
Report template customized with the models of the conditional row/column?
(Sorry for the brevity of the answer but I just get on a plane...)
-
I have a chart single 2D out a conditional of a loop indexing output such that over the rows of the table are not the same size. -Basically, they have different starting and ending points and sizes. -Not so concerned by the endpoints, because as soon as I get correctly starting points, everything shows fall in place.
The challenge is that when I try to have the variable t0 (start time) for each line, the wave of construction vi form would always keep each line at the same starting point.
I used the approach bundled with success (the cluster approach ensures that each waveform starts at different times according to the guidelines of my t0 defined for each line) but then I'm not able to get in the channel names I could make using the graphical approach (wave generation) waveform.
In essence what I get here, I'm losing here.
Because I don't want one of my mentors, Bob and Altenbach have fed up with me I have attached a vi this time
Attached VI shows a combination of the two attempts (first with the waveform graph) and then with the graph of cluster
1. with the first (graphical waveform), I get my channel names as you wish, but the alignment of the wave is not correct.
2. with the second (graphical cluster), the alignment is good, but I can't do the names of channel in the chart, even if they are present in the cluster.
I read some reviews that mentions that attributes can be displayed with waveform and data Dynamics (not clsuters) so I guess that's why.
I saw another report indicating the start time for a waveform 1 d will always remain the same for the rest lines defined for the first line even if changed for the following lines in a loop.
So I guess my question is: what is the way around questions like that?
First of all, let me be the first to the congratulate and thank you for finally posting a code! I'm not 100% certain I understand your question or your code, but I have an idea, perhaps, of what you want to do, so I wrote a little VI who made something simple that could be relevant.
You mention waveforms of different lengths and beginning at different times. You also want everyone to have a unique attribute (although I'm not sure what you want to do with the attribute). So, I did the following:
- Generated an array of 100-sample random to represent one second of a waveform.
- Created 4 waveforms on this 100-sample basis. The first waveform (channel 0) is just these 100 points. The second, 1 channel, is the concatenation of string 0 with the base of 100 samples, or a waveform "double". Channel 2 is 1 string concatenated with the base, and channel 3 is 2 string concatenated with the base.
- In order to trace the four channels that they rest 'on' the other, the waveform has the number of the channel added to it. Channel 3 is 3 + (4 copies of the basis of 100 points), a waveform 400-point random centered around a shift of 3.
- All channels have dt value 0.01 (but I guess I could have varied, as well).
- To make the channels start at different times, I started channel N N seconds before channel 0 (by subtracting the index of the loop, I, T0).
- For each channel, I created an attribute called "Chan" equal to "Channel N" (where N = 0, 1, 2 or 3, as the case may be).
This is the plot that results. Scale X is the absolute time value (no Date) using the 24-hour HH: mmS format. You can see that the plots are 1, 2, 3 and 4 seconds of time, and are offset from each other by a second. I used the trace attributes to change the name to the respective attribute.
The code to do this is very simple - I almost don't need to show it, because I think it is completely described by the text above, but this is here:
Now, it was not that much faster that some of your previous posts, when you refused to your postcode, "guess us" what you wanted (but not to not correctly guess), you tried to "push" us in the right direction (still refuses to post code), and no one seemed very happy?
Bob Schor
-
How to trace the number and string in a line (meter data via MODBUS recorder)?
Hi all I did the log data amount using digital via modbus (RS485) meter to monitor how much and to reject what has and name operator, Machine and the part number.
I have problem on plot number & string in one line, as shown in the image below:
How to move this channel on a line? I enclose my vi.
Thank you ~.
Hi rhiesnand,
at the moment you add 2 new lines in your table.
The solution is to concatenate the two parts of the line to a greater range of 1 d before adding this table as a new row to your table 2D!
Like this:
-
HP C5380 all-in-one printer: a thick black/gray line down the page when scanning.
1 HP Photosmart C5380 all-in-One Printer
2. Windows 7 64 bit
3. no error is, as usual but preview and print with a dark gray line / think through the page.
4. I got a new monitor.
How can I fix? the optical reading area is clean, no dust or dirt present and it just started this without reason. The connections are good, I unplugged and plugged the cables of the computer and the printer and the problem is still there.
When I scan the document line is present and even when I print the line appears on the printed page is not my screen.
bbjae, it looks like there may be a residual electric charge accumulated in the unit. When was the last time you did a Hard Reset on this unit?
Hard Reset:
* Unplug the unit while the printer is on
Disconnect the other end of the power cord from the wall jack directly
* Wait 30 seconds
* Plug power back in and make sure that the device is running
So, it is a document with the steps to help fix the vertical lines and scratches in the copies or scans, click on the link below:
-
HP Officejet Pro L7580 (printer) printing faded every 3-4 lines
My printer is less than 4 years. Recently, each page that print has every little faded lines. I have all new ink cartridges in the printer and have used the printer cleaning paper Laser buit several times the problem still exists. Any ideas? I don't want another printer.
Hello
Please try to make a copy of a document or a photo color.
Let me know if the problem still persists.
-
Add dynamic buttons to each line of the report and bind the data line to this line-specific buttons
I have a page with a form in the upper part and a report at the bottom that is bound to a table. I need to add a pair of buttons for each row in the table and add dynamic actions for these buttons. I need to submit the data corresponding to the line to a REST service and update the table/line. I know that it is possible to add ajax call and refresh the table after receipt of the response. But I don't know how can I dynamically include a pair of buttons on each line and access the data corresponding to the record when a particular button is clicked. I was not able to find such a feature using the help page. Can you please let me know if this is possible. Thanks in advance.
Here is the representation of how I need to the page to look like.
Col 1
Col 2
Col 3
data 1
data 21
data 31
Button 1
Button 2
data 2
data 22
data 32
Button 1
Button 2
data 3
data 23
data 33
Button 1
Button 2
data 4
data 24
data 34
Button 1
Button 2
I should be able to access the data 1, data21, data button 31 11 and button21 etc.
Select data1,
data2,
data3,
......,
Button1 null,
Button2 null,
ROWID r_id
Of...
If you change the column for button1 and navigate to the area of column formatting you can create your button here, in several different ways. You will need to play with the way you prefer. See below:
-
Extend each line to the new lines by "N".
Oracle 11.2.0.1
Here's a simple query that develops each line given in "N" new lines with a sequence counts 1 to "N", where "N" is given as the column 'cnt '.
It works and gives the expected results, as shown below; but I wonder if there is a more effective or more elegant way to do this. I really don't like the cross all lines of the largest sequence in the data join.
Thank you.with smpl_data as ( select 'item-1' val, 3 cnt from dual union all select 'item-2' , 4 from dual union all select 'item-3' , 1 from dual union all select 'item-4' , 0 from dual union all select 'item-5' , 2 from dual ) select a.val, b.n from smpl_data a cross join ( select level as n from dual connect by level <= (select max(cnt) from smpl_data) ) b where b.n <= a.cnt order by a.val, b.n ; Results: VAL CNT ------ --- item-1 1 item-1 2 item-1 3 item-2 1 item-2 2 item-2 3 item-2 4 item-3 1 item-5 1 item-5 2
Since you're on 11g the WITH recursive clause is better (and should be faster too).
Here's how you can use it.
with smpl_data (val, cnt) as ( select 'item-1', 3 from dual union all select 'item-2', 4 from dual union all select 'item-3', 1 from dual union all select 'item-4', 0 from dual union all select 'item-5', 2 from dual ) ,data_expand (val, cnt) as (select d1.val, d1.cnt from smpl_data d1 where d1.cnt > 0 UNION ALL select d2.val, d2.cnt-1 from data_expand d2 where d2.cnt > 1 ) select * from data_expand order by val, cnt ; val cnt ---------- item-1 1 item-1 2 item-1 3 item-2 1 item-2 2 item-2 3 item-2 4 item-3 1 item-5 1 item-5 2
Published by: Sven w. on 12 July 2012 16:30
-changed: output 0 rows are excluded -
Each line in individual columns in a SQL query
Hi Experts,
BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production PL/SQL Release 11.1.0.7.0 - Production CORE 11.1.0.7.0 Production TNS for 32-bit Windows: Version 11.1.0.7.0 - Production NLSRTL Version 11.1.0.7.0 - Production
-- DROP TABLE RENDER_VALUES; CREATE TABLE RENDER_VALUES ( ID INTEGER PRIMARY KEY, FIELD_NAME VARCHAR2(1000), FIELD_VALUE VARCHAR2(1000) );
INSERT INTO RENDER_VALUES(ID,FIELD_NAME,FIELD_VALUE)VALUES(1,'CropX','10.31234'); INSERT INTO RENDER_VALUES(ID,FIELD_NAME,FIELD_VALUE)VALUES(2,'CropY','20.31234'); INSERT INTO RENDER_VALUES(ID,FIELD_NAME,FIELD_VALUE)VALUES(3,'Height','100'); INSERT INTO RENDER_VALUES(ID,FIELD_NAME,FIELD_VALUE)VALUES(4,'Width','200'); COMMIT;
SELECT FIELD_NAME,FIELD_VALUE FROM RENDER_VALUES;
I need the output voltage:FIELD_NAME FIELD_VALUE CropX 10.31234 CropY 20.31234 Height 100 Width 200
Just for example... I gave four values in the column field name... There may be values of number (n) to that and to get each lineCropX CropY Height Width 10.31234 20.31234 100 200
in individual columns... How can I do something like that?
V diaHello
Here is an example of a VARCHAR2 variable usage in PL/SQL.
VARIABLE dj REFCURSOR CREATE OR REPLACE FUNCTION dept_by_job RETURN SYS_REFCURSOR IS -- dept_by_job returns a SYS_REFCURSOR that has -- one row for every department in scott.emp and one -- column for every job, showing the number of employees -- in that department with that job. return_csr SYS_REFCURSOR; select_txt VARCHAR2 (5000); BEGIN -- 1st part of query is fixed select_txt := 'SELECT deptno '; -- 2nd part of query depends on what's in the table FOR r IN ( SELECT DISTINCT job FROM scott.emp ORDER BY job ) LOOP select_txt := select_txt || ', COUNT (CASE WHEN job = ''' || r.job || ''' THEN 1 END) AS ' || r.job || '_cnt '; END LOOP; -- Last part of query is fixed select_txt := select_txt || ' FROM scott.emp' || ' GROUP BY deptno' || ' ORDER BY deptno'; OPEN return_csr FOR select_txt; RETURN return_csr; END dept_by_job ; / SHOW ERRORS EXEC :dj := dept_by_job; PRINT :dj
Otherwise, as you have provided a test table, here's an example suitable for your test table:
CREATE OR REPLACE FUNCTION pivot_rv RETURN SYS_REFCURSOR IS return_csr SYS_REFCURSOR; select_txt VARCHAR2 (5000); BEGIN -- 1st part of query is fixed select_txt := 'SELECT '; -- 2nd part of query depends on what's in the table FOR r IN ( SELECT DISTINCT field_name , ROW_NUMBER () OVER (ORDER BY id) AS rnum FROM render_values ORDER BY rnum ) LOOP select_txt := select_txt || CASE WHEN r.rnum > 1 THEN ',' END || 'MAX (CASE WHEN field_name = ''' || r.field_name || ''' THEN field_value END) AS "' || r.field_name || '"'; END LOOP; -- Last part of query is fixed select_txt := select_txt || ' FROM render_values'; OPEN return_csr FOR select_txt; RETURN return_csr; END pivot_rv ;
Published by: Frank Kulash, January 15, 2010 10:42
Maybe you are looking for
-
Ghost 12.04.119 stars - how to remove?
I do not know what causes ghost star in the first place, but in the previous version of iTunes, it was pretty easy, so laborious, to get rid of them. There is a drop-down list at the top right of the window that allows you to choose to display in son
-
FN + space zoom instead of on Equium A200
Whne I press the Fn + space instead of the screen zoom, it zooms out and it affects the games I play on this laptop. Any help?
-
Compatible battery for Satellite A100-204
I can't find any spare battery for my Toshiba satellite laptop A100-204. The original battery is a 4 cells Li - ion PA3451U-1BRS recycable. Whenever I look for this battery in google that I only find this for Toshiba M40. It allmost looks the same, b
-
WLan transfer rate is 54 Mbit/s to 1 MB/s
I am feminine and know nothing about computers...computer capture signal, but fails to hold, the tx rate fall of 54 Mbit/s to 1 Mbit/s in a few seconds.I tried an external booster with the same results. It makes no difference what network I connect t
-
Noisy fan (HP Pavilion A1629UK1 Desktop)
I have a HP Pavilion A1629UK1 desktop computer. When I load windows the cpu is quiet until I open programs, then the (loud) fan turns on and does not turn off. Suggestions for me what to do - should I replace the fan and what should replace it with,