Skip to content

Tag: sql-server

How to set collation of a column with SQL?

Originally, I created my SQL Server database on a local computer. I set its collation to Latin1_General_CI_AI and everything worked well. When I moved the finished work to the web hosting SQL Server, I encountered problem: they use a different database collation. So what can I do now? To be more specific, I n…

php starup sqlsrv unable to initialize module

I am trying to connect MSSQL to PHP. i am following this tutorial. Anyway after i added the dll files as described in that tutorial, i get the following warning. How can i solve this ? note:i have gone through this post but none helped. Answer Looks like you’ve tried to install the sqlsrv extension for …

PHP/MS SQL Server display sql server datetime

im trying to display date and time from MSSQL Server datetime table using PHP, the value from from SQL Server is datetime EX. 2012-08-20 06:23:28:214. Now i want to display it the exact result but it php displays it like this EX. Aug 20 2012 6:23AM. I Have tried to use strtotime but the milliseconds does not …

Export database schema into SQL file

Is it possible in MS SQL Server 2008 to export database structure into a T-SQL file? I want to export not only tables schema but also primary keys, foreign keys, constraints, indexes, stored procedures, user defined types/functions. Also I don’t want the data to be present in this T-SQL file. Is there a…

How to store historical records in a history table in SQL Server

I have 2 tables, Table-A and Table-A-History. Table-A contains current data rows. Table-A-History contains historical data I would like to have the most current row of my data in Table-A, and Table-A-History containing historical rows. I can think of 2 ways to accomplish this: whenever a new data row is avail…