Subject | Stored procedure problem |
---|---|
Author | Don Gollahon |
Post date | 2003-02-11T23:23:16Z |
FYI:
I have a stored procedure that works but when I copy the select part and put
it in a query statement in IB_SQL to test it I get an error. The error
says: "Field name: not found"
SELECT P1.COMPANY, CALL_DATE, M1.Trunk_id, M1.Carrier_id, 'FG' || M1.FG,
<===Error occures here
M1.WTN_Npa, M1.WTN_Nxx, M1.Usage_Date,
M1.Service_Code, M1.Originating_ind, M1.Jurisdiction,
M1.Data_Source, M1.Source_id,
sum(M1.CABS_msgs) as Cabs_msgs,
sum(M1.Actual_conv_duration) as Actual_conv_duration,
sum(M1.Access_time) as Access_time
FROM Master M1
left join EndOffce P1 on
((M1.wtn_npa=P1.Area_code)
and (M1.wtn_nxx=P1.Prefix))
Where
(Cabs_Extract = '2/3/2003')
and data_source = 'AMA'
and source_id = 2002021199
AND NOT ((RECORD_TYPE = 201) AND (FR_OCN <> ''))
GROUP BY P1.COMPANY, M1.CALL_DATE, M1.Trunk_id, M1.Carrier_id,
M1.FG, M1.WTN_Npa, M1.WTN_Nxx, M1.Service_Code,
M1.Originating_ind, M1.Jurisdiction, M1.Data_source,
M1.Source_id, M1.Usage_Date
It thinks the 'FG' || M1.FG somehow designates a field. Comment out the
'FG' || part and it works. Note: when the literal is a suffix added instead
of a prefix I don't get the error. I don't know if the error is just for
IB_SQL or in one of your objects. Can't test it myself because we don't use
IBO here at work (Sorry about that), just your IB_Sql.
BTW: I have mentioned your IBO to my managers but we probably won't use them
since we may switch to DBISAM instead of Firebird. The type of processing
we do isn't working well with Firebird/InterBase.
Don Gollahon
gollahon@...
"The Original GenSoft Prodigal"
I have a stored procedure that works but when I copy the select part and put
it in a query statement in IB_SQL to test it I get an error. The error
says: "Field name: not found"
SELECT P1.COMPANY, CALL_DATE, M1.Trunk_id, M1.Carrier_id, 'FG' || M1.FG,
<===Error occures here
M1.WTN_Npa, M1.WTN_Nxx, M1.Usage_Date,
M1.Service_Code, M1.Originating_ind, M1.Jurisdiction,
M1.Data_Source, M1.Source_id,
sum(M1.CABS_msgs) as Cabs_msgs,
sum(M1.Actual_conv_duration) as Actual_conv_duration,
sum(M1.Access_time) as Access_time
FROM Master M1
left join EndOffce P1 on
((M1.wtn_npa=P1.Area_code)
and (M1.wtn_nxx=P1.Prefix))
Where
(Cabs_Extract = '2/3/2003')
and data_source = 'AMA'
and source_id = 2002021199
AND NOT ((RECORD_TYPE = 201) AND (FR_OCN <> ''))
GROUP BY P1.COMPANY, M1.CALL_DATE, M1.Trunk_id, M1.Carrier_id,
M1.FG, M1.WTN_Npa, M1.WTN_Nxx, M1.Service_Code,
M1.Originating_ind, M1.Jurisdiction, M1.Data_source,
M1.Source_id, M1.Usage_Date
It thinks the 'FG' || M1.FG somehow designates a field. Comment out the
'FG' || part and it works. Note: when the literal is a suffix added instead
of a prefix I don't get the error. I don't know if the error is just for
IB_SQL or in one of your objects. Can't test it myself because we don't use
IBO here at work (Sorry about that), just your IB_Sql.
BTW: I have mentioned your IBO to my managers but we probably won't use them
since we may switch to DBISAM instead of Firebird. The type of processing
we do isn't working well with Firebird/InterBase.
Don Gollahon
gollahon@...
"The Original GenSoft Prodigal"