Viewing 15 posts - 76 through 90 (of 141 total)
SELECT sysobjects.name AS ObjectName, syscomments.text AS DDL
FROM syscomments INNER JOIN
sysobjects ON syscomments.id = sysobjects.id
WHERE (sysobjects.xtype IN ('U', 'V'))
Filter accordingly.
December 13, 2006 at 4:11 pm
To find out which PolicyNumbers are duplicated,
Select T.PolicyNumber, TempCount, GECount from
(Select PolicyNumber, COUNT(PolicyNumber) as TempCount
from #temp group by PolicyNumber ) T
join
(Select PolicyNumber, COUNT(PolicyNumber) as GECount
from GE_ReservesFile group by PolicyNumber) G
on...
December 13, 2006 at 3:22 pm
First, you need to know the file position of your 11282006 differential backup from your 'E:\MSSQL\BACKUP\db1_backup_11012006' backup file. Use
RESTORE HEADERONLY from disk = 'E:\MSSQL\BACKUP\db1_backup_11012006'
Take nore of the POSITION number of...
December 13, 2006 at 3:11 pm
Is there a unique (no duplicate) column common to both tables? Is PolicyNumber Unique?
Try this first on both tables..
Select COUNT(distinct PolicyNumber) from ...
Compare the results. If You still get 123...
December 13, 2006 at 2:19 pm
Create Full Text Indexes on your catalog and use the FREETEXT predicate in your select statements. You can also look into FREETEXTTABLE for returning resultsets by rank.
December 13, 2006 at 2:04 pm
To give way for version 10.0. Hahaha!
December 12, 2006 at 10:10 pm
I believe he is talking about Crystal Reports as he mentioned in one of his other posts. This is the classic header detail report.
December 12, 2006 at 10:07 pm
If you normally load the data (bulk), the index statistics would normally be off. You can use ...
select * from tbl_ORD_CUST (Index(idx_order_id)) where c_order_id = @x
December 12, 2006 at 5:15 pm
Source : Select dept_id, dep_name, member_name from table1
Grouping : dept_id
Grouping Header : Dep_name
Details Section : member_name
December 12, 2006 at 5:07 pm
Hahaha! I really enjoy reading the thread when it's posted by Best!
December 12, 2006 at 4:29 pm
If you read Ninja's links,
http://www.sommarskog.se/dynamic_sql.html
http://www.sommarskog.se/dyn-search.html
http://www.sommarskog.se/arrays-in-sql.html
you'd find out that your syntax should be..
EXEC('
SELECT [' + @Weight + '] FROM ShippingRates WITH (NOLOCK) WHERE ShipMethod=''' + @theShipMethod +...
December 12, 2006 at 3:46 pm
Use the return statement in your procedure to return an Integer value.
i.e.
Create proc ReturnTest
as
declare @E int
select 1/0
set @E = @@error
If @E <> 0
begin
print 'Error encountered'
return @E
end
December 12, 2006 at 3:28 pm
Picture it this way...
Suppose I only want 10 random numbers of any number from 1 to 10. Your solution will give me the numbers 1 to 10 in a random...
December 11, 2006 at 4:57 pm
Please note that 'Last Run Date' contains both the date and the time the job was run. Running MAX on it would consider both the date and time.
December 11, 2006 at 4:44 pm
Viewing 15 posts - 76 through 90 (of 141 total)