I keep receiving this error when calling a Stored Procedure. This works fine
when running it on a 2000 box. Any Ideas
Redhat 6.2
CF 4.5.1 sp2
"Error","TID=54280","12/07/00","13:32:37","208.193.16.144","Mozilla/4.0
(compatible; MSIE 5.01; Windows NT 5.0)","ODBC Error Code = 01000 (General
warning)<P><P> [MERANT][ODBC SQL Server Driver][libssclient15]ConnectionRead
(select()).
<----- Stored Procedure ---->
CREATE PROCEDURE dbo.unplaced_leads_for_abt @startdt datetime, @enddt
datetime AS
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
BEGIN TRANSACTION
SET NOCOUNT ON
/*--- Set the hour start & end time for queries ---*/
SELECT @startdt = @startdt + ' 00:00:00', @enddt = @enddt + ' 23:59:59'
CREATE TABLE #leads_placed
(
quote_id int,
)
CREATE TABLE #leads_total
(
quote_id int,
)
/* select placed leads table. */
insert into #leads_placed
SELECT ql.quote_id
FROM quote_log ql
JOIN quote_log_dealers qld
ON ql.quote_id = qld.quote_id
JOIN auto_dealers_contracts adc
ON adc.dealer_id = qld.dealer_id
JOIN auto_lead_contracts_exclusive alce
ON ql.type = alce.type
AND ql.franchise = alce.make_id
AND ql.zipcode = alce.zip
AND adc.contract_id = alce.contract_id
JOIN contracts c
ON c.contract_id = alce.contract_id
WHERE ql.requested_on >= c.contract_start_dt
AND ql.requested_on <= c.contract_end_dt
AND ql.requested_on >=@startdt
AND ql.requested_on <=@enddt
AND ql.type = 1
UNION
SELECT ql.quote_id
FROM quote_log ql
WHERE NOT route = 0
and ql.requested_on >=@startdt
and ql.requested_on <=@enddt
and type = 1
/* select total leads */
insert into #leads_total
select quote_id
from quote_log ql
where ql.requested_on >=@startdt
and ql.requested_on <=@enddt
and type = 1
/* remove placed leads */
delete from #leads_total
where quote_id in ( select quote_id
from #leads_placed)
/* select unplaced leads */
select quote_id FROM #leads_total
/* drop temp tables */
drop table #leads_placed
drop table #leads_total
COMMIT TRANSACTION
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-linux%40houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_linux or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.