Viewing 15 posts - 1 through 15 (of 23 total)
huh? I just tried it and it worked...
March 1, 2005 at 10:25 pm
Hm.. never thought about using EXISTS. Thanks for the tip! so this is much better?
SELECT * FROM Table1 where EXISTS ( SELECT 1 FROM Table2 WHERE v = Table1.Val )
March 1, 2005 at 10:14 pm
oops, sorry, here's the correct version:
SELECT * FROM Table1 where Val IN ( Select v FROM Table2 )
-or-
SELECT * FROM Table1 where ( SELECT COUNT(1) FROM Table2 WHERE v = Table1.Val )...
March 1, 2005 at 10:06 pm
i see... so this is more efficient right? okay thanks!
and isn't LTRIM(...) needed anymore?
February 23, 2005 at 4:54 pm
I think the isnull function is necessary because the record attributes could be an empty string
btw, thanks everyone for the help
February 22, 2005 at 3:57 pm
Wow! didn't think that was possible
Thanks much!
~Rafferty
February 21, 2005 at 2:31 am
hm.. i meant, for example MyTable contains:
ID | Record1 | Record2 | Record3
1 | 'data' | NULL | NULL
2 | NULL | NULL | NULL
3 | 'abc' | NULL | 'def'
after the sql query,...
February 21, 2005 at 1:34 am
I tried out using indexes and deleting the rows either buy chunks or not. But these methods turned out to take longer to process than using just the simple delete...
December 21, 2004 at 2:19 am
This won't work as there are foreign keys in the table so like what everyone is saying dropping or trunctating won't work. We...
December 19, 2004 at 6:17 pm
Hello there, sorry for the long reply I had to wait and ask for more details on this task I'm doing. Here's what I need:
I have one table and one...
December 16, 2004 at 8:00 pm
When you say "no other activity" this means that no one's using the entire database right? I don't think this'll work as I'm working on a real-time data.
Or does it...
December 15, 2004 at 2:21 am
You're right, we should consider that. Also, the deletes in our database will only take place at least every month so the effect on the users will be very minimal.
December 14, 2004 at 5:52 pm
hm.. then I guess my best option is to do what alzdba suggested because truncate does not support using conditions correct?
December 14, 2004 at 3:02 am
wow, now that's a stored proc that I haven't seen before. I also got this suggestion:
"rename the old table, create a new table with same schema and indexes, then drop...
December 14, 2004 at 2:00 am
whoa, I just found the Disconnected Edit, didn't know there was such a thing... I don't think these are found in Books Online which made it very difficult for me...
December 9, 2004 at 8:23 pm
Viewing 15 posts - 1 through 15 (of 23 total)