Forum Replies Created

Viewing 15 posts - 6,721 through 6,735 (of 7,187 total)

  • RE: Large Table Design

    Rob

    If you don't have any indexes on your table then you can't have a fill factor.  I would recommend starting off by creating a clustered index at the very least.  You...

  • RE: Plzzzzzzzzzzzz help - Replication Problem

    Shaimaa

    I'd be surprised if it's the speed of your connection that's causing the failure.  When you get the failure message, double-click on the failed agent in Enterprise Manager and you...

  • RE: Simple Select statement help

    Should work... Try this:

    SELECT show_name FROM My_Table WHERE show_name LIKE 'My hunter%'

    This will verify whether you have the correct data in your table.

    John

  • RE: Execute Query

    Make sure you have indexes properly defined on the two tables you are selecting from.  Best candidates are those columns used in joins and WHERE clauses.  Maybe a covering index...

  • RE: Get last record only if multiple exist

    Jim

    Yes - you did specify "based on a date".  So you can do it like this:

    SELECT TOP 1 EmpName, EmpDateTime, EmpData

    FROM Employees

    WHERE EmpID = @EmpID

    ORDER BY EmpDateTime DESC

    John

  • RE: Get last record only if multiple exist

    Jim

    You haven't given us much to go on!  Assuming you're not bothered which record you retrieve, something like this:

    SELECT TOP 1 EmpName, EmpDateTime, EmpData

    FROM Employees

    WHERE EmpID = @EmpID

    John

  • RE: Different Query plans for a same query on the same database

    Have you read about parameter sniffing?

    John

  • RE: T-SQL required

    Hemant

    I've run the query with your data and got 21 rows, as expected.  I suspect that what you have done is not to have cleared out the temp table before...

  • RE: Different Query plans for a same query on the same database

    You should not be surprised that changing the parameters results in a different executions plan since the number of rows returned is likely to be different and so the most...

  • RE: Replicating large batch inserts

    Anil

    If Andrew's suggestion doesn't work in your environment, try breaking down your insert into smaller batches.  That way, the first batch can be replicating on to the subscriber while the...

  • RE: T-SQL required

    Hemant

    Please post the output of this query:

    SELECT CustomerCode, InvoiceDate, InvoiceAmount

    FROM tblCustomerInvoice 

    ORDER BY CustomerCode ASC, InvoiceDateTime DESC

    John

  • RE: HELP WITH GROUP BY CLAUSE-URGENT

    Asim

    Have you tried

    GROUP BY YEAR(LossDate)

    and

    GROUP BY MONTH(From_Date)?

    John

  • RE: enabled AWE

    OK - if you want the operating system only to use 1GB of RAM (instead of the default of 2GB), which I presume you do since you've set SQL Server...

  • RE: SQL Install

    Harris

    I imagine that if you include the characters "password" in your password, then the setup program will construe that as not being a strong password.

    John

  • RE: Query output formatting problem

    Pivoting data in SQL Server 2000 can be done, but it's clumsy and cumbsersome.  Search this site - there are plenty of answers to this sort of problem.

    What I'd do...

Viewing 15 posts - 6,721 through 6,735 (of 7,187 total)