Solved

Help converting from MS SQL

Posted on 2011-02-22
1
222 Views
Last Modified: 2012-06-27
I don't think some of these functions are available to mySQL.  I am new to using it and wonder if anyone can help.


Here is a much shortened version of the script.  I think it has to do wth the @@rowcount, begin, end syntax...


UPDATE bp_item
                                    SET ItemID=<cfqueryparam cfsqltype="cf_sql_varchar"  value="#thisItem.itemId[1]#">                        
                                    WHERE ItemID= '#thisItem.itemId[1]#'                        
                                    IF @@ROWCOUNT = 0
                                    BEGIN
                                          INSERT INTO item
                                                            (KeywordID)
                                                VALUES
                                                            (<cfqueryparam cfsqltype="cf_sql_integer"  value="#getNextKeywords.keyword_ID#">)
                                    END




Thank you
0
Comment
Question by:theideabulb
1 Comment
 
LVL 15

Accepted Solution

by:
pateljitu earned 500 total points
ID: 34957561
Please try this article which explain the use of FOUND_ROWS();

SELECT SQL_CALC_FOUND_ROWS * FROM tbl_name WHERE id > 100;
SELECT FOUND_ROWS();

http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_found-rows
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Introduction In this installment of my SQL tidbits, I will be looking at parsing Extensible Markup Language (XML) directly passed as string parameters to MySQL 5.1.5 or higher. These would be instances where LOAD_FILE (http://dev.mysql.com/doc/refm…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now