Tag: mysql

Using XA transaction with JDBC, MySQL, and Microsoft SQL Server

Suppose I have MySQL server running on one machine, a Microsoft SQL Server running on a second machine, and my own custom Java database running on a third machine. How do I use the X/Open XA standard to run a distributed transaction across all three? Does X/Open XA specify a protocol layered over TCP or […]

Scaling values in a column

I wish to do a special type of scaling for my data. Is it possible to query a database which has the following ints in a column: 10 5 5 3 1 1 0 1 5 2 2 And produce the following representation via a query: 1.0 0.8 0.8 0.6 0.2 0.2 0.0 1.0 0.8 […]

Learning SQL Server 2008 & Stored Procedures

I have a background in LAMP development and have recently started learning sql server. Whilst the principles of databases are the same, there are a lot of features in SQL Server that are not abundant in or are different to a simple MySQL database, e.g. stored procedures, syntax etc Can anyone recommend any decent books […]

Returning the closest to a date in a table using PDO Mysql/MSSQL

I have 2 PDO database connections. I am doing a search within a MS SQL table for a row that closest matches a date (mysql datetime) row. I have mysql.table1.date passed to mssql.table and I am looking for the closest date accordingt to the mssql.table.date. It is also defined as a datetime field. I only […]

Can you query SQL Server directly from the Entity Framework Designer?

When you’re inside Visual Studio you can use the Server Explorer to add a Data Connection. Once you’ve added the data connection you can browse the schema, execute queries, etc. Another developer mentioned that EF might have this functionality. With the EF designer, you would already have a connection setup and even have the list […]

best way to export MySQL database to SqlServer database

This question already has an answer here: Import MySQL database into a MS SQL Server 8 answers

Microsoft SQL Linked MySQL Server – Can't query from PHP

I’ve setup a linked MySQL server on our Microsoft SQL Server. I can run this query successfully in MSSQL Management Studio… SELECT * FROM OPENQUERY(MYSQL, ‘SELECT * FROM countries’) When I run this from a website in PHP though, I get this error… Message: Failed to query SQL statement. Reason: Heterogeneous queries require the ANSI_NULLS […]

How to make data access layer for SQL Server and MySql

I’m building a data access layer and need to be able switch between two providers in different environments. How do I structure this? I’m using a repository pattern and have e.g. a CarRepository class and a Car class. The CarRepository class is responsible for saving, deleting and loading from the database. I have a Database […]

Timestamp Mysql Date_From as default value

Hi I need to resolve next problem. I have a row in mysql: ‘start_at’ and ‘ends_at’ They are Timestamps type. I need to set default value of ends_at plus 7 days from starts_at something like this: ALTER TABLE `a_to_b` MODIFY COLUMN `ends_at` timestamp NULL DEFAULT ‘CURRENT_TIMESTAMP + 604800’ AFTER `starts_at`; If i am right in […]

MySQL datatype for URL's

Possible Duplicate: Best database field type for a URL I am in the middle of transferring my access into mysql. My url’s were datatype Anchor in the access database and I was wondering what would be the best datatype to store them in mysql

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