Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Convert Access SQL to Sever SQL

$
0
0

Hi,

Is anyone able to convert these two SQL queries from Access into the correct syntax for SQL server please?

1)

IIf(Nz(dbo.P_Historics.Mentions)=0,
IIf(Mid([Contract Type],4,4)="Canx",
IIf(Nz(dbo.P_Historics.historics)>0,Nz(dbo.Pulsar_Contracts_with_Historics.historics),Nz(dbo.P_Historics.Mentions)*0.15)*-1,
IIf(Nz(dbo.P_Historics.historics)>0,Nz(dbo.Pulsar_Contracts_with_Historics.historics),Nz(dbo.P_Historics.Mentions)*0.15)*1),
IIf(Mid(dbo.P_Historics.[Contract Type],4,4)="Canx",Nz(dbo.P_Historics.Mentions)*-1,Nz(dbo.P_Historics.Mentions)*1))

2)

IIf(Mid(dbo.P_Historics.[Contract Type],4,4)="Canx",
IIf(Nz(dbo.P_Historics.historics  )>0,Nz(dbo.P_Historics.historics ),Nz(dbo.P_Historics.Mentions)*0.15)*-1,
IIf(Nz(dbo.P_Historics.historics )>0,Nz(dbo.P_Historics.historics ),Nz(dbo.P_Historics.Mentions)*0.15)*1)

Thanks


Viewing all articles
Browse latest Browse all 7129

Trending Articles