NLSSORT Oracle to SQL Server 2008 - sql-server

Trying to convert the following code from Oracle to SQL Server 2008:
order by NLSSORT(name, 'NLS_SORT=WEST_EUROPEAN')
I know NLSSORT is not a function in SQL Server, so how would I go about this?

Related

Converting SQL Server Express To SQL Server?

I have created a program that uses SQL Server Express as its database.
Now I want to convert the database to SQL Server.
How can I do this?
There is no converter or something needed.
You just have to select your database in your Management Studio (Express) and detach it from your SQL Server Express instance.
Then connect to your SQL Server and attach the database with a right-click on Databases -> Attach.

Convert /Attach SQL Server 2005 .mdf to 2008 .mdf?

I have SQL Server 2005 .mdf file and now I need to attached the same to SQL Server 2008
so how can I do the same.
Is any such tool is available , which convert 2005 .mdf file to 2008 .mdf file ?
As I do not have access to SQL Server 2005 at all .
Best practice is to backup the database using SQL Server Management Studio with SQL Server 2005, and then restore it on SQL Server 2008.
But you can simply attach the SQL Server 2005 .MDF file to SQL Server 2008. SQL Server will convert it for you - it is able to read data files from older versions of SQL Server.
I would suggest attaching to SQL Server 2008, performing an SQL Server backup, then restoring it back to SQL Server 2008. This will cause the database to be recreated, and will alert you to any data issues.
Cheers,
Peter
When you restore database backup(2005) to SQL Server 2008 , SQL Server restore your backup and update it's to new version. But SQL Server don't change compatible level of your database. you can change compatible level of your database by following query.
ALTER DATABASE test SET COMPATIBILITY_LEVEL=100;

Oracle to SQL Server Migration : Equivalent of Oracle GROUP_ID() function in SQL Server 2008

im looking for an equivalent way to do :
HAVING (GROUP_ID()=0) -- ORACLE
in SQL Server 2008.
Thanks :)

Database table with field of type date not allowed in SQL Server 2008 R2?

I am trying to create a table with a database field of type DATE in SQL Server 2008 R2, but every time I try, I get this message:
Column, parameter, or variable #10: Cannot find data type date.
Now I know this datatype is permitted with 2008 r2, so what is going on?
I am trying to create this table within Microsoft SQL Server Management Studio.
Are you sure you are running against a SQL Server 2008 R2 instance? Is it possible that you are using the SQL Server 2008 R2 version of Management Studio, but connecting to SQL Server 2005? What does SELECT ##VERSION; yield?

importing a sql ddl file into Microsoft SQL server

how to import a SQL ddl file into ms sql server 2005?
A SQL ddl file is just a bunch of queries, right? Just execute them with any SQL client or the management studio. I prefer Query Express
You can use SQL Server Managment Studio, or use the SqlCmd line.

Resources