Viewing 15 posts - 13,696 through 13,710 (of 13,838 total)
Excellent, never used that before. Far better than my suggestion.
September 23, 2004 at 5:38 pm
If you re-read the original post, you will see why the straightforward 'top 10' method will not work in this case.
September 23, 2004 at 12:28 am
I think the way to do this is to find the top 10 'counts' and then to return all the records that have these counts.
So, if your table is called...
September 22, 2004 at 9:50 pm
Assuming that you are using Enterprise Manager ...
When you perform the restore, the default paths for the restored files (database and transaction log) will be the same as they were...
September 22, 2004 at 9:38 pm
You could also leave Profiler running and analyse the resulting trace around the 'slow' times to see whether you can identify what is causing the slowness (and therefore whether you...
September 17, 2004 at 12:32 am
Maybe. To get rid of any duplicate records that are being returned by your query, try using
select distinct
instead of just select.
September 16, 2004 at 6:18 pm
Glad I could help.
I imagine you're after a SQL script that will recreate the database (minus the data). The way that I would do this is in Enterprise Manager....
September 16, 2004 at 6:14 pm
Just checking - are the zip codes defined as text or numeric within Excel? If they are numeric, that is your problem (regardless of how they are displayed in...
September 15, 2004 at 8:47 pm
It's not pretty, but see whether this helps:
declare @sql varchar(400)
set @sql = 'select * from ?.information_schema.tables where table_name = ''[tablename]'''
exec sp_msforeachdb @sql
--replace [tablename] with the name of the table you...
September 15, 2004 at 8:40 pm
The original poster asked for a way of retrieving just the date part of a datetime field. Your method returns exactly the opposite - the time part - in a...
September 14, 2004 at 8:37 pm
Hi Ed
We need to get to the bottom of why so many records are being returned first, I think. This is almost certainly because of the fact that you have...
September 14, 2004 at 6:57 pm
Should work. Is state_id a text field? Then you'd need
state_id = '101'
Or does it need to be trimmed?
trim(state_id) = '101'
Aha ... just seen your amended post - good.
September 10, 2004 at 12:50 am
Something like this?
select t.transporter_name, a.state_id
from transporters t left outer join association a on
t.transporter_id = a.transporter_id
where state_id = 101 or state_id is null
September 10, 2004 at 12:36 am
Perhaps you could run Profiler to check the SQL Server side of the equation? Otherwise, I'm running out of ideas.
Good luck
Phil
September 9, 2004 at 11:20 pm
Viewing 15 posts - 13,696 through 13,710 (of 13,838 total)