C
catkin63
Good Morning,
I hope someone can help me before I drop-kick Office 2007 and make my IT
department put me back on 2003. **Note 2003 gave me no problems at all with
this. EVER!**
The section between ****'s is my sample data. Source is .txt file. Data is
fixed width. Import cannot recognize a negative number represented by the "-"
after a number value. Dates have been linked as text, as I cannot command the
system to ignore the #Num! error. The section between ++++'s is a sample of
the resulting link. The third section is my SQL, which works around the date
problem and the subsequent #Error problem. When I get down to the information
I need, there are still lines that I do not need, this line contains the word
description. There is now no date in the EffDt field, but when I try to
filter out records with NULL value, I get this error: Data type mismatch in
criteria expression. I am trying to append to or create another table.
QUESTION: How do I simplify this unwieldy query and/or remove the records
programatically? **Please do not respond with "correct the data first", as
with hundreds or thousands of lines, that is not time effective.**
****
26212 0003 C 1957 APT AIR CONDITIONIN 101.00 08-28-08 09-01-08
09-13-2008
26212 0004 C 1957 APT AIR CONDITIONIN 101.00 08-28-08 09-01-08
09-13-2008
26211 0002 C 1957 APT RENT 573.00 09-01-08 09-01-08
280.00
11005 0001 C ISS SPECIAL SERVICES FEE 10.00 09-11-08
0.00
11003 0001 C INTERNATIONAL STUDENT FE 50.00 09-12-08
0.00
26212 0005 C 1957 APT AIR CONDITIONIN 101.00- 09-12-08
09-13-2008
90000 0001 P PAYMENT ON ACCOUNT 400.00- 09-12-08
09-13-2008
90000 0002 P PAYMENT ON ACCOUNT 8,110.95- 09-12-08
09-13-2008
Page 8 of 9 Pages in Unit 1 Total Units 1 Next Page __ Next Unit
__
W-Z0137 - SECURITY - YOU MAY NOT UPDATE ON THIS SCREEN
Student Account Date: 09-13-2008
SubCd Seq CP Description Amount Eff Dt Bill Dt Pd
Appl
****** Future Items Begin Here *****
26211 0003 C 1957 APT RENT 573.00 10-01-08
0.00
26211 0004 C 1957 APT RENT 573.00 11-01-08
0.00
26211 0005 C 1957 APT RENT 573.00 12-01-08
0.00
End Balance: 2,072.00
****
++++
CP Description Amount Sign EffDt BillDt PdAppl
C 1957 APT AIR CONDITIONIN $101.00 08-28-08 09-01-08 09-13-2008
C 1957 APT AIR CONDITIONIN $101.00 08-28-08 09-01-08 09-13-2008
C 1957 APT AIR CONDITIONIN $101.00 08-28-08 09-01-08 09-13-2008
C 1957 APT AIR CONDITIONIN $101.00 08-28-08 09-01-08 09-13-2008
C 1957 APT RENT $573.00 09-01-08 09-01-08 280.00
C ISS SPECIAL SERVICES FEE $10.00 09-11-08 0.00
C INTERNATIONAL STUDENT FE $50.00 09-12-08 0.00
C 1957 APT AIR CONDITIONIN $101.00 - 09-12-08 09-13-2008
P PAYMENT ON ACCOUNT $400.00 - 09-12-08 09-13-2008
P PAYMENT ON ACCOUNT $8,110.95 - 09-12-08 09-13-2008
Pages in Unit 1 To Next Pa e __ Ne t Unit __
E URITY - YOU MAY NOT UPDA C EEN
Student Account ate: 09- 3-2008
C Description Eff Dt Bill Dt Pd Appl
r Items Begin Here *****
C 1957 APT RENT $573.00 10-01-08 0.00
C 1957 APT RENT $573.00 11-01-08 0.00
C 1957 APT RENT $573.00 12-01-08 0.00
End Balance: $2,072.00
++++
SELECT MainframeLink.Description, MainframeLink.CP,
IIf([MainframeLink]![Sign]="-",-[MainframeLink]![Amount],[MainframeLink]![Amount])
AS Amount,
IIf(IsNull([MainframeLink]![EffDt]),"",IIf(Asc([MainframeLink]![EffDt])="32","",IIf(IsDate(DateSerial(Right([MainframeLink]![EffDt],2),Left([MainframeLink]![EffDt],2),Mid([MainframeLink]![EffDt],4,2))),DateSerial(Right([MainframeLink]![EffDt],2),Left([MainframeLink]![EffDt],2),Mid([MainframeLink]![EffDt],4,2)),"")))
AS EffDt,
IIf(IsNull([MainframeLink]![BillDt]),"",IIf(IsDate(DateSerial(Right([MainframeLink]![BillDt],2),Left([MainframeLink]![BillDt],2),Mid([MainframeLink]![BillDt],4,2))),DateSerial(Right([MainframeLink]![BillDt],2),Left([MainframeLink]![BillDt],2),Mid([MainframeLink]![BillDt],4,2)),""))
AS BillDt,
IIf(IsNull([MainframeLink]![PdAppl]),"",IIf(Asc([MainframeLink]![PdAppl])="32","",IIf(IsDate(DateSerial(Right([MainframeLink]![PdAppl],2),Left([MainframeLink]![PdAppl],2),Mid([MainframeLink]![PdAppl],4,2))),DateSerial(Right([MainframeLink]![PdAppl],2),Left([MainframeLink]![PdAppl],2),Mid([MainframeLink]![PdAppl],4,2)),""))) AS PdAppl INTO Mainframe
FROM MainframeLink
WHERE (((MainframeLink.Description)<>"BALANCE FORWARD") AND
((MainframeLink.CP)="C" Or (MainframeLink.CP)="P"));
I hope someone can help me before I drop-kick Office 2007 and make my IT
department put me back on 2003. **Note 2003 gave me no problems at all with
this. EVER!**
The section between ****'s is my sample data. Source is .txt file. Data is
fixed width. Import cannot recognize a negative number represented by the "-"
after a number value. Dates have been linked as text, as I cannot command the
system to ignore the #Num! error. The section between ++++'s is a sample of
the resulting link. The third section is my SQL, which works around the date
problem and the subsequent #Error problem. When I get down to the information
I need, there are still lines that I do not need, this line contains the word
description. There is now no date in the EffDt field, but when I try to
filter out records with NULL value, I get this error: Data type mismatch in
criteria expression. I am trying to append to or create another table.
QUESTION: How do I simplify this unwieldy query and/or remove the records
programatically? **Please do not respond with "correct the data first", as
with hundreds or thousands of lines, that is not time effective.**
****
26212 0003 C 1957 APT AIR CONDITIONIN 101.00 08-28-08 09-01-08
09-13-2008
26212 0004 C 1957 APT AIR CONDITIONIN 101.00 08-28-08 09-01-08
09-13-2008
26211 0002 C 1957 APT RENT 573.00 09-01-08 09-01-08
280.00
11005 0001 C ISS SPECIAL SERVICES FEE 10.00 09-11-08
0.00
11003 0001 C INTERNATIONAL STUDENT FE 50.00 09-12-08
0.00
26212 0005 C 1957 APT AIR CONDITIONIN 101.00- 09-12-08
09-13-2008
90000 0001 P PAYMENT ON ACCOUNT 400.00- 09-12-08
09-13-2008
90000 0002 P PAYMENT ON ACCOUNT 8,110.95- 09-12-08
09-13-2008
Page 8 of 9 Pages in Unit 1 Total Units 1 Next Page __ Next Unit
__
W-Z0137 - SECURITY - YOU MAY NOT UPDATE ON THIS SCREEN
Student Account Date: 09-13-2008
SubCd Seq CP Description Amount Eff Dt Bill Dt Pd
Appl
****** Future Items Begin Here *****
26211 0003 C 1957 APT RENT 573.00 10-01-08
0.00
26211 0004 C 1957 APT RENT 573.00 11-01-08
0.00
26211 0005 C 1957 APT RENT 573.00 12-01-08
0.00
End Balance: 2,072.00
****
++++
CP Description Amount Sign EffDt BillDt PdAppl
C 1957 APT AIR CONDITIONIN $101.00 08-28-08 09-01-08 09-13-2008
C 1957 APT AIR CONDITIONIN $101.00 08-28-08 09-01-08 09-13-2008
C 1957 APT AIR CONDITIONIN $101.00 08-28-08 09-01-08 09-13-2008
C 1957 APT AIR CONDITIONIN $101.00 08-28-08 09-01-08 09-13-2008
C 1957 APT RENT $573.00 09-01-08 09-01-08 280.00
C ISS SPECIAL SERVICES FEE $10.00 09-11-08 0.00
C INTERNATIONAL STUDENT FE $50.00 09-12-08 0.00
C 1957 APT AIR CONDITIONIN $101.00 - 09-12-08 09-13-2008
P PAYMENT ON ACCOUNT $400.00 - 09-12-08 09-13-2008
P PAYMENT ON ACCOUNT $8,110.95 - 09-12-08 09-13-2008
Pages in Unit 1 To Next Pa e __ Ne t Unit __
E URITY - YOU MAY NOT UPDA C EEN
Student Account ate: 09- 3-2008
C Description Eff Dt Bill Dt Pd Appl
r Items Begin Here *****
C 1957 APT RENT $573.00 10-01-08 0.00
C 1957 APT RENT $573.00 11-01-08 0.00
C 1957 APT RENT $573.00 12-01-08 0.00
End Balance: $2,072.00
++++
SELECT MainframeLink.Description, MainframeLink.CP,
IIf([MainframeLink]![Sign]="-",-[MainframeLink]![Amount],[MainframeLink]![Amount])
AS Amount,
IIf(IsNull([MainframeLink]![EffDt]),"",IIf(Asc([MainframeLink]![EffDt])="32","",IIf(IsDate(DateSerial(Right([MainframeLink]![EffDt],2),Left([MainframeLink]![EffDt],2),Mid([MainframeLink]![EffDt],4,2))),DateSerial(Right([MainframeLink]![EffDt],2),Left([MainframeLink]![EffDt],2),Mid([MainframeLink]![EffDt],4,2)),"")))
AS EffDt,
IIf(IsNull([MainframeLink]![BillDt]),"",IIf(IsDate(DateSerial(Right([MainframeLink]![BillDt],2),Left([MainframeLink]![BillDt],2),Mid([MainframeLink]![BillDt],4,2))),DateSerial(Right([MainframeLink]![BillDt],2),Left([MainframeLink]![BillDt],2),Mid([MainframeLink]![BillDt],4,2)),""))
AS BillDt,
IIf(IsNull([MainframeLink]![PdAppl]),"",IIf(Asc([MainframeLink]![PdAppl])="32","",IIf(IsDate(DateSerial(Right([MainframeLink]![PdAppl],2),Left([MainframeLink]![PdAppl],2),Mid([MainframeLink]![PdAppl],4,2))),DateSerial(Right([MainframeLink]![PdAppl],2),Left([MainframeLink]![PdAppl],2),Mid([MainframeLink]![PdAppl],4,2)),""))) AS PdAppl INTO Mainframe
FROM MainframeLink
WHERE (((MainframeLink.Description)<>"BALANCE FORWARD") AND
((MainframeLink.CP)="C" Or (MainframeLink.CP)="P"));