Showing posts with label series. Show all posts
Showing posts with label series. Show all posts

Monday, March 12, 2012

Generating a series of numbers or dates?

I want to generate a resultset that is just a series of numbers in
ascending order or perhaps a series of dates.. What I mean is, is
there a way to generate a temporary table of dates given an input of a
start date and an end date.. This table would then contain an entry
for each date in ascending order from the start date to and including
the end date..

Or perhaps with numbers, given a start of 5 and and end of 7
the resulting table would be

5
6
7

Would appreciate any help with this one.. Thanks
ChrisThe usual technique is just to keep these as permanent tables in your
database and then SELECT numbers and dates out of them as required.

Dates:

CREATE TABLE Calendar
(caldate DATETIME NOT NULL PRIMARY KEY)

INSERT INTO Calendar (caldate) VALUES ('20000101')

WHILE (SELECT MAX(caldate) FROM Calendar)<'20101231'
INSERT INTO Calendar (caldate)
SELECT DATEADD(D,DATEDIFF(D,'19991231',caldate),
(SELECT MAX(caldate) FROM Calendar))
FROM Calendar

Numbers:

CREATE TABLE Numbers
(num INTEGER PRIMARY KEY)

INSERT INTO Numbers VALUES (1)

WHILE (SELECT MAX(num) FROM Numbers)<8192
INSERT INTO Numbers
SELECT num+(SELECT MAX(num) FROM Numbers)
FROM Numbers

--
David Portas
----
Please reply only to the newsgroup
--|||Refer to:
http://www.bizdatasolutions.com/tsql/tblnumbers.asp

--
-- Anith
( Please reply to newsgroups only )

Generated RDL Causes Elements to Overlap

Howdy,
I'm generating a series of RDL reports using Python and Cheetah. It
seems to work great with one, huge problem: when I go to view the
reports in Visual Studio or when they're deployed, the report elements
overlap or are out of order.
Is there any non-absolute way to position elements using RDL? I can't
figure out how to even take just 3 textboxes and get them to flow down
a page without specifying their TOP coordinates. Sounds basic, but I'm
butting my head against the wall here. At best, they seem to flow in
reverse order.
Here's an example of some simple RDL that ends up overlapping (in
Visual Studio, which also warns me about overlapping) - any help at
all, conceptually or otherwise, would be much appreciated:
<ReportItems>
<Textbox Name="textbox1">
<rd:DefaultName>textbox1</rd:DefaultName>
<Width>1in</Width>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Height>0.25in</Height>
<Value>Test box 1</Value>
</Textbox>
<Textbox Name="textbox2">
<rd:DefaultName>textbox2</rd:DefaultName>
<Width>1in</Width>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Height>0.25in</Height>
<Value>Test Box 2</Value>
</Textbox>
<Textbox Name="textbox3">
<Width>1in</Width>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Height>0.25in</Height>
<Value>Test Box 3</Value>
</Textbox>
</ReportItems>My suggestion is to post this in the web forum. The newsgroup is pretty much
devoid of MS people and this is a pretty specific and unusual question, very
few people have generated RDL themselves. If you go to the web forum not
only might a MS person be hanging out there and provide an answer, the other
RS MVP hangs out there and he might be able to help you.
http://forums.microsoft.com/msdn/showforum.aspx?forumid=82&siteid=1
Bruce Loehle-Conger
MVP SQL Server Reporting Services
<moviegoer22@.gmail.com> wrote in message
news:1185472600.783495.246480@.22g2000hsm.googlegroups.com...
> Howdy,
> I'm generating a series of RDL reports using Python and Cheetah. It
> seems to work great with one, huge problem: when I go to view the
> reports in Visual Studio or when they're deployed, the report elements
> overlap or are out of order.
> Is there any non-absolute way to position elements using RDL? I can't
> figure out how to even take just 3 textboxes and get them to flow down
> a page without specifying their TOP coordinates. Sounds basic, but I'm
> butting my head against the wall here. At best, they seem to flow in
> reverse order.
> Here's an example of some simple RDL that ends up overlapping (in
> Visual Studio, which also warns me about overlapping) - any help at
> all, conceptually or otherwise, would be much appreciated:
> <ReportItems>
> <Textbox Name="textbox1">
> <rd:DefaultName>textbox1</rd:DefaultName>
> <Width>1in</Width>
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Height>0.25in</Height>
> <Value>Test box 1</Value>
> </Textbox>
> <Textbox Name="textbox2">
> <rd:DefaultName>textbox2</rd:DefaultName>
> <Width>1in</Width>
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Height>0.25in</Height>
> <Value>Test Box 2</Value>
> </Textbox>
> <Textbox Name="textbox3">
> <Width>1in</Width>
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Height>0.25in</Height>
> <Value>Test Box 3</Value>
> </Textbox>
> </ReportItems>
>

