May 31, 2005 at 3:25 am
how can I generate script for selected rows from a table using SQLDMO?
please help.
May 31, 2005 at 4:10 am
Check out Data Transformation Services (DTS) in your Enterprise manager.
This will be more simple and intuitive.
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
May 31, 2005 at 9:20 am
Agree with alzdba
Follow me on Twitter: http://www.twitter.com/way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
June 2, 2005 at 11:01 am
if you want to return query results, here's a vbscript sample.
'strict
option explicit
'dims
dim objServer, objDatabase, objQueryResults, strSQL, i
'vars
strSQL = "select distinct name from sysdtspackages"
'connect to server
set objServer = createobject("sqldmo.sqlserver")
objserver.loginsecure = true
objserver.connect "."
'execute query
set objQueryResults = objServer("msdb").ExecuteWithResults(strSQL)
'display results
for i = 1 to objQueryResults.Rows
wscript.echo objQueryResults.GetColumnString(i,1)
Next
'clean up
set objQueryResults = nothing
objServer.Disconnect
set objServer = nothing
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply