Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: minli98
  • Content: Threads
  • Order by date
  1. minli98

    Storing cf variables in database

    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...
  2. minli98

    Passing an event object

    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"...
  3. minli98

    How to group data from two tables

    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...
  4. minli98

    Replacing special character ’

    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...
  5. minli98

    Alternative to Query Analyzer

    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...
  6. minli98

    Help with 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...
  7. minli98

    Updating records

    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...
  8. minli98

    Using Sum function within Union

    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...
  9. minli98

    How to make xmlparse case insensitive

    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...
  10. minli98

    Can I change the name of an ID?

    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"...
  11. minli98

    How to insert optional parameters using cfqueryparam

    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...
  12. minli98

    Is there a way to open a page in a new browser tab

    Hi, Is there a way to use javascript to open a page in a new browser tab or in a pre-existing tab? Thank you. Min
  13. minli98

    Extracting from records

    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...
  14. minli98

    Need help writing an insert query

    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...
  15. minli98

    cfdump in cfmail

    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...
  16. minli98

    Query to List

    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...
  17. minli98

    Subquery with 2 fields

    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...
  18. minli98

    Calculating column from another column

    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...
  19. minli98

    Need help with query syntax

    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...
  20. minli98

    Update Query with function

    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...

Part and Inventory Search

Back
Top