Pervasive.SQL to MySQL CONVERT syntax

I've been trying for weeks trying to look for the right MySQL syntax for the following Pervasive.SQL statement.

SELECT LEFT(CONVERT OCLYearMonth,SQL_CHAR,4)+' '+LEFT(MONTHNAME(convert('1900-'+RIGHT(CONVERT(OCLYearMonth,SQL_CHAR),2)+'-01',SQL_DATE)),3) AS YearMnth
,OCLYearMonth,OCLCode,OCLBillNo,OCLORPayment,OCLORNo,OCLORDate,OCLORTeller,OCLModifyby,OCLModifydate
FROM ConsOtherLedger WHERE OCLTown=':1' AND OCLRoute=':2' AND OCLAccount=':3 ' AND OCLCode=':4'

Whenever I execute the above query in MySQL database, it gives me the error below.

Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near y'OCLYearMonth,SQL_CHAR,4)+' '+LEFT(MONTHNAME(convert('1900-'+RIGHT(CONVERT(OCLYea' at line 1 (State:37000, Native Code: 428)

Can anybody help? What the right MySQL statement?

Microsoft SQL Server Convert syntax for CREATE TABLE statement [desc]

I am attempting to port a SQL 2000 database over and the MS SQL server allows for table names such as 'DESC' as long as they are ebcapsulated in brackets like this: [DESC] I haven't been able to find an equivalent using MySQL yet on this forum or in the MySQL (SAMS) book I have. I tried things like ...

MySQL SQL scripting troubles (syntax question)

At home I installed MySQL server 4.1 recently. I've developped a database, and created some queries (people do that nowadays) Now one of these queries is this: update allocation set allocated = 1, allname = 'Quinten' where tsnr = (select tsnumber from timeshifts where tsname = 'timeshift 3') and pos ...

I need halp converting MS SQL stored procedure syntax to MySQL please.

I am new to MySQL and am presently trying to convert some of my stored procedures from MS SQL. Can someone pl help me with the MySQL syntax for the following: Stored Proc 1: ================================================================================= CREATE PROCEDURE dbo.sp_RetrieveNewFilesByMe ...

MySQL Convert VBA Code into SQL

How would I convert the following code in to an SQL statement? ================================================================ TheRank = 0 VRating = 0 N = 1 SQL = "SELECT * FROM [tbl SchoolAssessments] WHERE ((([tbl SchoolAssessments].SchoolID)=" & SchoolID & ")) " _ ...

MySQL convert CSV file to SQL database

i have this existing table of four columns and about 64 thousand rows as a csv file. is there a way i can convert these comma separated values to a valid mysql database without spending a fortune any help appreciated ...

MySQL convert data ms exel to sql database ?

How do I convert data ms exel to sql database ? Please help Thank you PLC ...

MySQL sql to convert row weekly to daily

i have data of man hour form weekly activity from day1 to day 5 started from weekending date as the following: +----------+--------+----+----+ |WeekEnding|Activity|Day1|Day2| +----------+--------+----+----+ |2009-08-09|Task 1 | 8| 9| +----------+--------+----+----+ |2009-08-11|Task 2 | 10| 11| +---- ...

Pervasive SQL to mySQL

I have an application that uses Novell Pervasive SQL and would like to convert it to mySQL. Will this tool allow me to convert those databases without buying a copy of Pervasive? ...

Microsoft SQL Server Convert T-SQL Stored Procedure to MySQL

Could anyone please help to to convert this T-SQL stored procedure to MySQL store procedure?Is there any tool to do this task? I've many stored procedures to be converted! ----------- CREATE PROCEDURE TT_AddProject ( @Name nvarchar(50), @Description nvarchar(1024), @ManagerUserID int, @EstCompletion ...

Microsoft SQL Server CONVERT in MySQL?

I have a script that uses the embedded CONVERT function on an insert: CONVERT(VARBINARY(10), 'John McCain'), What is the equivalent in MySQL? ...

Microsoft SQL Server Convert a Large MySQL DB TO MS-SQL

I have a large MySQL Database that has MyISAM Tables and InnoDB Tables also. I am experiencing performance issues with some of these tables and I want to convert the DB to a MS-SQL DB in the most efficent but safets way possible. Does anybody know of any Open Source tools to achieve this. ...

Microsoft SQL Server Convert Stored Procedure of MS SQL to MYSQL

I am facing problem to convert the stored procedure which in the below.Please could anybody solve it ASAP. CREATE Procedure IDISV2_GenerateBills ( @CollectionUnitId bigint, @SocietyId bigint, @FromDate datetime, @Todate datetime, @UserID Varchar(50) ) AS declare @CanGenerate bigint Begin Select @Can ...

Microsoft SQL Server convert ms sql query to mysql

1 have a table with this structure and data ID UserID IP ---------------------------------- 1 1 127.0.0.1 2 1 127.0.0.1 3 1 127.0.0.1 4 1 127.0.0.1 5 1 127.0.0.1 6 1 127.0.0.1 7 1 4.2.2.2 8 1 4.2.2.2 9 1 4.2.2.2 10 1 4.2.2.2 11 1 4.2.2.2 12 1 192.168.1.1 1 wrote this query in the Microsoft sql serve ...

MySQL Convert from DBF to My Sql

