473,386 Members | 1,796 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

VB to T-SQL code conversion

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)
Expand|Select|Wrap|Line Numbers
  1.  
  2. [EE First Name] & " " & IIf([EE Middle Initial] Is Not Null,[EE Middle Initial] & ". ","") & [EE Last Name] AS [EE Full Name],
  3.  
2)
Expand|Select|Wrap|Line Numbers
  1. 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
Thanks again!!
Dec 16 '05 #1
0 3415

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: clusardi2k | last post by:
Hello, What can I do about these gcc Red Hat Linux errors. They are coming from the archive file. %gcc -I/usr/fltk -O2 -Wall -Wunused -fno-exceptions -I/usr/X11R6/include -o run main.o...
2
by: B_Love | last post by:
Hey! When trying to compile the code for a ordered vector class I get the following error: undefined reference to `WinMain@16' Anyone have any idea what I might be doing wrong? I've been...
4
by: s_4 | last post by:
Witam! Mam maly problem... to chyba juz wszyscy wiedza... :-) do rzeczy: 1. zrobilem maly projekt i wywala mi takie bledy jak w tytule (tylko takie) 2. kompilujac kazdy plik z osobna nie ma...
4
by: Mark | last post by:
Hi, I'm trying to write some classes that kind of manage themselves. A linked list, that links different types of objects. Here's the code... object.h: --- class Object { int alt;
1
by: Oliver Bleckmann | last post by:
Damn, what's wrong here? CGI cgi; map<string,stringcgiParam = cgi.analyseCgiParam(); cout << cgiParam << endl; cout << cgiParam << endl; /////////////////////// #include <iostream>
0
by: Ehsan68 | last post by:
Hello my problem is "Linker Error: Undefined symbol _cga_driver_far in module maze.c " then Go to Options =>Linker =>Libraries This will display a box showing Container Class Turbo...
3
by: prakash.mirji | last post by:
Hello, I am getting below mention linker error when I tried to link my class test.C I use below command to compile test.C /usr/bin/g++ -g -fpic -fvisibility=default -D_POSIX_SOURCE...
2
by: kumarsatish | last post by:
The following C program in Turbo C is given the following error " Linker error:-Undefined Symbol _insert_point" #include<stdio.h> #include<conio.h> #define NULL 0 struct list_node
6
by: Ed Dana | last post by:
I'm trying to create a dynamic two dimensional array. My code looks like this: ====================================================================== #define DEF_FrameBuffer_H class FrameBuffer...
4
by: sanketiiit | last post by:
ERROR: Bloodshed Dev c++ undefined reference to cpu_features_init Perfect Solution to this error. If ( Installed MinGW ) then: 1. Uninstall MinGW 2. Delete manually MinGW Folder...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.