I have not worked with VB at all and wondered if perhaps there was an all knowing SQL DBA out there that also spoke fluent VB. I am trying to come up with the equilivant T-SQL code for the following VB script (it is a portion of an old Access query) and certainly appreciate any help offered!! Thanks (and sorry about the table names....i didn't create the database)
1)
2)
Thanks again!!
1)
Code:
[EE First Name] & " " & IIf([EE Middle Initial] Is Not Null,[EE Middle Initial] & ". ","") & [EE Last Name] AS [EE Full Name],
Code:
IIf([Calc Method]="1","",IIf([Calc Method]="2",DateSerial(DatePart("yyyy",Date()),1,1),IIf([Calc Method]="3",IIf(Now()<CDate([Company Data File]![Fiscal Date]),DateAdd("yyyy",-1,CDate([Company Data File]![Fiscal Date])),CDate([Company Data File]![Fiscal Date])),IIf([Calc Method]="4",IIf(Now()<DateSerial(DatePart("yyyy",Now()),DatePart("m",[EE HireDte]),DatePart("d",[EE HireDte])),DateSerial(DatePart("yyyy",DateAdd("yyyy",-1,Now())),DatePart("m",[EE HireDte]),DatePart("d",[EE HireDte])),DateSerial(DatePart("yyyy",Now()),DatePart("m",[EE HireDte]),DatePart("d",[EE HireDte]))),Date())))) AS AD