Friday, February 24, 2012

Generate linked series

Hi,
I would like to generate the following:
suppose we have the following table:
Table1:
Col1 Col2
a b
a c
d e
f c
d b
Then the result should give the following series:
b, a, c
a, b, d
a, c, f
e, d, b
b, a, c, f
Anyone an idea what would be the fastest way to resolve this?
Thanx in advance...
PeterThere are no built-in SQL statements which generates such series. The sample
data somewhat resembles hierarchical data representation. Please search
google for "Nested Sets" and "Path Enumeration" which are two commonly used
approaches to tackle such problems.
Anith|||You need to provide more info about what you want... I had a hard time even
discerning a pattern between the table data and the desired output, and the
one pattern I seemed to get doesn't make any sense...
(because of the fact that you have both "b, a, c" AND "b, a, c,, f" in
the output...)
"PeterM" wrote:

> Hi,
> I would like to generate the following:
> suppose we have the following table:
> Table1:
> Col1 Col2
> a b
> a c
> d e
> f c
> d b
> Then the result should give the following series:
> b, a, c
> a, b, d
> a, c, f
> e, d, b
> b, a, c, f
> Anyone an idea what would be the fastest way to resolve this?
> Thanx in advance...
> Peter
>|||Hi CBretana,
The logic behind it is the following:
I try to search for all possible length "paths" (until the longest path is
found);
these are created by using each row and see if one of the two columns in the
row also exist in another row, if this is the case I concatenate the result
as a "path" (and where the "link" value is only used once in the string).
I hope you see the point?
Peter
"CBretana" wrote:
> You need to provide more info about what you want... I had a hard time eve
n
> discerning a pattern between the table data and the desired output, and th
e
> one pattern I seemed to get doesn't make any sense...
> (because of the fact that you have both "b, a, c" AND "b, a, c,, f" in
> the output...)
> "PeterM" wrote:
>|||Hi,
Let me just explain where this would be useful:
by using the sp_fkeys on all tables in a relational design, I could build a
result table containing rows with all the PK_Table and their related FK_Tabl
e
info.
With this table I would search for all possible "paths" within my relational
design no matter the "depth" of the "path".
In this way I could easily generate, no matter which tables I would give as
input, the shortest path to connect these input tables together and make a
dynamic join statement.
That's why I'm really interested in a solution (preferably also performant).
Peter
"CBretana" wrote:
> You need to provide more info about what you want... I had a hard time eve
n
> discerning a pattern between the table data and the desired output, and th
e
> one pattern I seemed to get doesn't make any sense...
> (because of the fact that you have both "b, a, c" AND "b, a, c,, f" in
> the output...)
> "PeterM" wrote:
>|||Peter,
Don't you want to restrict the generation of these paths to go in one
direction only? what I mean is that a value in Column 1 of some row of the
table that also exists in Column 1 of another record is an intrinsically
different kind of relationship than when it exists in Column 2 of some other
row in the table.. Using the example you describe in yr oother post, one
column is PKs, and other would be FKs, right ? In that case would you ever
WANT to create "Path" that connects two values becase they were both in the
FK column of the table ' That would not imply any relationship at all...
"PeterM" wrote:
> Hi CBretana,
> The logic behind it is the following:
> I try to search for all possible length "paths" (until the longest path is
> found);
> these are created by using each row and see if one of the two columns in t
he
> row also exist in another row, if this is the case I concatenate the resul
t
> as a "path" (and where the "link" value is only used once in the string).
> I hope you see the point?
> Peter
> "CBretana" wrote:
>|||CBretana,
No I don't want any restriction because it is perfectly possible that two
tables are lnked to eachother by their FK_Table; how else would you represen
t
many to many relationships?
Peter
"CBretana" wrote:
> Peter,
> Don't you want to restrict the generation of these paths to go in one
> direction only? what I mean is that a value in Column 1 of some row of th
e
> table that also exists in Column 1 of another record is an intrinsically
> different kind of relationship than when it exists in Column 2 of some oth
er
> row in the table.. Using the example you describe in yr oother post, one
> column is PKs, and other would be FKs, right ? In that case would you ev
er
> WANT to create "Path" that connects two values becase they were both in t
he
> FK column of the table ' That would not imply any relationship at all...
> "PeterM" wrote:
>|||The right way to represent a many-to-many relationship is with a thord table
containing a multple-column (composite) primary Key, consisting of the Both
Primary Keys from the two other tables that have the many-to-many
relationship.
In this third table there is a single Composite PK, and 2 Foreign Keys, one
each to the PK of each of the two original tables.
"PeterM" wrote:
> CBretana,
> No I don't want any restriction because it is perfectly possible that two
> tables are lnked to eachother by their FK_Table; how else would you repres
ent
> many to many relationships?
> Peter
> "CBretana" wrote:
>|||CBrentana,
The third table you're talking about is exactly the FK_table of my example.
If you would run sp_fkeys on the PK_Tables the result would be two rows:
PK_Table1 - FK_Table
PK_Table2 - FK_Table
By linking the result of these two rows you would find the path to link
PK_Table1 with PK_Table2 (through the FK_Table in common).
which is exactly the point of depart.
So I hope you understand the question now (since you confirmed the point of
the many-to-many relationships).
Look I'm more interested in a solution of my question than in trying to
convince you in the "usefullness" of my question, if this would still be you
r
concern.;-)
Thanx...
Peter
"CBretana" wrote:
> The right way to represent a many-to-many relationship is with a thord tab
le
> containing a multple-column (composite) primary Key, consisting of the Bot
h
> Primary Keys from the two other tables that have the many-to-many
> relationship.
> In this third table there is a single Composite PK, and 2 Foreign Keys, on
e
> each to the PK of each of the two original tables.
>
> "PeterM" wrote:
>|||CBrentana,
In reviewing your answers I noticed we're both using different terms.
You're talking about FK_columns, where I'm talking about FK_Tables.
The columns of my examples contain Tables (PK_Tables or FK_Tables) and not
PK-FK columns (that would indeed make no sense). So instead of thinking in
terms of columns change to tables and you'll see that it makes sense :-)
Peter
"PeterM" wrote:
> CBrentana,
> The third table you're talking about is exactly the FK_table of my example
.
> If you would run sp_fkeys on the PK_Tables the result would be two rows:
> PK_Table1 - FK_Table
> PK_Table2 - FK_Table
> By linking the result of these two rows you would find the path to link
> PK_Table1 with PK_Table2 (through the FK_Table in common).
> which is exactly the point of depart.
> So I hope you understand the question now (since you confirmed the point o
f
> the many-to-many relationships).
> Look I'm more interested in a solution of my question than in trying to
> convince you in the "usefullness" of my question, if this would still be y
our
> concern.;-)
> Thanx...
> Peter
>
> "CBretana" wrote:
>

