Skip to content

Tag: sql

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…

Using GetSchemaTable() to retrieve only column names

Is it possible to use GetSchemaTable() to retrieve only column names? I have been trying to retrieve Column names (only) using this method, is it possible. This code retrieves a lot of table data unwanted, I only need a list containing column names!: Answer You need to use ExecuteReader(CommandBehavior.Schema…

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 …

SQL query with NULL Value Comparison in MS Access

I am trying to compare two tables and output results where a column in table1 and the same column in table2 are not equal. The query looks like this: Column1, Column2, Column3 together form the primary key for the two tables. When Column4 has missing values (null), the corresponding record is not showing up a…

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 …

Can’t UNION ALL on a temporary table?

I’m trying to run the following simple test- creating a temp table, and then UNIONing two different selections: CREATE TEMPORARY TABLE tmp SELECT * FROM people; SELECT * FROM tmp UNION ALL SELECT * …