Viewing 15 posts - 6,916 through 6,930 (of 13,460 total)
sqlfriends (8/19/2011)
Lowell
August 19, 2011 at 9:33 am
unless you can make specific assumptions, there's no easy way to do this.
if the first x number of columns are the same across all csv files, that might be a...
Lowell
August 19, 2011 at 9:04 am
here's a snippet based on Seans example, that gets all the tables in FK hierarchy order and generates the Truncates/delete commands for you, so you don't have to drop and...
Lowell
August 19, 2011 at 8:58 am
sp_helplogins returns two different result sets.
here's a table of the first result set i got from running this and scripting the table:
/*
SELECT *
INTO #sp_helpLogins
FROM OPENROWSET('SQLOLEDB','Server=DEV223;Trusted_Connection=Yes;Database=Master',
...
Lowell
August 19, 2011 at 8:44 am
you can do it, but you still need an identity() column in your table.
here's an example, see how because of the assumed format with a max length of 5, you...
Lowell
August 19, 2011 at 7:26 am
R.P.Rozema (8/19/2011)
Lowell
August 19, 2011 at 7:10 am
just one more thing...you can do it kind of, but the stored proc must return unique column names
SELECT *
INTO #temp
FROM OPENROWSET('SQLOLEDB',
'Server=DEV223;
Trusted_Connection=Yes;
Database=Master',
'Set FmtOnly OFF;
EXEC dbo.sp_Who')
the above works.
if...
Lowell
August 19, 2011 at 6:59 am
Sorry Rob; i thought it was a low hanging fruit question....
I assumed somethign i should not have.
Lowell
August 19, 2011 at 6:55 am
oops i misread the question...no i do not know of a way to get the results of a procedure call into a dynamic table, oither than what you already asked...openrowset...
Lowell
August 19, 2011 at 6:39 am
i think something like this would be better than sp_msForEachDB:
I prever to generate possible statements, review and prune,a nd then run them when I'm ready
/*
USE SandBox; create master key encryption...
Lowell
August 18, 2011 at 2:18 pm
ok 3 years ago i posted this forum answer on the same subject, along with vb6 source code and sample stuff to download a web page:
http://www.sqlservercentral.com/Forums/Topic453789-5-1.aspx
read the article and see...
Lowell
August 18, 2011 at 12:36 pm
built in it's not possible...anything outside of a sql database requires something special.
you can do it with sp_OACreate, and get the data back in 4000 byte chunks untiol you have...
Lowell
August 18, 2011 at 12:19 pm
i think this does what you wanted;
i grabbed a subquery of the items that would be marked as closed....everything else would still be open, right?
SELECT
#TestTable.ParentId,
#TestTable.ChildId,
#TestTable.RecordType,
CASE
WHEN MyCloseItems.ParentId...
Lowell
August 18, 2011 at 9:42 am
@Name varchar(5000),
all your variables must be nvarchar, including the procs definition and the final resulting column;
otherwise you get an implicit converison, which changes it to quesiton marks...
Lowell
August 18, 2011 at 8:10 am
that error says the table already exists in the hwdata schema.
do a quick
select * from hwdata.DesktopSoft_Master
select * from dbo.DesktopSoft_Master
decide which one to keep (say dbo was the "good one"
then...
Lowell
August 18, 2011 at 7:19 am
Viewing 15 posts - 6,916 through 6,930 (of 13,460 total)