Anyone know how can I convert this field to ms sql server?
IIf([Final]=0 Or IsNull([Final]),"--",[Final]) AS FinalGrade,
SchYrSemCourseJoin.Final, IIf([Final]=0 Or
IsNull([Final]),"--",[Unit]) AS UnitAlias
this is the full sql statement in my ms access program:
SELECT DISTINCTROW Students.IDNo, [LastName] & ", " & [FirstName] & "
" & [MiddleName] AS Name, Students.Address, Students.PlaceofBirth,
Students.DateofBirth, Students.ParentGuardian, Students.ElemSchool,
Students.ESAddress, Students.ESSchYear, Students.SecSchool,
Students.SSAddress, Students.SSSchYear, Students.TerSchool,
Students.TSAddress, Students.TSSchYr, Program.ProgramTitle,
Program.ProgramDesc, IIf([ProgramTitle]="BEED","with concentration in
" & [Major],[Major]) AS MajorTemp, [Sem] & " Semester, " & [SchYr] AS
SchYrSem, Course.CourseCode, Course.CourseTitle, IIf([Final]=0 Or
IsNull([Final]),"--",[Final]) AS FinalGrade, SchYrSemCourseJoin.Final,
IIf([Final]=0 Or IsNull([Final]),"--",[Unit]) AS UnitAlias,
Students.IDNo, SchYrSem.SchYrSemID, SchYrSemCourseJoin.Annotation
FROM (Program INNER JOIN Students ON Program.ProgramID =
Students.ProgramID) INNER JOIN ((Major INNER JOIN SchYrSem ON
Major.MajorID = SchYrSem.MajorID) INNER JOIN (Course INNER JOIN
SchYrSemCourseJoin ON Course.CourseID = SchYrSemCourseJoin.CourseID)
ON SchYrSem.SchYrSemID = SchYrSemCourseJoin.SchYrSemID) ON
Students.IDNo = SchYrSem.IDNo
the only problem i have encounted is the FinalGrade and UnitAlias
Field as stated above.
Thanks in advance for any help. 2 2959
> Anyone know how can I convert this field to ms sql server? IIf([Final]=0 Or IsNull([Final]),"--",[Final]) AS FinalGrade, SchYrSemCourseJoin.Final, IIf([Final]=0 Or IsNull([Final]),"--",[Unit]) AS UnitAlias
You could try something like
SELECT .....
FinalGrade =
(CASE [Final]
WHEN 0 THEN '--'
WHEN NULL THEN '--'
ELSE [Final]
END) ,
SchYrSemCourseJoin.Final,
UnitAlias =
(CASE [Final]
WHEN 0 THEN '--'
WHEN NULL THEN '--'
ELSE [Unit]
END)
......FROM
Cheers,
Peter
Thank you.
On Thu, 17 Feb 2005 09:09:07 GMT, "Peter Hoyle"
<pe*********@ntlworld-NOT.com> wrote: Anyone know how can I convert this field to ms sql server?
IIf([Final]=0 Or IsNull([Final]),"--",[Final]) AS FinalGrade, SchYrSemCourseJoin.Final, IIf([Final]=0 Or IsNull([Final]),"--",[Unit]) AS UnitAlias
You could try something like
SELECT .....
FinalGrade = (CASE [Final] WHEN 0 THEN '--' WHEN NULL THEN '--' ELSE [Final] END) , SchYrSemCourseJoin.Final, UnitAlias = (CASE [Final] WHEN 0 THEN '--' WHEN NULL THEN '--' ELSE [Unit] END)
.....FROM
Cheers, Peter
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: imani_technology_spam |
last post by:
I'm trying to create an OLAP system using SQL Server 2000 Analysis
Services (AS). I want the AS cube to be based on a database with a
star schema.
I have a field called Ratio. The initial...
|
by: SD |
last post by:
Hi,
This is driving me nuts, I have a table that stores notes regarding an
operation in an IMAGE data type field in MS SQL Server 2000.
I can read and write no problem using Access using the...
|
by: Axel |
last post by:
Hi
in T-SQL,
(how) is it possible to concatenate 3 (varchar) fields into one; either
in a SQL query or through a calculated field (or using a view, if
anybody can explain to me how to use...
|
by: Allen Browne |
last post by:
Subform is based on a single-table query that contains a calculated field:
Amount: Round(CCur(Nz(*,0)),2)
Continuous subform displays this field in a text box named Amount.
As user enters new...
|
by: John young |
last post by:
I have a table which has fields "year", "odometer", and "annual"....
what i currently do is enter manually data for all fields,... what i
want to have happen is the annual figure to be added...
|
by: tconway |
last post by:
I have an Access program that displays Customer data into a form and
OrderID data into a subform. The totals in the Subform are based on
calculated fields, i.e. the Total Amount field Calculates...
|
by: John |
last post by:
I am using Access 2000.
One table in my database has a field called RankName.
Values inlcude: Officer, Sergeant, Lieutenant.
I need create a report that groups these three RankNames into two...
|
by: markm75c |
last post by:
Does anyone know of a way to sort a column which isnt databound or an
actual field in the database, but is derived from a method?
IE. I have a grid showing stats for softball, with a calculated...
|
by: Greg (codepug |
last post by:
Access 2000
Using a textbox of a single form, I created a calculated field. The
following code is in the Control Source for this field:
=IIf(=24,+(/),/
)
The numbers that are calculated are...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |