Viewing 15 posts - 46 through 60 (of 335 total)
Not quite a cursor and somewhat serial a solution (but still some of the glory of a set based solution):
Run a query to create a separate OSQL (or BCP) command line...
September 5, 2006 at 3:43 pm
Do an outer join to find those not there, for example
select a.id
from tbl1 a
LEFT OUTER JOIN tbl2 b on a.id=b.id
where b.id is null
will return only ids from rows in tbl1 that...
September 5, 2006 at 3:33 pm
"cross join" Doh!
I confess the stupid modern join syntax is a second language to those like me that have been doing SQL since before the alphabet was invented.
September 1, 2006 at 2:06 pm
I don't know. I've only ever used SQLprofiler traces to determine this, so short of using an ongoing trace.
But, in my experience it's never been a long time.
Unless you...
September 1, 2006 at 1:39 pm
Your description is still fuzzy, and you have no sample data, but here's what I do when faced with trickiness problems:
#1 Encapsulate in a stored proc. That is, don't plan...
September 1, 2006 at 1:35 pm
Use a join to get a cartesian of all
insert into ...
select b.itemid, a.custid
from customers a
join items b on 1=1
Add a filter for one cust or add the other...
September 1, 2006 at 1:24 pm
Yeah, there's this little message that occurs when compiling out of (dependent) sequence procs in SQL2k. It says right there that sysdepends ain't gonna be updated because one of the objects...
July 27, 2006 at 7:32 pm
That's effectively how it would work best. What I'd do different is encapsulate the string parsing in a reusable function though-- e.g. StringField( string, delimiter, positionnumber) to extract the substrings.
(There...
May 24, 2006 at 4:35 am
see the T-SQL REPLACE function in the help file
May 24, 2006 at 4:22 am
make a udf that returns a 1 or 0 (Y or N)
give it parameters:
check_date
include_or_exclude I/E
from_year_no 0,####
to_year_no 0,####
from_month_no 0,1-12
to_month_no 0,1-12
from_dom_no 0,1-31
to_dom_no 0,1-31
...
January 17, 2006 at 1:48 pm
I say pay the price for the design that doesn't anticipate changes like this.
But why do complex search and replace when you can do it only once?
Why not do the...
January 17, 2006 at 1:32 pm
Maybe it's because I've been a consultant for so many years, I've gotten the opportunity to see so many different permutations of designs and problems...
One case where DRI bogged massively...
January 9, 2006 at 4:28 pm
Hey, I agree with the developers that it degrades performance. I hate DRI. I have seen it bog things down unbelievably.
However, in my applications all data modifications happen in stored...
January 5, 2006 at 11:51 am
But, both Database and Log backups have to be from the same server/database.
December 21, 2005 at 5:00 pm
yes.
It's only in your RESTORE statement that you say that you're done (finished with th restore) or there's more (log backups) still to come (in your restoration process).
See RESTORE, and...
December 21, 2005 at 4:59 pm
Viewing 15 posts - 46 through 60 (of 335 total)