I am newbie and I have a problem our lead programmer quit, yes it quit, so I was left with his project, and my background is very diferent to his, so now I am stuck with this project, the thing is that I need to convert daily 25 foxpro databases into MySql and to be honest I have no clue on how to d ...

Link to Mysql from Pervasive sql application

My company got all it's database put into mysql and it is used with SugarCRM (PHP), the person that did the change did not make sure that all the funtionality of sugarCRM was available so we are running into trouble on generating reports. The previous software used for the database was Mazimazer. (p ...

MySQL Convert Store Procedure to MS-SQL

I have this store procedure in Ms-SQL ALTER PROCEDURE [dbo].[sp_item_EntryForm3] @id as integer @Denominazione as varchar(50) AS BEGIN SELECT * FROM EntryForm3 WHERE (@id IS NULL OR id = @id) AND (@Denominazione IS NULL OR Denominazione = @Denominazione) END I can convert to mysql ? ...

Convert Excell, access, Oracle, Sql, Mysql, FoxPro, DB(X), text, CSv to ALL

the best tool i ever use to migrate my data from Clipper database to Oracle is two1- DBF to MySQL dbf2mysql (Freeware) it is a good tool to mIgrate from the DBF format to Mysql Easly and without any errors.WWW: http://www.nica****/~ae 2- i use the Oracle Migration workbench tool to migrate Mysql dat ...

convert sql mysql to oracle

It is possible to obtain result in ORACLE with this one sql of MYSQLSELECT DISTINCT EntidadID, NOMBRE, MATCH(NOMBRE, Acronimo) AGAINST ('text') As Score FROM oracle.DE_ENTIDAD WHERE MATCH(NOMBRE,Acronimo) AGAINST ('text') ORDER BY Score DESC,NOMBREASCSorry for my english ...

Microsoft SQL Server Convert a MSSQL2K backup to MySQL

I have an xxxxxxxxx.BAK file which is supposed to be a SQL2000 backup. I need to preserve former system business data, possible to map and convert to a new MySQL-based system. I do not have access to a running SQL2000 system. Is there a utility compatable with Community Server to load this into a My ...

MySQL Error, Convert SQL -> MySQL

I usually write stuff in sequel, can someone help me convert this, i'm having problems.$look_up_user_info = mysql_query("SELECT * FROM `user_system` WHERE `Email_Address` = '$email_address' AND `List_Code` = '$free_gift'", $dbconn);while($view_column = mysql_fetch_array($look_up_user_info) ...

Microsoft SQL Server Convert procedure from MSSQL to MySQL

I edited my post since i got no aswers on this board (about a problem) and i was able to make a succesfull Query. So here it is for anyone who is interested: DELIMITER $$ SET SQL_MODE = ANSI_QUOTES$$ DROP PROCEDURE IF EXISTS AddEdge$$ CREATE PROCEDURE AddEdge ( IN v_StartVertexId INT UNSIGNED, IN v_ ...

MySQL delete syntax

can anyone give me the syntax to delete the rows with limit and oder by option. example:I want to delete all the rows of a praticular id by leaving last 5 entries delete from tblname where id=123 order by datevalue desc limit 5,10; i want to have only 5 records for particular id. Please suggest me i ...

Microsoft SQL -> mySQL

I am not sure if this is the right forum to ask, but I have a Microsoft SQL statement which doesn't seem to work in mySQL: select ProjectID,BugID,BugTitle from Bug where Cast(BugID as Char) + Cast(ProjectID as Char) not in (select Cast(BugID as Char) + Cast(ProjectID as Char) from BugTracking) Anyon ...

MySQL Constraint syntax

Folks, I am trying to create a table but I am having some trouble with the syntax for constraint, anyone out there knows how to rewrite this so it flies with mysql. Thx. CREATE TABLE account (account_id VARCHAR(8) CONSTRAINT pk_account PRIMARY KEY, type VARCHAR(24)); Gives... ERROR 1064 at line 15: ...

MySQL LIKE syntax

I am wondering why my scripts don't work anymore although they worked just fine few months ago? This query returned all the books that started with letter 'a'. Now it returns empty set. select name from books where name like 'a%'; I am using 4.0.20-standrad on Linux. It is quite possible that admin ...

MySQL INSERT syntax not inserting

I'm working on a registration page and everything seems to be working on it except the part where the variables of the form are inserted into the database. I have copied syntax almost directly from the manual yet it still does not work properly. (note: this same problem occurs on similar pages which ...

sql question: convert number to date or..

I've been searching for an hour now and can't seem to find an answer. My prior sql experience is with ms sql server, oracle, etc.. so I'm not finding the functions I need, probably because i'm searching using the wrong approach for the problem.. that said, our company was recently bought by a corpor ...

MySQL Convert from base 32 to base 10

I have a number in base 32 that is stored in the database in base 10. How do I convert the number to 10 when I query the database? Kind ...

I have a problem with mysql union syntax

What is wrong in this code ??? SELECT tb_secteur.sect_id, tb_secteur.sect_nom_FR,SUM(nb) FROM ( (SELECT tb_secteur.sect_id, tb_secteur.sect_nom_FR,COUNT(tb_secteur.sect_id)AS nb FROM (tce_salle_restaurant INNER JOIN tce_salle ON tce_salle_restaurant.fksalle = tce_salle.pksalle) INNER JOIN (tce_resta ...