Generate insert statement for table

I have data in a table that I wish to transfer to a remote system (both SQL
2000).
Is there an easy way to generate a series of insert statements from my
database so I can transfer this text file to my remote system. If possible
I like to be able to exclude data with a where statement.
Regards
Jeff
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.564 / Virus Database: 356 - Release Date: 19/01/2004http://vyaskn.tripod.com/code.htm#inserts
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Jeff Williams" <jeff.williams@.hardsoft.com.au> wrote in message
news:Oxo8g173DHA.540@.tk2msftngp13.phx.gbl...
quote:

> I have data in a table that I wish to transfer to a remote system (both

SQL
quote:

> 2000).
> Is there an easy way to generate a series of insert statements from my
> database so I can transfer this text file to my remote system. If

possible
quote:

> I like to be able to exclude data with a where statement.
> Regards
> Jeff
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.564 / Virus Database: 356 - Release Date: 19/01/2004
>
|||Here's a PERL script for generating SQL INSERT statements.
The script deals with all data types, except image and
sql_variant, but including the user defined data types.
#############Begin script###########
# Created by: Linchi Shea
use strict;
use Data::Dumper;
use Win32::ODBC;
use Getopt::Std;
my %opts;
getopts('S:d:t:', \%opts);
my ($server, $dbName, $tbName) = ($opts{S}, $opts{d}, $opts
{t});
(defined $server && defined $dbName && defined $tbName) or
printUsage();
Main: {
my $connStr = "Driver={SQL Server};Server=$server;" .
"Database=$dbName;Trusted_Connection=yes";
my $conn = new Win32::ODBC($connStr) or
die "***Err: " . Win32::ODBC::Error();
my ($columnRef, $attribRef) = getColumnProperties
($tbName, $conn);
my $sql = constructINSERT($columnRef, $attribRef,
$conn);
print $sql;
$conn->Close();
} # Main
############################
sub getColumnProperties {
my($tbName, $conn) = @._;
my @.columns;
my %attrib;
if (! $conn->Sql("select * from $tbName where 1=2") ) {
1 while $conn->FetchRow();
# first get the data type for each column
my @.fields = $conn->FieldNames();
%attrib = $conn->ColAttributes($conn-
quote:

>SQL_COLUMN_TYPE_NAME, @.fields);

# in case the data type is user defined, we need
# the real data type to help us decide how to handle
# the retrieved data in an INSERT statement
foreach my $field (@.fields) {
if (! $conn->Sql("sp_help '$attrib{$field}'") )
{
while($conn->FetchRow()) {
my ($type) = $conn->Data("Storage_type");
$attrib{$field} = $type;
}
}
if ($attrib{$field} =~ /^(image|sql_variant)$/i) {
die "***Err: data type $attrib{$field} not
supported.\n";
}
push @.columns, $field if lc($attrib{$field})
ne 'timestamp';
}
}
else {
die "***Err: failed to run select * from $tbName
where 1=2.\n";
}
return (\@.columns, \%attrib);
} # getColumnProperties
########################
sub constructINSERT {
my($columnRef, $attribRef, $conn) = @._;
(scalar @.$columnRef && scalar %$attribRef) or
die "Err: \$columnRef or \$attribRef is empty.\n";
my $sql;
if (! $conn->Sql("select * from $tbName") ) {
# now get the data values for each row
while ($conn->FetchRow()) {
$sql .= "INSERT $tbName (" . join(',',
@.$columnRef) . ")\n";
my @.values = ();
my %data = $conn->DataHash();
# decide how to handle the VALUE clause of the
INSERT
foreach my $column (@.$columnRef) {
# the values of these data types can be used
as is
if ($attribRef->{$column}
=~ /int|smallint|bigint|tinyint|
bit|decimal|numeric|money|
smallmoney|float|real
/ix) {
if (defined $data{$column}) {
push @.values, $data{$column};
}
else {
push @.values, 'NULL';
}
}
# the values of these types must be quoted
with a pair of
# single quotation marks
elsif ($attribRef->{$column}
=~ /datetime|smalldatetime|
char|varchar|nchar|nvarchar|
text|ntext|uniqueidentifier
/ix) {
if (defined $data{$column}) {
$data{$column} =~ s/'/''/g;
push @.values, "'$data{$column}'";
}
else {
push @.values, 'NULL';
}
}
# the binary data must be converted to a HEX
string format
elsif ($attribRef->{$column}
=~ /binary|varbinary
/ix) {
if (defined $data{$column}) {
push @.values, '0x' . unpack("H*", $data
{$column});
}
else {
push @.values, 'NULL';
}
}
else {
print "***Assert: invalid code path. Skip
this row.\n";
next;
}
}
$sql .= "VALUES (" . join(',', @.values) . ")\n";
}
}
return $sql;
} # construtcINSERT
###################
sub printUsage {
print << '--Usage--';
Usage:
cmd>perl GeneratedataInserts.pl -S <SQL server or
instance>
-d <database name>
[ -t <table name> ]
--Usage--
exit;
} # printUsage
##############End script###############
quote:

