Solved

Help converting from MS SQL

Posted on 2011-02-22
1
230 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
This guide whil teach how to setup live replication (database mirroring) on 2 servers for backup or other purposes. In our example situation we have this network schema (see atachment). We need to replicate EVERY executed SQL query on server 1 to…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

756 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