Viewing 15 posts - 5,281 through 5,295 (of 7,506 total)
Just replace the @var with the column name in the select clause.
I tend to test with @-variables so there is no residue left behind afterwards.
Glad you figured it out 😉
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 and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 30, 2008 at 11:57 pm
IMO Bulk Insert (check BOL) is what might serve you better.
e.g.
BULK INSERT mydb.myschema.myobject
from '\\UNC_path\myobjectdata.txt'
WITH
( FIELDTERMINATOR = ''
--,CODEPAGE =...
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 and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 30, 2008 at 1:21 pm
So is this what you are looking for ?
declare @myfile varchar(256)
set @myfile='D:\MailRoomImporter\incoming_documents\releases\OC\11000248.pdf'
Select datalength(@myfile)
SELECT @myfile
, substring(@myfile, 40, datalength(@myfile)) as TheRest
, CHARINDEX('\',substring(@myfile, 40, datalength(@myfile)),1) as theslash
, substring( substring(@myfile, 40, datalength(@myfile)), 1,...
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 and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 30, 2008 at 1:12 pm
You'll have to name those columns (in the exact sequence as needed for your target table) from the source table.
Using query analyser, in the object explorer, rightclick the source table,...
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 and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 30, 2008 at 1:04 pm
thank you for the feedback (urls and demo script) 😎
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 and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 29, 2008 at 1:48 am
if the SQL2005 SP2 release is to be considered an omen for SQL2008 ....
I'm right there with you :doze::blink:
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 and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 29, 2008 at 12:37 am
- Can you post the DDL for the PF, PS, the table and all its indexes ?
and the results for :
/*
show partitioned objects
*/
select distinct
p.[object_id],
...
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 and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 28, 2008 at 5:18 am
and whyle you're at it ....
Split user object and system objects.
Create another filegroup, set it to be the default.
Move all your tables/clustered indexes to it.
There will be no immediate profit,...
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 and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 28, 2008 at 12:31 am
- use auto update stats in the database options. This way you can lower the frequency of your updatestatistics job
Is this a SQL2005 enterprise edition ?
also schedude online index...
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 and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 27, 2008 at 12:58 am
yep.
That's how I would do it.
btw.you can install the instance using dynamic ports, up to the sp/cu level you want it to be and then fix the portnumber.
Maybe it isn't...
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 and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 27, 2008 at 12:54 am
If you cannot convert to set-based inserts (preferable bulk inserts) ...
skip the "if exists" but use the new SQL2005 try catch methode and put a unique constraint at the field...
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 and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 26, 2008 at 12:02 pm
just my 2 ct
- with mass deletes:
- limit the number or deletes per transaction to avoid (dead) locking.
- perform full table(s) maintenance after the operation to...
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 and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 25, 2008 at 3:59 am
-if the cmdshell hadn't been actived, the exec would never work.
- put a print statement right befor the exec statement
print 'cmd: ' + @cmd
this way you'd...
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 and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 25, 2008 at 12:16 am
well ... let's hope you are on SP2 with at least CU4.
- install MS performance dashboard (download free at MS):cool:
download it an install at as well client as server. It...
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 and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 23, 2008 at 1:14 pm
By the way (almost forgot)... they haven't fixed the code windows on this forum, yet. If you just copy and paste, they come out all on one line.
If you...
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 and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 23, 2008 at 8:15 am
Viewing 15 posts - 5,281 through 5,295 (of 7,506 total)