http://home.iprimus.com.au/billmcc/PlatformVB/dun/contents.htm
This is a good site that will tell you how to use the rasapi's. It has all the code you will need for dial-up networking
i think this is what you ment
declare @var varchar(50)
select @var = (select alias from Wherever)
exec('Select column_name as [' + @var + '] from table')
I think that is what you are tyying to do
add a col;umn to the database called _transfered with 0 and 1 the only add able values. then create a trigger on the table that when a record is added the value is cahnged to true.
Hope this helps
a idea could be to do the count as a if statement and if it is 0 then raise error then you could use the on failure method in the dts to capture this.
No idea if this will work but its a idea.
you can save as a structured storage file, this will save on a hard drive and can then be moved about on a floppy or something between computers.
To load it on the live computer from enterprise manager right click on the data transformation services folder and chose open, then save to sql...
I would use CallDate + RecNo as the PK, for the only reason that for searching on the table it will be quicker. A identity column would not be too helpful to you in this instance unless you where going to use it in every day life.
This is my opinion hope it is usefull.
with a three column table col1 would be the identity, for the first go the value of 1 would go into col1 automatically.
insert into test (col2,col3) values ('test','test again')
you could create a job using sqlserver agent, if you do this make sure the sqlserver is not login on as local system.
Within the job have 4 steps one for each job. The steps would look like this
master..xp_cmdshell 'dtsrun /S servername /E /N dtsname'
that should sort it out then you could...
bcp example - this is used from the dos prompt not through query analyzer this gets the data out
bcp "select * from database..tablename" Queryout name.txt -c -T
bulk insert example -run through query analyzer this gets the data in
bulk insert tablename from 'location'
check how the sqlserver agent, and mssqlserver is set up, what user is it loging on as, if it is local system then this can be a reason for it not working.
this is another way to do it, this will only work if the table does not exist in the new datbase
select * into otherdatabase..tablename from source_table
otherwise you will need to do
insert into otherdatabasae..tablename
(
columns go here, * will not work
)
select columns or * from...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.