Tag: mysql

SQL Server 2008 R2 to MySQL Migration

Is there a GUI tool out there that will allow me to migrate entire SQL Server 2008 R2 databases to MySQL? I have MySQL Workbench installed, but it looks like there isn’t a feature in it like SSIS to copy and paste entire databases from SQL Server. I downloaded the MySQL Migration Toolkit, but it […]

Convert SQL Server query to MySQL

Possible Duplicate: Select TOP X (or bottom) percent for numeric values in MySQL How would I write this query in MySQL?? SELECT TOP 50 PERCENT * FROM Persons The number of entries in the table will be constantly changing so I need to select by percentage rather than a fixed number.

Convert SQL Server database to MySQL

I have an application database on SQL Server 2008 Express on my dedicated server. It’s not enough for my web app. Are there any good free conversion tools that will enable me to convert my current SQL Server database to MySQL on my server. Will my web app be able to work the same?

What type of JOIN to use

What type of JOIN would I use to get table1 and table2 to be matched only once. For example, I have table1 (40 rows) and table2 (10000 rows). But I get table1 repeated over and over when I use a join on table1.LocationArea = table2.Location What I get: What I wish I could get: t1.LocationArea,t2.Location […]

Do I have to use OpenQuery to query a MySQL Linked Server from SQL Server?

I’m querying a MySQL linked server from SQL Server. I can query the linked server using OpenQuery as in the following example. SELECT * FROM OPENQUERY(MyLinkedServer, ‘SELECT * FROM SomeTable’) I have tried querying the linked server using a four-part name as in the following example. SELECT * FROM MyLinkedServer.MyDatabase.DBO.SomeTable That returns an error stating […]

Stored Procedure with optional “WHERE” parameters

I have a form where users can specify various parameters to dig through some data (status, date etc.). I can produce a query that is: SELECT * FROM table WHERE: status_id = 3 date = <some date> other_parameter = <value> etc. Each WHERE is optional (I can select all the rows with status = 3, […]

Why don't connect android to database directly?

I see many people trying to connect an Android device directly in a database like SQL Server or MySql and the answers are always the same: Use a web service. Why not connect directly an Android device with a database? I’m using a local network with my Android application.

Error Code: 1406. Data too long for column – MySQL

Error Code: 1406. Data too long for column CREATE TABLE `TEST` ( `idTEST` INT NOT NULL , `TESTcol` VARCHAR(45) NULL , PRIMARY KEY (`idTEST`) ); Now Insert some values INSERT INTO TEST VALUES ( 1, ‘Vikas’ ) select SELECT * FROM TEST; Inserting record more than the length INSERT INTO TEST VALUES ( 2, ‘Vikas […]

SQL Server 2005 implementation of MySQL REPLACE INTO?

MySQL has this incredibly useful yet properitary REPLACE INTO SQL Command. Can this easily be emulated in SQL Server 2005? Starting a new Transaction, doing a Select() and then either UPDATE or INSERT and COMMIT is always a little bit of a pain, especially when doing it in the application and therefore always keeping 2 […]

Performance implications of allowing alias to be used in HAVING clause

I made a bit of a fool out of myself earlier today on this question. The question was using SQL Server, and the correct answer involved adding a HAVING clause. The initial mistake I made was to think that an alias in the SELECT statement could be used in the HAVING clause, which is not […]

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