Viewing 15 posts - 10,516 through 10,530 (of 14,953 total)
This line, "WHERE DECODER_ID = DECODER_ID" will make it update every row. I think you want the second one to be a variable. Not sure which variable it's...
March 12, 2009 at 8:13 am
I try to make my maintenance plans as lazy as possible. I set them up to do the minimum necessary to make sure everything works well. That means...
March 12, 2009 at 8:10 am
You seem to have deleted the original question and all its specifications.
If it has a createddate field in the table, it should be a matter of using something like this:
select...
March 12, 2009 at 7:41 am
Sounds like it's not the shark tank it originally sounded like. Cool biz.
Good luck on getting the guy trained up. That's always a good thing.
March 12, 2009 at 6:51 am
Are you in a position where you can either add columns to the table or create an indexed view on the table?
If you add some calculated columns and index them,...
March 11, 2009 at 3:14 pm
SQL 2000:
Query Analyzer:
drop table YourTableName
Enterprise Manager:
Right-click table, select Delete
SQL 2005
Management Studio:
Right-click table, select Delete
drop table YourTableName
That'll get rid of the table completely.
Management Studio/Query Analyzer:
truncate table YourTableName
That'll empty the table out...
March 11, 2009 at 2:41 pm
You can issue a drop command on a table or view (or any other database object). That'll actually get rid of it. Is that what you want? ...
March 11, 2009 at 2:28 pm
skjoldtc (3/11/2009)
SELECT Response FROM dbo.Husband
WHERE Question = 'Honey, do I look fat in this?"
AND ...
March 11, 2009 at 2:26 pm
Here's how I'd handle that:
;with CTE
(Row, LookupCode, LookupID)
as
(select
row_number() over (partition by LookupCode order by othercode),
LookupCode,
LookupID
from
dbo.LookupTable)
UPDATE TempFactTable
SET CodeID = LookupID
FROM TempFactTable t
inner join CTE
on t.LookupCode = CTE.LookupCode
and Row...
March 11, 2009 at 2:22 pm
mhaskins (3/11/2009)
Steve Jones - Editor (3/11/2009)
I tend to think that we ought to have separate sample dbs.
GSquared (3/11/2009)
Separate databases also works.
I love the way it sounds much more official when...
March 11, 2009 at 2:16 pm
Are there a maximum of three tests? If so, this should do what you need:
CREATE TABLE #Table_3(
[Patient] [nchar](10) NULL,
...
March 11, 2009 at 2:07 pm
Charles Kincaid (3/11/2009)
Sorry GSquared. You answered an OR question by saying "Yes". That even more funny that the cartoon. :D:laugh::hehe::smooooth:
Boolean humor! Yep! (Too bad it's...
March 11, 2009 at 1:07 pm
Does the table in question have a column in it that holds the creation date?
Have you tried to write a query for this? If so, what problem are you...
March 11, 2009 at 1:06 pm
SQL Server will end up using as much RAM as you allow it, in most cases, not just to cache common data, but also hold execution plans, for execution space,...
March 11, 2009 at 1:02 pm
Viewing 15 posts - 10,516 through 10,530 (of 14,953 total)