>--Original Message--
>I have data in a table that I wish to transfer to a

remote system (both SQL
quote:

>2000).
>Is there an easy way to generate a series of insert

statements from my
quote:

>database so I can transfer this text file to my remote

system. If possible
quote:

>I like to be able to exclude data with a where statement.
>Regards
>Jeff
>
>--
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.564 / Virus Database: 356 - Release Date:

19/01/2004
quote:

>
>.
>
|||If that's your sole purpose, you can get by more easily with
1. creating a separate db
2. put the data in a table in that db
3. backup that db
4. do the reverse on the remove server.
"Jeff Williams" <jeff.williams@.hardsoft.com.au> wrote in message
news:Oxo8g173DHA.540@.tk2msftngp13.phx.gbl...
quote:

> I have data in a table that I wish to transfer to a remote system (both

SQL
quote:

> 2000).
> Is there an easy way to generate a series of insert statements from my
> database so I can transfer this text file to my remote system. If

possible
quote:

> I like to be able to exclude data with a where statement.
> Regards
> Jeff
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.564 / Virus Database: 356 - Release Date: 19/01/2004
>

Generate insert statement for table

I have data in a table that I wish to transfer to a remote system (both SQL
2000).
Is there an easy way to generate a series of insert statements from my
database so I can transfer this text file to my remote system. If possible
I like to be able to exclude data with a where statement.
Regards
Jeff
--
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.564 / Virus Database: 356 - Release Date: 19/01/2004http://vyaskn.tripod.com/code.htm#inserts
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Jeff Williams" <jeff.williams@.hardsoft.com.au> wrote in message
news:Oxo8g173DHA.540@.tk2msftngp13.phx.gbl...
> I have data in a table that I wish to transfer to a remote system (both
SQL
> 2000).
> Is there an easy way to generate a series of insert statements from my
> database so I can transfer this text file to my remote system. If
possible
> I like to be able to exclude data with a where statement.
> Regards
> Jeff
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.564 / Virus Database: 356 - Release Date: 19/01/2004
>|||Here's a Perl script for generating SQL INSERT statements.
The script deals with all data types, except image and
sql_variant, but including the user defined data types.
#############Begin script###########
# Created by: Linchi Shea
use strict;
use Data::Dumper;
use Win32::ODBC;
use Getopt::Std;
my %opts;
getopts('S:d:t:', \%opts);
my ($server, $dbName, $tbName) = ($opts{S}, $opts{d}, $opts
{t});
(defined $server && defined $dbName && defined $tbName) or
printUsage();
Main: {
my $connStr = "Driver={SQL Server};Server=$server;" .
"Database=$dbName;Trusted_Connection=yes";
my $conn = new Win32::ODBC($connStr) or
die "***Err: " . Win32::ODBC::Error();
my ($columnRef, $attribRef) = getColumnProperties
($tbName, $conn);
my $sql = constructINSERT($columnRef, $attribRef,
$conn);
print $sql;
$conn->Close();
} # Main
############################
sub getColumnProperties {
my($tbName, $conn) = @._;
my @.columns;
my %attrib;
if (! $conn->Sql("select * from $tbName where 1=2") ) {
1 while $conn->FetchRow();
# first get the data type for each column
my @.fields = $conn->FieldNames();
%attrib = $conn->ColAttributes($conn-
>SQL_COLUMN_TYPE_NAME, @.fields);
# in case the data type is user defined, we need
# the real data type to help us decide how to handle
# the retrieved data in an INSERT statement
foreach my $field (@.fields) {
if (! $conn->Sql("sp_help \'$attrib{$field}\'") )
{
while($conn->FetchRow()) {
my ($type) = $conn->Data("Storage_type");
$attrib{$field} = $type;
}
}
if ($attrib{$field} =~ /^(image|sql_variant)$/i) {
die "***Err: data type $attrib{$field} not
supported.\n";
}
push @.columns, $field if lc($attrib{$field})
ne 'timestamp';
}
}
else {
die "***Err: failed to run select * from $tbName
where 1=2.\n";
}
return (\@.columns, \%attrib);
} # getColumnProperties
########################
sub constructINSERT {
my($columnRef, $attribRef, $conn) = @._;
(scalar @.$columnRef && scalar %$attribRef) or
die "Err: \$columnRef or \$attribRef is empty.\n";
my $sql;
if (! $conn->Sql("select * from $tbName") ) {
# now get the data values for each row
while ($conn->FetchRow()) {
$sql .= "INSERT $tbName (" . join(',',
@.$columnRef) . ")\n";
my @.values = ();
my %data = $conn->DataHash();
# decide how to handle the VALUE clause of the
INSERT
foreach my $column (@.$columnRef) {
# the values of these data types can be used
as is
if ($attribRef->{$column}
=~ /int|smallint|bigint|tinyint|
bit|decimal|numeric|money|
smallmoney|float|real
/ix) {
if (defined $data{$column}) {
push @.values, $data{$column};
}
else {
push @.values, 'NULL';
}
}
# the values of these types must be quoted
with a pair of
# single quotation marks
elsif ($attribRef->{$column}
=~ /datetime|smalldatetime|
char|varchar|nchar|nvarchar|
text|ntext|uniqueidentifier
/ix) {
if (defined $data{$column}) {
$data{$column} =~ s/\'/\'\'/g;
push @.values, "\'$data{$column}\'";
}
else {
push @.values, 'NULL';
}
}
# the binary data must be converted to a HEX
string format
elsif ($attribRef->{$column}
=~ /binary|varbinary
/ix) {
if (defined $data{$column}) {
push @.values, '0x' . unpack("H*", $data
{$column});
}
else {
push @.values, 'NULL';
}
}
else {
print "***Assert: invalid code path. Skip
this row.\n";
next;
}
}
$sql .= "VALUES (" . join(',', @.values) . ")\n";
}
}
return $sql;
} # construtcINSERT
###################
sub printUsage {
print << '--Usage--';
Usage:
cmd>perl GeneratedataInserts.pl -S <SQL server or
instance>
-d <database name>
[ -t <table name> ]
--Usage--
exit;
} # printUsage
##############End script###############
>--Original Message--
>I have data in a table that I wish to transfer to a
remote system (both SQL
>2000).
>Is there an easy way to generate a series of insert
statements from my
>database so I can transfer this text file to my remote
system. If possible
>I like to be able to exclude data with a where statement.
>Regards
>Jeff
>
>--
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.564 / Virus Database: 356 - Release Date:
19/01/2004
>
>.
>|||If that's your sole purpose, you can get by more easily with
1. creating a separate db
2. put the data in a table in that db
3. backup that db
4. do the reverse on the remove server.
"Jeff Williams" <jeff.williams@.hardsoft.com.au> wrote in message
news:Oxo8g173DHA.540@.tk2msftngp13.phx.gbl...
> I have data in a table that I wish to transfer to a remote system (both
SQL
> 2000).
> Is there an easy way to generate a series of insert statements from my
> database so I can transfer this text file to my remote system. If
possible
> I like to be able to exclude data with a where statement.
> Regards
> Jeff
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.564 / Virus Database: 356 - Release Date: 19/01/2004
>