Converting MS Access queries to TSQL for SQL Server
Skip Navigation Links.

Converting MS Access queries to TSQL for SQL Server

Skip Navigation LinksHome :: SQL Server :: Access queries to T-SQL

Replace these on your SQL on ASP pages

  • ` (character you may have in SQL for quotation marks)
  • DISTINCTROW replace with DISTINCT
  • Dates in ## must be in single quotes’’

 

Dates are wierd
Format(ShippedDate, "yyyy"" Qtr ""q") 
Format(ShippedDate, "yyyy") & " Qtr " &
	Format(ShippedDate, "q") 

both translate to:

CONVERT(nvarchar, DATEPART(yy, OrderDate)) + ' Qtr '
	+ CONVERT(nvarchar, DATEPART(qq, OrderDate)) 

DateSerial needs recoding

Where CalendarDays Between DateSerial(Year(Now()),Month(Now()-1),16) And DateSerial(Year(Now()),Month(Now()),15)))
Becomes

The rest of this page is hidden, you must be a member to view it

To become a member and get immediate access to the course please join here Free!

Already Enrolled? please click here to Login

Next >> Migrate SQL-Server
top of page
all content ©1996/2012 BennySutton.com
all images © their respective owners This site uses Thumbshots previews