R
Renraf
I have three queries, each building off the previous, and by the final query,
some of my number data has been converted to text data, and I need to prevent
this from happening. Here is the situation:
Query1: Crosstab query
Input Fields: IntrrptID, PTaskID, Category, Minutes (integer)
Output Fields: PTaskID, CategoryA, CategoryB, CategoryC . . . (each
containing the sum of minutes for that category for that PTaskID)
Query2:
Input Fields: PTaskID, Category1, Category2, Category3, . . . , CategoryA,
CategoryB, CategoryC, . . .
Category 1-m are from table PrimaryTaskLogs (integer), Category A-n are from
Query1.
Output Fields: PTaskID, Category1, Category2, Category3, . . . , CategoryA,
CategoryB, CategoryC, . . .
Query3:
Input Fields: (Query2)
Output Fields: PTaskID, Category1, Category2+A, Category3, Category4+D,
Category1+2+A+7+F+G, . . .
Most of my fields that are summing other fields are coming out correctly,
but one of them is coming out 540+0=5400, 0+0=00, 0+10=010, etc., so clearly
it thinks the data is text. Why would this happen? I start with integer data,
and all I do with that data is crosstab it (uses a sum), sum some of it, and
just shuffle other data into the next query with an occassional Field rename.
I am baffled. I know I can fix it by using CInt along the way, but I would
really like to know why this is happening in the first place, and if there is
a better way for me to prevent it.
some of my number data has been converted to text data, and I need to prevent
this from happening. Here is the situation:
Query1: Crosstab query
Input Fields: IntrrptID, PTaskID, Category, Minutes (integer)
Output Fields: PTaskID, CategoryA, CategoryB, CategoryC . . . (each
containing the sum of minutes for that category for that PTaskID)
Query2:
Input Fields: PTaskID, Category1, Category2, Category3, . . . , CategoryA,
CategoryB, CategoryC, . . .
Category 1-m are from table PrimaryTaskLogs (integer), Category A-n are from
Query1.
Output Fields: PTaskID, Category1, Category2, Category3, . . . , CategoryA,
CategoryB, CategoryC, . . .
Query3:
Input Fields: (Query2)
Output Fields: PTaskID, Category1, Category2+A, Category3, Category4+D,
Category1+2+A+7+F+G, . . .
Most of my fields that are summing other fields are coming out correctly,
but one of them is coming out 540+0=5400, 0+0=00, 0+10=010, etc., so clearly
it thinks the data is text. Why would this happen? I start with integer data,
and all I do with that data is crosstab it (uses a sum), sum some of it, and
just shuffle other data into the next query with an occassional Field rename.
I am baffled. I know I can fix it by using CInt along the way, but I would
really like to know why this is happening in the first place, and if there is
a better way for me to prevent it.