Forum Replies Created

Viewing 15 posts - 13,696 through 13,710 (of 13,838 total)

  • RE: Listing the Top 10 records

    Excellent, never used that before. Far better than my suggestion.

  • RE: Listing the Top 10 records

    If you re-read the original post, you will see why the straightforward 'top 10' method will not work in this case.

  • RE: Listing the Top 10 records

    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...

  • RE: SQL Error

    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...

  • RE: How to identify SQL Server busy?

    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...

  • RE: Join Issues

    Maybe. To get rid of any duplicate records that are being returned by your query, try using

    select distinct

    instead of just select.

  • RE: Script to "find" table...

    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....

  • RE: OpenDataSource import with leading zeroes in Excel doc fields

    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...

  • RE: Script to "find" table...

    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...

  • RE: I dont want datatime datatype ...just date

    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...

  • RE: Join Issues

    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...

  • RE: How connect Yukon in ASP code?

    No problem!

  • RE: Join Issues

    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.

  • RE: Join Issues

    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

  • RE: Aussie conversion problem

    Perhaps you could run Profiler to check the SQL Server side of the equation? Otherwise, I'm running out of ideas.

    Good luck

    Phil

Viewing 15 posts - 13,696 through 13,710 (of 13,838 total)