How to import mdb to sql server

I have a vb application. Now I have developed that same vb application in In vb I had used MSAccess database. In I am using Sql server. Now I want to Move or copy the MSaccess database data into Sql server.

Subtract two dates in SQL and get days of the result

Select I.Fee From Item I WHERE GETDATE() – I.DateCreated < 365 days How can I subtract two days? Result should be days. Ex: 365 days. 500 days.. etc…

Normalize unicode string in SQL Server?

Is there a function in SQL Server to normalize a unicode string? e.g. UPDATE Orders SET Notes = NormalizeString(Notes, ‘FormC’) Unicode Normalization Forms: C​omposition (C): A + ¨ becomes Ä D​ecomposition (D): Ä becomes A + ¨ Compatible Composition (KC): A + ¨ + fi + n becomes Ä + f + i + n […]

How do I import a .bak file into Microsoft SQL Server 2012?

Been Googling this for awhile and no answer….can anyone help?

CLR assembly will not load in 64 bit SQL Server 2005

We use an assembly with some user defined functions in our installation of SQL Server 2005 (32 bit). We deploy this to production with a script like this: CREATE ASSEMBLY [Ourfunctions] AUTHORIZATION [dbo] FROM 0x4D5A9000…000 WITH PERMISSION_SET = SAFE GO CREATE FUNCTION [dbo].[GLOBAL_FormatString](@input [nvarchar](4000)) RETURNS [nvarchar](4000) WITH EXECUTE AS CALLER AS EXTERNAL NAME [Ourfunctions].[UserDefinedFunctions].[GLOBAL_FormatString] GO […]

Invoke or BeginInvoke cannot be called on a control until the window handle has been created

I am trying to install SQL Server 2008 Developer Edition x64 on a Windows Server 2008 VM. I run the installer for a standalone installation and this works fine for the setup support rules bit. That passes ok but then I get this error: TITLE: SQL Server Setup failure. SQL Server Setup has encountered the […]

Why does LINQ to SQL translate GroupBy into multiple queries

I’ve noticed than even my simpler LINQ queries using GroupBy get translated into as many SQL queries as group keys. I haven’t found any explanation as to why this happens or how I can avoid it. For instance, the query: from p in People group p by p.Name into g select g gets translated into […]

Using Pivot in SQL Server to Display dates as days of the week

I have table that has a column of type DateTime, I would like to pivot on the datetime column so that the dates are displayed as columns (as days of the week Monday, Tuesday etc). So for example I have a table like this (can’t remember how SQL Server displays full datetimes but you get […]

Find the longest sequence of consecutive increasing numbers in SQL

For this example say I have a table with two fields, AREA varchar(30) and OrderNumber INT. The table has the following data AREA | OrderNumber Fontana | 32 Fontana | 42 Fontana | 76 Fontana | 12 Fontana | 3 Fontana | 99 RC | 32 RC | 1 RC | 8 RC | 9 […]

Select last 30 days with a sql query

I am looking for the number of Mon,Tues, Wed, Thur, Fri, Sat, Sun in the past 30 days. Can I select the last 30 days date and day of week without an actual database table? Something like SELECT –everything between convert(date,GETDATE()), DATENAME(DW, GETDATE()) –and convert(date,GETDATE() – 30), DATENAME(DW, GETDATE())

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