Tag: mysql

Fixing mysql error #1064

I have a query which works fine in MSSQL but giving #1064 error in MYSQL. Please help me to identify the error? Thanks in advance UPDATE setup_business_rule SET BR_NAME=’SEND_EMAIL_AFTER_TICKET_OPEN edit’, BR_DESC=’Send notification email when new ticket was created.’, BR_CATEGORY=’Desktop’, STATUS=’False’, SMS=’False’, EMAIL=’True’, CONDITION=’ [TICKETSTATUS] [=] [STATUSOPEN]’, OCCURS_CREATE=’True’, OCCURS_UPDATE=’True’, TARGET_SMS=”, ACTION_ON=’Notification’, TARGET_EMAIL=’ [techsupport@macrokiosk.com] [Contact Email]’, TARGET_MESSAGE=’message’, […]

WebSphere 6.1 CE Recovery error: SQLServerException: Could not find stored procedure 'master..xp_sqljdbc_xa_recover'

Hi I have inherited a a Websphere 6.1 Community Edition that hosts several applications. They all use the same pooled DB connections to MySql. Yesterday the connection pool would run out after about 2 hours requiring a server restart… ever 2 hours…. not great. So tonight I have all the modules stopped and am going […]

Transferring MSSQL Stored Procedures to MySQL

I have an MSSQL stored procedure as follows :- CREATE PROCEDURE [dbo].[user_CheckEMail] @Email nvarchar(200) AS BEGIN IF EXISTS (SELECT * FROM user_Data WHERE EMail = @Email) BEGIN RETURN 1 END ELSE BEGIN RETURN 0 END END In changing to MySQL I know that certain things need to change. This is what I have :- CREATE […]

How to get the First day and last day of the month from given month and year in sql

Hi I have a month number and year eg : month 2 and year 2014 how can i get the first day of that month like 2014-02-01 and last day of month 2014-02-28? i have seen many posts on getting first and last date of month based on given date,but i need it based on […]

How to fillter data from result of sql query in sql

i have a sql query SELECT MenuID, Text, ParentID, Refcode FROM Menu E1 WHERE E1.RefCode IN (0,50,51,60,63,57) It will produce result set MenuID Text ParentID Refcode ———– ————————————————– ———– ———- 1 Product NULL 0 2 Applications NULL 0 3 Document NULL 0 4 Support NULL 0 6 Background 1 0 7 Details 1 50 8 […]

SQL BLOBs don't end with a null. How do I make it?

So I am using a java SQL api to insert some BLOB data into a table. However, Since the SQL apparently doesn’t know that I just want the string to end, it just pads it with zeros. So I have 10 charachters of data followed by a gazillion zeros at the end. How should I […]

SQL Date Wildcards

I am using sql to write up a query in which I am trying to choose records that have their date_from column (of type date/time) that satisfy these conditions: it can be any year months are june, july, august and september AND IF IT IS JUNE, IT SHOULD CONSIDER FROM THE 15th JUNE ONWARDS Here’s […]

multiple databases transactions: mysql, SQL server and PHP

I am building a code with YII / PHP that speaks to two databases a MYSQL and SQL Server. There are two operations taking place: Writing to MYSQL and Writing to SQL Server. Is there a way to make them atomic ? Currently I’m doing the following: $tran1=…$db->beginTransaction(); …..db1…code $tran2=$db2->beginTransaction(); …….. $tran1->commit(); $tran2->commit(); Wondering if […]

SQL Server implementation of MySQL's “new” functionality?

MySQL has this incredibly useful yet proprietary record holding the “new row”(NEW). I wonder if there is any SQL server command to replace the New in MySQL. In mysql, in a trigger, I would use something like this. INSERT INTO products(idProduct,idReference,date) VALUES (NEW.idProduct,idReference,NOW()); However I don’t know how if is it possible to do the […]

#1452 – Cannot add or update a child row, REFERENCES `eav_attribute`

I have read all the answer, however I am not a guru guy in things like that… I want to install magento database to my local computer host that runs on xampp, however I keep getting an error: SQL query: – – — Constraints for table catalog_eav_attribute — ALTER TABLE catalog_eav_attribute ADD CONSTRAINT FK_CATALOG_EAV_ATTRIBUTE_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID FOREIGN […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.