Question : Need SQL Translation - Access SQL to SQL 2008 Express

I built three queries in Access 2007 and need to have them run in SQL 2008 express.  I copied the Access' version of SQL to SQL 2008 Express and its not working.  It doesn't like the IIF or the NZ.  I don't know SQL and apparently my queries are too complex for my SQL conterpart to get to work.  I really need help translating these three queries.

I have attached a Word file containing the three queries.
Attachments:
 
 

Answer : Need SQL Translation - Access SQL to SQL 2008 Express


I wrote the following code for another problem, i have taken out the unnecessary stuff, I believe this is a much better way to approach opening the said workbook, then closing it, then quitting excel

notice the private function at the bottom, also this assumes you will add a reference to excel in the project and also use Imports Excel = microsoft.blah.blah.blha

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
Dim excelApp As Excel.Application
        Dim WB As Excel.Workbook
        Dim workbookName As String = "Test Workbook Name"

        'open Excel to minimized state
        excelApp = New Excel.Application()
        excelApp.Visible = CBool(Microsoft.Office.Core.MsoTriState.msoTrue)
        excelApp.WindowState = Excel.XlWindowState.xlMinimized

        'open workbook
        WB = excelApp.Workbooks.Open(workbookName, Microsoft.Office.Core.MsoTriState.msoFalse, _
                                     Microsoft.Office.Core.MsoTriState.msoFalse, _
                                     Microsoft.Office.Core.MsoTriState.msoTrue)
	
	WB.close
	excelApp.quit

        'need to release these com objects or they may remain open in the running services
        ReleaseObject(excelApp)
        ReleaseObject(WB)
        ReleaseObject(WS)
        ReleaseObject(target)

        excelApp = Nothing
        WB = Nothing
        WS = Nothing
        target = Nothing
        'Erase targetArray

        'run garbage collector
        GC.Collect()

    Private Sub ReleaseObject(ByVal o As Object)
        Try
            System.Runtime.InteropServices.Marshal.ReleaseComObject(o)
        Catch ex As Exception
        Finally
            o = Nothing
        End Try

    End Sub
Random Solutions  
 
programming4us programming4us