Ask a Question related to Coldfusion Database Access, Design and Development.
-
kruse #1
Retrive data from attribute spaced attribute.
Hi.
I'm retrieving data from an excel sheet.
But one of the attributes is name "Phone private".
This is a problem when I want to write out the value.
Of cause it fails if I do this #Data. Phone private#.
How can I retrieve that value? Is it possible.
I would prefer not to rename the attribute in the excel sheet.
Best regards,
Morten
kruse Guest
-
Add attribute to tag
What files do i look for to modify to add attributes to a tag? I want it to suggest more attributes when i open specific tags. I've been trying to... -
Dot path to data attribute question
HI!! I have a question about what the best way is to build a dot path to a data attribute. I am trying to get the data in this attribute ... -
Looking For Hide Attribute
I'm looking for a way to hide a field from being displayed. Currently I have it set as READONLY, but some users are confused and think the field is... -
Retrieving XML attribute using XML::XPath::Node::Attribute
Hi I am trying to retrieve an attribute of a particular node from my XML using "XML::XPath::Node::Attribute", but couldn't come across on how to... -
Add Attribute to <TD>
Does anybody know how to add the html 'nowrap' attribute to a particular column in a datagrid? This doesn't work, because I suspect the... -
reenaroy #2
Re: Retrive data from attribute spaced attribute.
Try this...
<cfquery datasource="xyz" name="Data">
select [phone private] as phone from testTable
</cfquery>
<cfoutput>
#Data.phone #
</cfoutput>
reenaroy Guest
-
kruse #3
Re: Retrive data from attribute spaced attribute.
Originally posted by: reenaroy
Try this...
<cfquery datasource="xyz" name="Data">
select [phone private] as phone from testTable
</cfquery>
<cfoutput>
#Data.phone #
</cfoutput>
I guess that that would work.
But for me it is not possible to do so because I dont know what data the sheet
will contain.
I retrieve the data like this.
<cfquery name="GetImportData" datasource="Excel">
SELECT *
FROM [sheet1$]
IN '#Form.FileName#' 'EXCEL 5.0;'
</cfquery>
The sheet can be 5 differet type and therfore I waunt use use your example
because I then had to make 5 different queryes and if a field in the sheet was
altered i had to change the query too.
Any other ideas?
kruse Guest
-
reenaroy #4
Re: Retrive data from attribute spaced attribute.
Hi Kruse
Use QoQ for this. Full code will look like this
<cfquery name="GetImportData" datasource="Excel">
SELECT * FROM [sheet1$] IN '#Form.FileName#' 'EXCEL 5.0;'
</cfquery>
<cfquery dbtype="query" name="Data">
select [phone private] as phone from GetImportData
</cfquery>
<cfoutput>
#Data.phone #
</cfoutput>
reenaroy Guest



Reply With Quote

