You are here: Re: How do I use pass data to/from stored procedure « MsSQL Server « IT news, forums, messages
Re: How do I use pass data to/from stored procedure

Posted by rcamarda on 05/03/06 04:12

Thanks Erland.

For now, I'll try the cursor and one at a time, till I get better
aquanted with the process. I would guess that Yahoo would frown on
batch API calls (they have a 24 hour limit of 50,000 records).
This is what I have so far:

declare @c1 float, @c2 float, @c3 varchar(50), @c4 varchar(50), @state
varchar(10), @zip varchar(10), @country varchar(20)
declare @precision varchar(50), @warning varchar(50)
declare @address1 varchar(50), @city varchar(50)
declare @appid varchar(20)

set @appid = 'warehouse-test'

declare cur cursor fast_forward
for select top 10 student_address1, student_city, student_state,
'warehouse-test'
from student

open cur
fetch next from cur into @address1, @city, @state, @appid
while @@fetch_status = 0
begin
exec SPGeocode @address1, @city, @state, 'warehouse-test'
fetch next from cur into @c1, @c2, @c3, @c4, @state, @zip,
@country, @precision, @warning
end
close cur
deallocate cur



When I execute, I get one row returned, then an error:

Msg 16924, Level 16, State 1, Line 17
Cursorfetch: The number of variables declared in the INTO list must
match that of selected columns.
My confusion is that I need 4 parameters for the procedure, but it
returns more columns.
Do I need to pad the columns, simular to have same number columns when
using a UNION with selects?
TIA
Rob

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация