Viewing 15 posts - 12,946 through 12,960 (of 13,445 total)
I think you'll want to avoid any functions like CONVERT and CHARINDEX in your joins/where clauses, as that requires a full table scan in order to get the data so...
October 17, 2006 at 1:01 pm
here's a simple example: assuming ('TBSTATE','TBSTATE','TBCOUNTY') is the lookup tables that should not be deleted
declare @level tinyint
set @level = 0
create table #tables (
id int not null primary...
October 17, 2006 at 8:13 am
i think id' try to use a subselect and max function:
SELECT PKColumn,othercolumns,MAX(DerivedDate) from
sometable
left outer join
(select PKColumn,DateColumn1 as DerivedDt from sometable UNION
select PKColumn,DateColumn2 as DerivedDt from sometable UNION
select PKColumn,DateColumn3 as DerivedDt...
October 17, 2006 at 8:07 am
Big Brother® is a Web-based systems and network monitor. A universal color-code interface of "red is bad and green is good" allows anyone to measure the health of a network...
October 17, 2006 at 8:02 am
i'd speculate that someone tried to truncate a table that was referenced by a foreign key, got an error, and assumed that it was not supported;
truncate table deletes all the...
October 5, 2006 at 7:29 am
to really help, we'll need the real schema; use enterprise manager, select the table, right click>>All Tasks>>Generate SQL Scripts
paste the results here;
you can join the same table on itself when you...
October 4, 2006 at 1:21 pm
without knowing the table structure for sure, something like the sql below is what you need. an inner join shows only matches...so if a company in table1 did not have...
October 4, 2006 at 7:33 am
My shop is similar to yours Tristan; we deploy upgrade scripts that add tables or columns, alter columns, migrate data, etc. Those scripts are expected to be performed on lots...
October 4, 2006 at 6:34 am
After I Saw Davids answer, I gave my head a good slap because I knew better; I had even started writing a function when David posted the right answer.;
October 4, 2006 at 6:28 am
you can use Enterprise manager to create the scripts for you;
go to design view, edit the design of the table and notice the little used button at the top named...
October 3, 2006 at 9:59 am
The answer really is no; the right way to do it is to create a new table witht he column in the middle, migrate the data to the new table,...
October 3, 2006 at 9:26 am
you might be confusing a VIEW with "dynamic tables"; a VIEW is really a SELECT statement which has been saved, and is automatically updated whenever the underlying tables it references are...
October 3, 2006 at 7:15 am
here's my suggestions.
SELECT PRODUCTCODE, CONVERT(VARCHAR(30),EVENTDATE,103) Startdate,
COUNT(DISTINCT(PERSONURN)) AS 'BILLABLE CDRS',
COUNT(*) - COUNT(DISTINCT(PERSONURN)) AS 'COUNTS',
SUM(CASE WHEN EVENTTYPE & 4 = 4 THEN 1 ELSE 0 END) AS 'CUSTOMER',
SUM(CASE WHEN...
October 3, 2006 at 6:02 am
why can't you import into SQL , and after the import is completed alter the column definition to be a datetime field, or add datetime columns and migrate the data...
September 27, 2006 at 6:28 am
I think it has to do with the filepath containing a space between 'jeff seeman' and 'Documents and Settings' as well;
so it finds the file 'c:\Documents' and fails.
if a filepath...
September 19, 2006 at 6:00 am
Viewing 15 posts - 12,946 through 12,960 (of 13,445 total)