Spaces stripped out of query return values?
I have a form that has a SELECT list in which I'm trying to trick into displaying multiple columns in the select list. I'm doing this by how I'm returning the values from my query. I'm querying an Oracle database, and my query is: SELECT rpad(username, 20, chr(32))|| rpad(project_folder, 20, chr(32))|| rpad(project_file, 20, chr(32))|| rpad(to_char(blk_h, 'DD-MON-'), 20, chr(32)) listItemDisplay ,username||'/'||project_folder||'/'||project_file listItemValue FROM dids_project_file_info WHERE project_submitted = 'SUBMITTED' ORDER BY username, project_folder, project_file, blk_h So I'm basically trying to concatenate four values together, with spaces concatenated to the end of each value out to 20 characters for each value, and return it as one value (listItemDisplay). How when I execute this query against the database with any standard query tool, it displays the results correctly like this: COUTURGDStevens MMW--HRL 24-JUL-2002 COUTURGDStevens WaveBand-MMW18-JUL-2002 OHARAWTBLODGETTacoustic 08-APR-2002 My problem is that when I try to dynamically create the select list with the following code: #listItemDisplay# The displayed values come out with the padded spaces stripped of, and display like this: COUTURGD Stevens MMW--HRL 24-JUL-2002 COUTURGD Stevens WaveBand-MMW 18-JUL-2002 OHARAWT BLODGETT acoustic 08-APR-2002 Does anyone have any ideas why these spaces are being stripped, and how I might be able to keep them so that the values are displayed in the list correctly (as columns)? Any ideas would be greatly appreciated. Thanks in advance. ::YEX:: /* || Robert D. Yexley || Oracle Programmer/Analyst || Easylink Services Corporation || Professional Services || Contractor - Wright Research Site MIS || Det-1 AFRL/WSI Bldg. 45 Rm. 062 || (937) 255-1984 || [EMAIL PROTECTED] || <)))>< */ <> __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Spaces stripped out of query return values?
It's an HTML thing, it will reduce many spaces to one, try replacing the spaces with Ade -Original Message- From: Yexley Robert D Contr Det 1 AFRL/WSI [mailto:[EMAIL PROTECTED]] Sent: 29 July 2002 17:06 To: CF-Talk Subject: Spaces stripped out of query return values? I have a form that has a SELECT list in which I'm trying to trick into displaying multiple columns in the select list. I'm doing this by how I'm returning the values from my query. I'm querying an Oracle database, and my query is: SELECT rpad(username, 20, chr(32))|| rpad(project_folder, 20, chr(32))|| rpad(project_file, 20, chr(32))|| rpad(to_char(blk_h, 'DD-MON-'), 20, chr(32)) listItemDisplay ,username||'/'||project_folder||'/'||project_file listItemValue FROM dids_project_file_info WHERE project_submitted = 'SUBMITTED' ORDER BY username, project_folder, project_file, blk_h So I'm basically trying to concatenate four values together, with spaces concatenated to the end of each value out to 20 characters for each value, and return it as one value (listItemDisplay). How when I execute this query against the database with any standard query tool, it displays the results correctly like this: COUTURGDStevens MMW--HRL 24-JUL-2002 COUTURGDStevens WaveBand-MMW 18-JUL-2002 OHARAWTBLODGETTacoustic 08-APR-2002 My problem is that when I try to dynamically create the select list with the following code: #listItemDisplay# The displayed values come out with the padded spaces stripped of, and display like this: COUTURGD Stevens MMW--HRL 24-JUL-2002 COUTURGD Stevens WaveBand-MMW 18-JUL-2002 OHARAWT BLODGETT acoustic 08-APR-2002 Does anyone have any ideas why these spaces are being stripped, and how I might be able to keep them so that the values are displayed in the list correctly (as columns)? Any ideas would be greatly appreciated. Thanks in advance. ::YEX:: /* || Robert D. Yexley || Oracle Programmer/Analyst || Easylink Services Corporation || Professional Services || Contractor - Wright Research Site MIS || Det-1 AFRL/WSI Bldg. 45 Rm. 062 || (937) 255-1984 || [EMAIL PROTECTED] || <)))>< */ <> __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Spaces stripped out of query return values?
DOH!! I should have known that. I've been trying since I got your original response to figure out a way to trick it and to put in in place of spaces, but I haven't been able to get it working. Does anyone happen to know of a way to get around this? Bob <)))>< -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED]] Sent: Monday, July 29, 2002 12:13 PM To: CF-Talk Subject: RE: Spaces stripped out of query return values? It's an HTML thing, it will reduce many spaces to one, try replacing the spaces with Ade -Original Message- From: Yexley Robert D Contr Det 1 AFRL/WSI [mailto:[EMAIL PROTECTED]] Sent: 29 July 2002 17:06 To: CF-Talk Subject: Spaces stripped out of query return values? I have a form that has a SELECT list in which I'm trying to trick into displaying multiple columns in the select list. I'm doing this by how I'm returning the values from my query. I'm querying an Oracle database, and my query is: SELECT rpad(username, 20, chr(32))|| rpad(project_folder, 20, chr(32))|| rpad(project_file, 20, chr(32))|| rpad(to_char(blk_h, 'DD-MON-'), 20, chr(32)) listItemDisplay ,username||'/'||project_folder||'/'||project_file listItemValue FROM dids_project_file_info WHERE project_submitted = 'SUBMITTED' ORDER BY username, project_folder, project_file, blk_h So I'm basically trying to concatenate four values together, with spaces concatenated to the end of each value out to 20 characters for each value, and return it as one value (listItemDisplay). How when I execute this query against the database with any standard query tool, it displays the results correctly like this: COUTURGDStevens MMW--HRL 24-JUL-2002 COUTURGDStevens WaveBand-MMW 18-JUL-2002 OHARAWTBLODGETTacoustic 08-APR-2002 My problem is that when I try to dynamically create the select list with the following code: #listItemDisplay# The displayed values come out with the padded spaces stripped of, and display like this: COUTURGD Stevens MMW--HRL 24-JUL-2002 COUTURGD Stevens WaveBand-MMW 18-JUL-2002 OHARAWT BLODGETT acoustic 08-APR-2002 Does anyone have any ideas why these spaces are being stripped, and how I might be able to keep them so that the values are displayed in the list correctly (as columns)? Any ideas would be greatly appreciated. Thanks in advance. ::YEX:: /* || Robert D. Yexley || Oracle Programmer/Analyst || Easylink Services Corporation || Professional Services || Contractor - Wright Research Site MIS || Det-1 AFRL/WSI Bldg. 45 Rm. 062 || (937) 255-1984 || [EMAIL PROTECTED] || <)))>< */ <> __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: Spaces stripped out of query return values?
have you tried HtmlEditFormat() Douglas Brown Email: [EMAIL PROTECTED] - Original Message - From: "Yexley Robert D Contr Det 1 AFRL/WSI" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, July 29, 2002 10:10 AM Subject: RE: Spaces stripped out of query return values? > DOH!! I should have known that. I've been trying since I got your original response to figure out a way to trick it and to put in in place of spaces, but I haven't been able to get it working. Does anyone happen to know of a way to get around this? > > Bob > <)))>< > > > -Original Message- > From: Adrian Lynch [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 29, 2002 12:13 PM > To: CF-Talk > Subject: RE: Spaces stripped out of query return values? > > > It's an HTML thing, it will reduce many spaces to one, try replacing the spaces with > > Ade > > -Original Message- > From: Yexley Robert D Contr Det 1 AFRL/WSI [mailto:[EMAIL PROTECTED]] > Sent: 29 July 2002 17:06 > To: CF-Talk > Subject: Spaces stripped out of query return values? > > > I have a form that has a SELECT list in which I'm trying to trick into displaying multiple columns in the select list. I'm doing this by how I'm returning the values from my query. I'm querying an Oracle database, and my query is: > > name="defaultList" > dataSource=#dataSource#> > SELECT rpad(username, 20, chr(32))|| >rpad(project_folder, 20, chr(32))|| >rpad(project_file, 20, chr(32))|| >rpad(to_char(blk_h, 'DD-MON-'), 20, chr(32)) listItemDisplay > ,username||'/'||project_folder||'/'||project_file listItemValue > FROM dids_project_file_info > WHERE project_submitted = 'SUBMITTED' > ORDER BY username, project_folder, project_file, blk_h > > So I'm basically trying to concatenate four values together, with spaces concatenated to the end of each value out to 20 characters for each value, and return it as one value (listItemDisplay). How when I execute this query against the database with any standard query tool, it displays the results correctly like this: > > COUTURGDStevens MMW--HRL > 24-JUL-2002 > COUTURGDStevens WaveBand-MMW > 18-JUL-2002 > OHARAWTBLODGETTacoustic > 08-APR-2002 > > My problem is that when I try to dynamically create the select list with the following code: > > style="width: 450px"> > > #listItemDisplay# > > > > The displayed values come out with the padded spaces stripped of, and display like this: > > COUTURGD Stevens MMW--HRL 24-JUL-2002 > COUTURGD Stevens WaveBand-MMW 18-JUL-2002 > OHARAWT BLODGETT acoustic 08-APR-2002 > > Does anyone have any ideas why these spaces are being stripped, and how I might be able to keep them so that the values are displayed in the list correctly (as columns)? Any ideas would be greatly appreciated. Thanks in advance. > > ::YEX:: > > /* > || Robert D. Yexley > || Oracle Programmer/Analyst > || Easylink Services Corporation > || Professional Services > || Contractor - Wright Research Site MIS > || Det-1 AFRL/WSI Bldg. 45 Rm. 062 > || (937) 255-1984 > || [EMAIL PROTECTED] > || <)))>< > */ > > <> > > > > __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Spaces stripped out of query return values?
Change your query to: SELECT replace(rpad(username, 20, chr(7))|| rpad(project_folder, 20, chr(7))|| rpad(project_file, 20, chr(7))|| rpad(to_char(blk_h, 'DD-MON-'), 20, chr(7)), chr(7), ' ') listItemDisplay You'll want to use a non-printable character for the rpad so you don't end up replacing something in your data. Dan -Original Message- From: Yexley Robert D Contr Det 1 AFRL/WSI [mailto:[EMAIL PROTECTED]] Sent: Monday, July 29, 2002 10:10 AM To: CF-Talk Subject: RE: Spaces stripped out of query return values? DOH!! I should have known that. I've been trying since I got your original response to figure out a way to trick it and to put in in place of spaces, but I haven't been able to get it working. Does anyone happen to know of a way to get around this? Bob <)))>< -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED]] Sent: Monday, July 29, 2002 12:13 PM To: CF-Talk Subject: RE: Spaces stripped out of query return values? It's an HTML thing, it will reduce many spaces to one, try replacing the spaces with Ade -Original Message- From: Yexley Robert D Contr Det 1 AFRL/WSI [mailto:[EMAIL PROTECTED]] Sent: 29 July 2002 17:06 To: CF-Talk Subject: Spaces stripped out of query return values? I have a form that has a SELECT list in which I'm trying to trick into displaying multiple columns in the select list. I'm doing this by how I'm returning the values from my query. I'm querying an Oracle database, and my query is: SELECT rpad(username, 20, chr(32))|| rpad(project_folder, 20, chr(32))|| rpad(project_file, 20, chr(32))|| rpad(to_char(blk_h, 'DD-MON-'), 20, chr(32)) listItemDisplay ,username||'/'||project_folder||'/'||project_file listItemValue FROM dids_project_file_info WHERE project_submitted = 'SUBMITTED' ORDER BY username, project_folder, project_file, blk_h So I'm basically trying to concatenate four values together, with spaces concatenated to the end of each value out to 20 characters for each value, and return it as one value (listItemDisplay). How when I execute this query against the database with any standard query tool, it displays the results correctly like this: COUTURGDStevens MMW--HRL 24-JUL-2002 COUTURGDStevens WaveBand-MMW 18-JUL-2002 OHARAWTBLODGETTacoustic 08-APR-2002 My problem is that when I try to dynamically create the select list with the following code: #listItemDisplay# The displayed values come out with the padded spaces stripped of, and display like this: COUTURGD Stevens MMW--HRL 24-JUL-2002 COUTURGD Stevens WaveBand-MMW 18-JUL-2002 OHARAWT BLODGETT acoustic 08-APR-2002 Does anyone have any ideas why these spaces are being stripped, and how I might be able to keep them so that the values are displayed in the list correctly (as columns)? Any ideas would be greatly appreciated. Thanks in advance. ::YEX:: /* || Robert D. Yexley || Oracle Programmer/Analyst || Easylink Services Corporation || Professional Services || Contractor - Wright Research Site MIS || Det-1 AFRL/WSI Bldg. 45 Rm. 062 || (937) 255-1984 || [EMAIL PROTECTED] || <)))>< */ <> __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Spaces stripped out of query return values?
Well, once you have done your SQL statement, I am assuming that you have strings padded out to the 20 characters or whatever with spaces. Since the problem is at the HTML level, you can--at the CFML level--just replace " " with " ". So, You might have to wrap the Replace() function in # signs (I can never get that right without actually running the code!) In any case, since you are doing this for the entire query set, you may want to CFLOOP through the query and use StructUpdate (see ColdFusion help file) to change the query values to your new values. I hope this is helpful, Matthieu -Original Message- From: Yexley Robert D Contr Det 1 AFRL/WSI [mailto:[EMAIL PROTECTED]] Sent: Monday, July 29, 2002 1:10 PM To: CF-Talk Subject: RE: Spaces stripped out of query return values? DOH!! I should have known that. I've been trying since I got your original response to figure out a way to trick it and to put in in place of spaces, but I haven't been able to get it working. Does anyone happen to know of a way to get around this? Bob <)))>< -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED]] Sent: Monday, July 29, 2002 12:13 PM To: CF-Talk Subject: RE: Spaces stripped out of query return values? It's an HTML thing, it will reduce many spaces to one, try replacing the spaces with Ade -Original Message- From: Yexley Robert D Contr Det 1 AFRL/WSI [mailto:[EMAIL PROTECTED]] Sent: 29 July 2002 17:06 To: CF-Talk Subject: Spaces stripped out of query return values? I have a form that has a SELECT list in which I'm trying to trick into displaying multiple columns in the select list. I'm doing this by how I'm returning the values from my query. I'm querying an Oracle database, and my query is: SELECT rpad(username, 20, chr(32))|| rpad(project_folder, 20, chr(32))|| rpad(project_file, 20, chr(32))|| rpad(to_char(blk_h, 'DD-MON-'), 20, chr(32)) listItemDisplay ,username||'/'||project_folder||'/'||project_file listItemValue FROM dids_project_file_info WHERE project_submitted = 'SUBMITTED' ORDER BY username, project_folder, project_file, blk_h So I'm basically trying to concatenate four values together, with spaces concatenated to the end of each value out to 20 characters for each value, and return it as one value (listItemDisplay). How when I execute this query against the database with any standard query tool, it displays the results correctly like this: COUTURGDStevens MMW--HRL 24-JUL-2002 COUTURGDStevens WaveBand-MMW 18-JUL-2002 OHARAWTBLODGETTacoustic 08-APR-2002 My problem is that when I try to dynamically create the select list with the following code: #listItemDisplay# The displayed values come out with the padded spaces stripped of, and display like this: COUTURGD Stevens MMW--HRL 24-JUL-2002 COUTURGD Stevens WaveBand-MMW 18-JUL-2002 OHARAWT BLODGETT acoustic 08-APR-2002 Does anyone have any ideas why these spaces are being stripped, and how I might be able to keep them so that the values are displayed in the list correctly (as columns)? Any ideas would be greatly appreciated. Thanks in advance. ::YEX:: /* || Robert D. Yexley || Oracle Programmer/Analyst || Easylink Services Corporation || Professional Services || Contractor - Wright Research Site MIS || Det-1 AFRL/WSI Bldg. 45 Rm. 062 || (937) 255-1984 || [EMAIL PROTECTED] || <)))>< */ <> __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists