Hi,
I am storing in database some text that has coldfusion variables in it. For example:
This is page #url.pageNum#
When I retrieve this text from the db and display it using cfoutput, the #url.pageNum# does not get processed. Instead, it is shown as a text. What do I do in order to get the...
Hi,
I am learning how to use event in javascript and I have a basic question about passing an event object.
I know that the following is the basic method (for Firefox anyway)
<script>
function processEvent(e){
alert(e.clientX);
}
</script>
<html>
<input type="button" value="Click"...
Hi,
Say I have two tables, visitTbl which is used to keep track of each web visit (by users) and transactionTbl, which is used to keep track of each transaction made by users.
visitTbl:
VisitDate
UserId
transactionTbl:
TransactionDate
UserId
TransactionType
I'd like to create a report that...
Hi,
Does anyone know why when I run #chr(asc(’))# I get â instead of the original character ’? FYI, this character is the single quote in Microsoft Word. I am trying to replace it with the regular single-quote ' but I am having a hard time. I tried using #replace(strVal,"’","'","all")# but it...
Hi,
I was trying to install MS SQL Query Analyzer for my laptop, but I found out that the product has been discontinued. Does anyone know of a good Windows based alternative that is free and small (don't want to install a whole package of programs that I don't use). The database is MS SQL...
Hi,
I have a simple table to keep track of marathon runners and their time in the events that they run in. The table has 3 fields: Runner's name, EventID, Run Time.
So, for example,
Name EventId Time
A 1 2:15
B 1 2:11
C 1 2:12
....
B...
Hi,
I have a simple table with two keys: ID and count. Now I have a list of id's with their corresponding count that I want to integrate into the table in the following manner:
If ID exists in the table, update the count by adding the count in the table with the new count.
If ID does not...
Hi,
I am trying to combine data from 2 tables using union.
Suppose I have two tables A and B. They both have the same structure:
Table A:
ProductID Qty
1200 1
1201 2
1200 2
1202 1
Table B:
ProductID Qty
1200 3
1201 1
1202 2
1202 3
So each...
I am trying to read in an xml document:
<Customer id="1">
<Name>Aaron Long</name>
<ReturnAddress>123 Main St</returnaddress>
</customer>
However, when I use xmlparse(xmlText,'no'), it gives me an error message:
It seems that xmlparse does not recognize </name> as the end-tag of...
Hi,
I am trying to build a simple dynamic table where users can insert a new row anywhere in the table. Each row has a textfield that are identified using the row number that it is in.
<tr><td><input id="field1" type="textfield" /></td></tr>
<tr><td><input id="field2" type="textfield"...
Hi,
Say I have a page that takes in 8 url parameters (url.A, url.B, url.C, ...). Now I want to insert this into my table using <cfqueryparam>
<cfquery>
insert into tableX(colA, colB, colC, ...)
values(<cfqueryparam value="#url.A#" cfsqltype="cf_sql_varchar"),
<cfqueryparam...
Hi,
I have a table where each row in column X contains product ids separated by commas.
X
Row 1 123,334,445
Row 2 223,123
Row 3 033,445,110,331
How can I write a query that returns each product id in a row? In the above example, the query would return
Query
Row 1 123...
Hi,
I have a database table DbTable containing 3 columns: Key1, Key2, and Value.
Now, in coldfusion, I have created a coldfusion query MyQuery that contains the same 3 columns. After I populate MyQuery with some rows, I would like to upload/insert into DbTable the rows whose 2 keys are not...
Hi,
In my cfcatch, I am trying to set up an email of cfdump of all session variables. However, the email received is hard to read. All the cfdump formatting is lost. I have tried the following two methods:
<cfmail...>
<cfdump var="#session.transaction#">
</cfmail>
<cfsavecontent...
Hi,
Is there a function that automatically converts query results to a list? I thought I read somewhere that there is one, but couldn't find it now. Or do I need to use cfloop to append query results to the list one by one?
<cfquery name="getProductId">
select productId
from product...
Hi,
Say I want to do a query to look up all products (and their info) that meet certain criteria in the Sales table. I would write it:
select *
from product
where productId in
(select productId from Sales where <Condition>)
But what if I want to match the subquery with the productId and...
Hi all,
I have a very basic question. Suppose I do a query to produce 3 columns: A, B and C. A and B are the results of functionA and functionB respectively. C is the sum of B and C.
So I would try,
select functionA(x) as A, functionB(x) as B, C = A + B
from tableName
But this gives me...
Hi,
I need help writing a query statement. Say I have a sales table with two columns: SalesDate and ProductID. I want to calculate a variable x for each ProductID using the following function:
x(ProductId) = sum_for_all_sales_of_ProductId{
if...
Hi all,
Say, I have a database table with columns X and Y. Column X contains some strings, and I want to parse these strings and place the results in column Y.
So I created the udf parseFunction(StringInput), but how do I run the update query in ColdFusion?
When I tried the following...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.