Ask a Question related to Microsoft SQL / MS SQL Server, Design and Development.
-
Andrew J. Kelly #1
Re: change cursor code to set based code
INSERT INTO TableA (Col1, Col2...)
SELECT Col1,Col2... FROM TableB
--
Andrew J. Kelly
SQL Server MVP
"Andrea Worley" <k_rage@hotmail.com> wrote in message
news:089901c34559$5c6cb5a0$a001280a@phx.gbl...> Is there a way to insert a SELECT statement result into an
> existing table in a stored proc? Currently, I do a select
> statement to get the data I want, then I use a cursor to
> walk through the records, inserting each one into a log
> table. I can't use a view and DTS to append these records
> because I hard code some values and there is an autonumber
> in the table I am inserting to.
>
> So, is there a way to use a view and DTS even with these
> factors? Or is there a way to append the SELECT results
> in a stored proc without using cursors? I'm just trying
> to find a more efficient method. Thank you.
Andrew J. Kelly Guest
-
preformatted HTML code from XSL by (C# based) ASP.NETobject?
Hi, sorry for the long-winded message title. I'm working with other peoples code. My outputted HTML code, after its been transformed through XSL... -
CF-based calendar code?
Hi, I am looking for some simple code that will generate a monthly HTML-based calendar with back/forward for each month. Something exceedingly... -
Cache a user control based on a Property in the code behind.
I have a user control that is placed on every page to provide a menu system, logout/login buttons etc. This contect varies in depending on the... -
What's the cursor code for a white arrow???
Does anyone know the anwser to the above question? Thanks. Nick -
perl code to test my C based CGI application
Already tried cgi newsgroup to no avail. I'm a Perl begginner, and it's starting to look like Perl is the best way to do this. I have a C based... -
Andrea Worley #2
Re: change cursor code to set based code
Thanks so much. It's the simple things that get you
sometimes. That worked perfectly.
an>-----Original Message-----
>INSERT INTO TableA (Col1, Col2...)
> SELECT Col1,Col2... FROM TableB
>
>
>--
>
>Andrew J. Kelly
>SQL Server MVP
>
>
>"Andrea Worley" <k_rage@hotmail.com> wrote in message
>news:089901c34559$5c6cb5a0$a001280a@phx.gbl...>> Is there a way to insert a SELECT statement result intoselect>> existing table in a stored proc? Currently, I do arecords>> statement to get the data I want, then I use a cursor to
>> walk through the records, inserting each one into a log
>> table. I can't use a view and DTS to append theseautonumber>> because I hard code some values and there is an>>> in the table I am inserting to.
>>
>> So, is there a way to use a view and DTS even with these
>> factors? Or is there a way to append the SELECT results
>> in a stored proc without using cursors? I'm just trying
>> to find a more efficient method. Thank you.
>
>.
>Andrea Worley Guest



Reply With Quote

