Updating multiple entries into one field
Hi i have a legal directory in which when a solicitor
registers they can select as many or as few areas of law they want.
I have all of the areas in a check box
<input type="checkbox" name="areaoflaw" value="Agricultural
Law">
<input type="checkbox" name="areaoflaw" value="Aviation
Law">
<input type="checkbox" name="areaoflaw" value="Charity
Law">
<input type="checkbox" name="areaoflaw" value="Civil
Liberties & Human Rights">
<input type="checkbox" name="areaoflaw" value="Computer
& IT Law">
<input type="checkbox" name="areaoflaw"
value="Construction & Civil Engineering">
<input type="checkbox" name="areaoflaw" value="Consumer
Problems">
<input type="checkbox" name="areaoflaw"
value="Conveyancing (non-UK)">
<input type="checkbox" name="areaoflaw" value="Corporate
Finance">
<input type="checkbox" name="areaoflaw" value="Dental
negligence">
<input type="checkbox" name="areaoflaw" value="Debt
Collection">
<input type="checkbox" name="areaoflaw" value="Defamation
Law">
<input type="checkbox" name="areaoflaw" value="European
Law">
<input type="checkbox" name="areaoflaw" value="Education
Law">
<input type="checkbox" name="areaoflaw"
value="Environmental Law">
<input type="checkbox" name="areaoflaw"
value="Enfranchisement & Lease extensions">
<input type="checkbox" name="areaoflaw" value="Fraud">
<input type="checkbox" name="areaoflaw" value="Insurance
Miss-selling">
<input type="checkbox" name="areaoflaw"
value="Intellectual Property">
<input type="checkbox" name="areaoflaw"
value="Landlord">
<input type="checkbox" name="areaoflaw" value="Tenant">
<input type="checkbox" name="areaoflaw" value="Licensing
Law">
<input type="checkbox" name="areaoflaw" value="Media &
Entertainment Law">
<input type="checkbox" name="areaoflaw"
value="Mediation">
<input type="checkbox" name="areaoflaw" value="Mental
Health">
<input type="checkbox" name="areaoflaw" value="Motoring
Offences">
<input type="checkbox" name="areaoflaw" value="Planning
Law">
<input type="checkbox" name="areaoflaw"
value="Professional Negligence">
<input type="checkbox" name="areaoflaw"
value="Pharmaceutical Claims">
<input type="checkbox" name="areaoflaw" value="Regulatory
Investigations">
<input type="checkbox" name="areaoflaw" value="Sports
Claims">
<input type="checkbox" name="areaoflaw" value="Shipping
Law">
<input type="checkbox" name="areaoflaw" value="Tax
Law">
<input type="checkbox" name="areaoflaw" value="Travel
& Tourism">
<input type="checkbox" name="areaoflaw" value="Welfare
Benefits">
When they submit i want it to insert as many areas as they
have selected but it only submits the last one checked.
<cfquery name="insertsolicitor" datasource="law4essex"
dbtype="odbc">
insert into
solicitors(companyname,contactname,address1,address2,town,county,postcode,tel,fax,email,w ebsite,areaoflaw)Values('#companyname#','#contactname#','#address1#','#address2#','#town#' ,'#county#','#postcode#','#tel#','#fax#','#email#','#website#','#areaoflaw#')
</cfquery>
Does anyone how i can add all or a few of them depending what
is selected. they should all go into the area of law field in the
database
cybertek23, I'd seriously reconsider doing an INSERT INTO
for these fields as a comma delimited list. This will undoubtedly
cause nothing but headaches in the near future. A better way might
be use each checkbox fieldname as its own column name in the dB.
In any case, see if this works for you:
<input type="checkbox" name="areaoflaw"
value="Agricultural Law">
<input type="checkbox" name="areaoflaw" value="Aviation
Law">
<input type="checkbox" name="areaoflaw" value="Charity
Law">
<input type="checkbox" name="areaoflaw" value="Civil
Liberties & Human Rights">
<input type="checkbox" name="areaoflaw" value="Computer
& IT Law">
<input type="checkbox" name="areaoflaw"
value="Construction & Civil Engineering">
<input type="checkbox" name="areaoflaw" value="Consumer
Problems">
<input type="checkbox" name="areaoflaw"
value="Conveyancing (non-UK)">
<input type="checkbox" name="areaoflaw" value="Corporate
Finance">
<input type="checkbox" name="areaoflaw" value="Dental
negligence">
<input type="checkbox" name="areaoflaw" value="Debt
Collection">
<input type="checkbox" name="areaoflaw" value="Defamation
Law">
<input type="checkbox" name="areaoflaw" value="European
Law">
<input type="checkbox" name="areaoflaw" value="Education
Law">
<input type="checkbox" name="areaoflaw"
value="Environmental Law">
<input type="checkbox" name="areaoflaw"
value="Enfranchisement & Lease extensions">
<input type="checkbox" name="areaoflaw" value="Fraud">
<input type="checkbox" name="areaoflaw" value="Insurance
Miss-selling">
<input type="checkbox" name="areaoflaw"
value="Intellectual Property">
<input type="checkbox" name="areaoflaw"
value="Landlord">
<input type="checkbox" name="areaoflaw" value="Tenant">
<input type="checkbox" name="areaoflaw" value="Licensing
Law">
<input type="checkbox" name="areaoflaw" value="Media &
Entertainment Law">
<input type="checkbox" name="areaoflaw"
value="Mediation">
<input type="checkbox" name="areaoflaw" value="Mental
Health">
<input type="checkbox" name="areaoflaw" value="Motoring
Offences">
<input type="checkbox" name="areaoflaw" value="Planning
Law">
<input type="checkbox" name="areaoflaw"
value="Professional Negligence">
<input type="checkbox" name="areaoflaw"
value="Pharmaceutical Claims">
<input type="checkbox" name="areaoflaw" value="Regulatory
Investigations">
<input type="checkbox" name="areaoflaw" value="Sports
Claims">
<input type="checkbox" name="areaoflaw" value="Shipping
Law">
<input type="checkbox" name="areaoflaw" value="Tax
Law">
<input type="checkbox" name="areaoflaw" value="Travel
& Tourism">
<input type="checkbox" name="areaoflaw" value="Welfare
Benefits">
<!--- ON THE PROCESSING PAGE, CREATE A VAR THAT'S BLANK
--->
<cfset listone = "">
<cfif isDefined("FORM.areaoflaw")>
<cfloop list="#FORM.areaoflaw#" index="i">
<!--- APPEND EACH CHECKBOX VALUE THAT WAS SUBMITTED
--->
<cfset listone = ListAppend(listone, "#i#")>
</cfloop>
</cfif>
<cfquery name="insertsolicitor" datasource="law4essex"
dbtype="odbc">
INSERT INTO solicitors
(companyname,contactname,address1,address2,town,county,postcode,tel,fax,email,website,are aoflaw)
VALUES
('#companyname#','#contactname#','#address1#','#address2#','#town#','#county#','#postcode #','#tel#','#fax#','#email#','#website#',
'#i#')
</cfquery>
------------------------------------------------------------------------------------------ --------------------------
Similar Messages
-
SQL Query -How2bring multiple results into one field using Formatted Search
Hi Everyone
i am trying to bring in the results of the field dbo.Lot_ITEM.LOT using a formatted search into a row level using the following query:
SELECT dbo.LOT_ITEM.LOT
FROM dbo.DLN1 INNER JOIN dbo.LOT_ITEM ON dbo.DLN1.ItemCode = dbo.LOT_ITEM.ITEM
WHERE dbo.LOT_ITEM.ITEM=$[DLN1.ItemCode]
however the result of the dbo.Lot_ITEM.LOT field could be more then one value depending on how many lots are assigned for that item
(for example this query would be similar to assigning batch/serial numbers to an item being despatched - as you can choose multiple batches/serials depending on the quantities available and required and then move from the left to the right side of the selection window) if that makes sense!
is it possible to bring in the multiple results into one field? and how can i amend the above query to include this?
Thankyou in advance :o)
Edited by: Asma Bi on Apr 23, 2008 7:22 PM
Edited by: Asma Bi on Apr 23, 2008 7:24 PMHi Suda
Thanks for replying :o) but im not sure about the query?
just to simplify it (as the query im working with is to do with 3rd party addons) i have used the serial/batchs field instead and used standard demo database fields from SBO 2005 sp01:
SELECT dbo.ixvSerialNoFact.SRI1_IntrSerial
FROM dbo.DLN1 INNER JOIN
dbo.ixvSerialNoFact ON dbo.DLN1.DocEntry = dbo.ixvSerialNoFact.SRI1_BaseEntry
WHERE dbo.ixvSerialNoFact.ItemCode='g1000' and dbo.ixvSerialNoFact.SRI1_BaseEntry = '193'
The above brings me the relevant results but when i change it to be used in a formatted search:
SELECT dbo.ixvSerialNoFact.SRI1_IntrSerial
FROM dbo.DLN1 INNER JOIN
dbo.ixvSerialNoFact ON dbo.DLN1.DocEntry = dbo.ixvSerialNoFact.SRI1_BaseEntry
WHERE dbo.ixvSerialNoFact.ItemCode=$[dln1.itemcode] and dbo.ixvSerialNoFact.SRI1_BaseEntry = $[dln1.DocEntry]
i cant seem to get it to work - now this may be because the serial number is not allocated until teh record is added to the system, however when this happens i am unable to go back in and manually trigger the query as the delivery note rows cannot be selected!
i think as what im originally wanting an answer for is same as this example, im wanting to know if this is even possible?
Thanks
Edited by: Asma Bi on Apr 24, 2008 3:53 PM
Edited by: Asma Bi on Apr 24, 2008 3:55 PM -
BI for NW04S: Concatenating multiple chars into one field in BI query
Hi,
We have BI for NW04S. We have a requirement of concatenating multiple characteristics into one field in the BI report. This single field should have the usual drill down and other olap functionalities that a single characteristic usually enjoy in a BI report.
In BI for NW04 (Not the S) this probably can be done using the table interface in WAD. However in BI7 WAD functionality are through Java.
Also can this be done using Query designer alone.
Can anybody help?
ThanksHi,
Can you please elaborate on your Query designer option. You can always have a variable and in the user exit can write code, but what is not clear that
1> How will you acheive the contatenation done for every row of the report in the BEX user exit variable( since it's called during the beginning of the query execution and not for all rows of the report
2> How do you transfer the char variable into a char field in the report.
Please elaborate .
Thanks -
Get multiple values into one field
I want to get following two rows into one record.
Thank you in advance!
ID Name Category
109 John C1
109 John D8
Result:
ID Name Category
109 John C1, D8hi, i used centinul suggestion to create this is query.
WITH tablet AS
(SELECT '109' AS ID, 'John' AS NAME, 'C1' AS CATEGORY
FROM DUAL
UNION ALL
SELECT '109' AS ID, 'John' AS NAME, 'D8' AS CATEGORY
FROM DUAL)
SELECT ID, NAME,
LTRIM
(MAX (SYS_CONNECT_BY_PATH (CATEGORY, ','))KEEP (DENSE_RANK LAST ORDER BY ID),
) AS CATEGORY
FROM (SELECT ID, NAME, CATEGORY,
ROW_NUMBER () OVER (PARTITION BY ID ORDER BY CATEGORY)
AS curr,
ROW_NUMBER () OVER (PARTITION BY ID ORDER BY CATEGORY)
- 1 AS prev
FROM tablet)
GROUP BY ID, NAME
CONNECT BY prev = PRIOR curr AND ID = PRIOR ID
START WITH curr = 1;or
WITH tablet AS
(SELECT '109' AS ID, 'John' AS NAME, 'C1' AS CATEGORY
FROM DUAL
UNION ALL
SELECT '109' AS ID, 'John' AS NAME, 'D8' AS CATEGORY
FROM DUAL)
SELECT ID, NAME, SUBSTR (SYS_CONNECT_BY_PATH (CATEGORY, ','),
2)CATEGORY
FROM (SELECT ID, NAME, CATEGORY, COUNT (*) OVER (PARTITION BY ID) cnt,
ROW_NUMBER () OVER (PARTITION BY ID ORDER BY CATEGORY) seq
FROM tablet)
WHERE seq = cnt
START WITH seq = 1
CONNECT BY PRIOR seq + 1 = seq AND PRIOR ID = ID;Edited by: DeepakDevarapalli on Nov 12, 2009 2:45 PM
Edited by: DeepakDevarapalli on Nov 12, 2009 2:46 PM -
Multiple Checkbox Values Into One Field
Hopefully someone can help me with this issue I'm having.
I'm trying to save the values of multiple selected checkboxes into one field separated by commas through ADDT's Insert Transaction code. I can do this easily with DW's standard insert record wizard by using the PHP implode() function but I haven't been able to figure it out with ADDT's code.
<form>
<input type="checkbox" value="1" name="program[]" /> Program One
<input type="checkbox" value="2" name="program[]" /> Program Two
<input type="checkbox" value="3" name="program[]" /> Program Three
<input type="checkbox" value="4" name="program[]" /> Program Four
</form>
THIS IS ADDT'S CODING
$ins_quoteManager->addColumn("programs", "STRING_TYPE", "POST", "programs");
THIS WORKS VIA DREAMWEAVER'S INSERT RECORD WIZARD
Original: GetSQLValueString($_POST['programs'], "text"),
Modified: GetSQLValueString(implode(',',$_POST['programs']), "text"),
Anyone know how to modify the ADDT code with the implode function to get this to work?Have you tried ADDT´s "comma-separated checkboxes" form control, which will also store the values into a field of your choice (and of course retrieve them from there on update record - pages) ? The only possible drawback might be, that the checkboxes can´t be defined statically, means that the array of value/label - pairs will be retrieved from another table by establishing an additional recordset.
Cheers,
Günter -
How do I add multiple images into one file?
I'm sure this is something that's been covered in another post (or even in the help portal) but I think my wording in my search terms are not correct or... I don't know, because I just can't find what I'm looking for.
I want to know how to add multiple images into one file/one image, both horizontally and/or vertically. To give you an idea of what I mean, check out :
http://www.best10apps.com/apps/comic-story,531596060.html
If you scroll down, you'll see a heading entitled : Screenshots of Comic Story. Notice how there's 3 pictures (divided by borders). 2 of those pictures are side by side, and 1 of them is below the first 2 pictures.
I want to know how to add different pictures/images and put them into one picture.One way is to create template PSD files and populate them with your images using Photoshops scripts.
Photo Collage Toolkit UPDATED June 12, added Picture Package Support via PasteImageRoll and BatchPicturePackage scripts.
The package includes four simple rules to follow when making Photo Collage Template PSD files so they will be compatible with my Photoshop scripts.
There are eleven scripts in this package they provide the following functions:
TestCollageTemplate.jsx - Used to test a Photo Collage Template while you are making it with Photoshop.
CollageTemplateBuilder.jsx - Can build Templates compatible with this toolkit's scripts.
LayerToAlphaChan.jsx - Used to convert a Prototype Image Layer stack into a template document.
InteractivePopulateCollage.jsx - Used to interactively populate Any Photo Collage template. Offers most user control inserting pictures and text.
ReplaceCollageImage.jsx - use to replace a populated collage image Smart Object layer with an other image correctly resized and positioned.
ChangeTextSize.jsx - This script can be used to change Image stamps text size when the size used by the populating did not work well.
PopulateCollageTemplate.jsx - Used to Automatically populate a Photo Collage template and leave the populated copy open in Photoshop.
BatchOneImageCollage.jsx - Used to Automatically Batch Populate Collage templates that only have one image inserted. The Collage or Image may be stamped with text.
BatchMultiImageCollage.jsx - Used to Automatically Batch Populate Any Photo Collage template with images in a source image folder. Easier to use than the interactive script. Saved collages can be tweaked.
BatchPicturePackage.jsx - Used to Automatically Batch Populate Any Photo Collage template with an image in a source image folder
PasteImageRoll.jsx - Paste Images into a document to be print on roll paper.
Documentation and Examples -
I recently received a PIXMA MG7520 for a gift. It works great with my lenovo laptop/tablet running on Windos 8.0. The one drawback to the HP all-in-one that it replaced is it does not have an ADF. That being said, there must be some way to scan multiple pages into one pdf file. I need help figuring thing out. Thanks in advance!
Solved!
Go to Solution.Hi mdtolbert54,
There is a program that comes with the printer called the IJ Scan Utility that can assist you with scanning multiple pages into a single PDF document. To do this, please follow these steps:
1. On your keyboard, press the Windows key.
2. Start typing IJ SCAN UTILITY. The search window opens as you type. Once the IJ SCAN UTILITY is displayed, please select and open it.
3. In the Canon IJ Scan Utility window that opens, click SETTINGS.... in the bottom right of the window. The Settings dialog box appears.
4. Click the DOCUMENT SCAN option on the left pane of the window.
5. In the SAVE SETTINGS section of the window, you will select the save format and location of the document you are about to scan.
a.) In the FILE NAME field, specify the name you would like to give the file. By default the filename will begin with IMG; you can remove IMG and change it to whatever you would like to name the file.
b.) In the DATA FORMAT field, use the drop-down arrow to select the PDF (Multiple Pages) option.
c.) In the SAVE IN field, please navigate to the area where you would like the file to be saved once it is scanned in. By default, the file will be saved in the MY DOCUMENTS folder.
6. Once all settings have been selected, click the OK button at the bottom of the window to save the changes. The IJ Scan Utility main screen appears.
7. Click the DOCUMENT button. Scanning starts. Click the CANCEL button to cancel scanning if needed. Scanned items are saved in previously selected folder location specified in the SETTINGS... window.
If you find that you need advanced scanning options such as adjusting resolution, brightness, contrast, saturation, color balance, etc. in addition to the options selected above, please click on the SCANGEAR button on the IJ Scan Utility Main screen, then adjust the items as necessary.
Once the items above are set for document scanning, in the future, you will only need to launch the IJ Scan Utility, then press the DOCUMENT button to perform the scan (unless you want to make changes to the settings).
Hope this helps!
This didn't answer your question or issue? Please call or email us using one of the methods on the Contact Us page for further assistance.
Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well. -
Update multiple records on one page php/mysql
Hi folks,
I am trying to adapt a page to offer the option to update multiple records on one page.
The intention is to edit FAQ categories which are contained in a table with just two fields - the category and an id.
The page lists each categories in a form with a submit button which is then repeated for each record in the recordset.
Unfortunately my plan didn't work and only the first record updates as intended.
Can anyone suggest how I can make it work?
Here's the code I have so far.
************** The Update Code *****************
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
if (!isset($mm_abort_edit) || !$mm_abort_edit) {
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE faq_categories SET category=%s WHERE id=%s",
GetSQLValueString($_POST['category'], "text"),
GetSQLValueString($_POST['id'], "int"));
mysql_select_db($database_con_mysite, $con_mysite);
$Result1 = mysql_query($updateSQL, $con_mysite) or die(mysql_error());
$updateGoTo = "faq-category-edit.php
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
header(sprintf("Location: %s", $updateGoTo));
************** Update Code Ends *****************
************** The Form *****************
<form name="frm_editcategory" id="frm_editcategory" method="POST" action="<?php echo $editFormAction; ?>">
<?php do { ?>
<fieldset>
<input name="id" type="hidden" value="<?php echo $row_rs_faqcategory['id']; ?>" />
<input name="category" type="text" class="formrightcolumn" value="<?php echo $row_rs_faqcategory['category']; ?>" />
<input name="save" type="submit" class="submitbutton" id="save" value="save" />
</fieldset>
<input type="hidden" name="MM_update" value="form1" />
<?php } while ($row_rs_faqcategory = mysql_fetch_assoc($rs_faqcategory)); ?>
</form>
************** The Form Ends *****************
Cheers
DaveWhat does debugging tell you? What's the value of each of the variables? Did you try using regular echo statements to monitor what's going on? That's what I always do whenever I am stuck in my PHP coding.
-
Multiple delivery into One invoice
Dear All
Issue regarding multiple delivery into one invoice
1 When i am creating multiple delivery doc into one invoice, its possible for domestic[local sales] but when i am creating multiple delivery doc into one invoice for export it is not possible.
I have checked with the threads and tried it out with copy control with VBRK/VBRP [001/003/004]
Is there any specific customization for exports?
Regards
Sandeep BhowmickDear Lakshmipati
As per your instruction i have done the split analysis:
split analysis:
Split due to different header data
Field Name :$00000001 $00000002
Number of foreign trade data : 0000000266 0000000267
The invoice is generating against one delv document, it could not be combined. In copy control any changes i have to make
Regards
Sandeep Bhowmick
Edited by: Sandeep Bhowmick on Jan 17, 2009 7:33 AM
Edited by: Sandeep Bhowmick on Jan 17, 2009 7:34 AM -
I am looking for a way to enter multiple dates into a field without the form becoming too long.
This will be used by an old school bookeeper who needs the form to fit on one page.
Any ideas?Hi,
If you don't need the field to provide a date picker, verify it's a date, or don't need to sort the dates in the table, you can just use a text area field, and have your form filler enter the dates comma separated. Otherwise you'd have to add multiple fields. However, you can lessen the space each field takes up veritically, by using the "Labels Left" option (in the toolbar).
Thanks,
Todd -
How to invite multiple people into one chat?
when using the app why can't i invite multiple people into one chat i can only do one on one? just curious.
[Topic title updated by moderator to be more descriptive. Original topic title was: "the app"]I'm using the Skype app on IOS but the only way to have multiple people in one chat together we have to do it from a computer but not all of us have a computer on hand but we do have our phones and or tablets with us I was just wonder the the app didn't have those capabilities.
-
How do I scan multiple pages into one pdf document on a HP Envy 4501 Printer
My HP Envy 4501 Printer won't let me scan multiple pages into one pdf document.
I went to "Advanced Settings", clicked on "file" and made sure that the check box next to "Create a separate file for each scanner page" was unchecked.
When I clicked the Save button it showed the page that I scanned and showed 1/1. On the right side it had options for changing the brightness and Contrast, Rotate and Crop and "Back", "Save" and "Done" buttons, but nothing about scanning another page.
Not to mention HP's Customer Support is useless!
I'd appreciate any help I can get with this problem.
Thanks,
MarkHi BH,
I see your diagram. I just scanned something. The screen that I'm looking at right now shows the preview page and the scroll box to the left of that just like in your diagram. The screen does not show the + button nor does it show the red x button under the scroll box as in your diagram. I can't see the plus sign because it is not there.
I tried re-installing the software and drivers as you suggested but that did not have any affect.
Thank you for trying to help me with this problem but it hasn't worked, therefore I can't mark the reply "Accept as Solution".
I've noticed that on HP's support forum web page there is only 1 solved request for assistance. That doesn't give me much confidence in HP.
Please reply back to this post to let me know if there is anything else that I can try or if you know someone else at HP that can help.
If I don't here back from you, I'm returning this HP Envy 4501 Printer to get my money back to use it to buy a printer from one of HP's competitors.
Thanks,
Mark -
Scanning multiple pages into one document with an automatic document feeder
when using automatic document feeder to scan in multiple pages - using the Image Capture app, this process does not work for more than 2 pages. However works perfectly in PC environment.
Using a MacBook Pro with 10.8.4 and a Lexmark Interpret 405S All In One Scanner.
Is there any other all in one device that can perform this function in a Mac environment?
Please advise.Hi @FentyFly ,
I see by your post that you would like to know how to scan multiple pages into one file. I would like to help you out today.
From the HP Scan Software, click on the link for Advanced Settings, then uncheck Create a separate file for each scanned page.
Here is a URL for how to scan and change the settings. Just select your operating system.
Scan.
What operating system are you using? How to Find the Windows Edition and Version on Your Computer.
If you need further assistance, just let me know.
Have a great day!
Thank You.
Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
Gemini02
I work on behalf of HP -
How to concatenate multiple records into one
Hi everybody:
I want to know if exist some way to concat multiple records into one without using cursors. For example, I have a table named "Authors" like this:
Lan|Author
English|Ernest Hemingway
Spanish|Octavio Paz
Spanish|Mario Vargas Llosa
English|Sinclair Lewis
Spanish|Gabriel García Márquez
And I want to get this:
Author
Octavio Paz, Mario Vargas Llosa, Gabriel García Márquez
I have worked with SQL Server and I can do something like this:
CREATE FUNCTION dbo.MyConcat (@lan varchar(10))
RETURNS varchar(5000) AS
BEGIN
declare @retvalue varchar(5000)
set @retvalue=''
select @retvalue = @retvalue + Author +',' from Authors where lan = @lan
return substring(@retvalue,1,len(@retvalue)-1)
END
ie, do not use cursors to concatenate records. However, with ORACLE, I have to do someting like this.
FUNCTION MyConcat(P_Lan IN VARCHAR2) RETURN VARCHAR2 IS
v_ret VARCHAR2(4000);
v_element VARCHAR2(4000);
v_cursor sys_refcursor;
BEGIN
OPEN v_cursor FOR SELECT Author FROM Authors where Lan = P_Lan
LOOP
FETCH v_cursor INTO v_elemento;
EXIT WHEN v_cursor%NOTFOUND;
IF v_ret IS NULL THEN
v_ret := v_element;
ELSE
v_ret := v_ret || ', ' || v_element;
END IF;
END LOOP;
RETURN v_ret;
END;
Exist some other way to do this?
Best Regards
JackTks both for answer... I forgot to mention that I am using Oracle 10g. I read about LISTAGG() but this function is available for Oracle 11g release 2.
I wil read about the other techniques than Hoek mention
Best Regards.
Jack -
Scaning multiple pages into one file on a 4630
Using HP 4630 printer, windows 8.1, wireless connection.
Want to scan multiple pages into one file.
Per user manual, I work from the computer not the printer.
When first page is scanned am asked if I want to save, I click yes and name file.
When I scan second page am again asked if I want to save, my file name appears, I am told it already exists and asks if I want to keep or replace it.
Whichever one I click, only the second page is saved.
What am I doing wrong?
Question: How do I scan mutiple pages into a single document?
This question was solved.
View Solution.I accept this solution with many thanks! It was so obvious and I didn't see it. The User Manual should mention this.
Maybe you are looking for
-
Recently my Macbook Pro (June 2011, i7, 8gb RAM, 512gb SSD, AMD Radeon 6750, Mountain Lion - since July - currently 10.8.2) has been presenting me with an array of problems, usually initiated when I am streaming live video. I was streaming Time Warne
-
Display One time customer list and its transactions
Dear, When we use one time customer in sales order and invoice, we'll get an additional pop up window where we can input name and address of the one time customer. Where can i get the table they get stored? If i want to see the one time customer repo
-
Sun Fire V490 dropping network connnections
Hi We are having some issues on v490. Network connections are getting drop and users are getting given below error remote host : Connection reset by peer aocdbs02a:root# fmdump -v -u 5b137743-2acf-ceb5-bfde-f4604e3f6d4f TIME UUID SUNW-MSG-ID Nov 02 1
-
Replenishment Delivey (delivery type CL) data in VF04 NOT APPEARING
Dear Sir/Madam, In VF04 all Replenishment Delivey (CL) is not appearing. In VF04 for delivery related data after running the report iam selecting any line item and the click on Individual Billing Document so that i can create Billing Document. But i
-
I'm novice in Java, but not novice in programming. So, it is not a problem to understand and to write simple samples, but it is still hard to create a good package structure and give good names for classes. For example now, I started writing simple s