Re: sql query single table



On Mon, 2 Oct 2006 06:46:02 -0700, madgame wrote:

I seen mention of INSERT, but there's no
example so I'm not sure how to go about that. Can you give me an example of
how to use INSERT to post data which would be more helpful for you, to help
me? Thanks again.

Hi Madgame,

Sure:

INSERT INTO SomeTable (Column1, Column2)
SELECT 1, 'First row'
UNION ALL
SELECT 2, 'Second row'
UNION ALL
SELECT 3, 'Third row'

Replace table and columns names with names from your table, then use
apropriate data after each SELECT keyword.

Or as an alternative, use Vyas's script to generate INSERT statements
from the data in your DB: http://vyaskn.tripod.com/code.htm#inserts. But
this will only work if you already have a good set of test data in your
database.

BTW, did the quey I posted work for you?

--
Hugo Kornelis, SQL Server MVP
.