Forum Replies Created

Viewing 12 posts - 76 through 87 (of 87 total)

  • RE: ERROR with ACE.OLEDB not working after several tries

    Is there a particular error that you're getting when you try the ACE provider?

  • RE: Migrate Oracle data to sql server

    Just a thought, are you using nchar/nvarchar/ntext to store your character data?

  • RE: Stored Proc to send an Email?

    You could also google sp_send_cdosysmail.

  • RE: Linked Servers 2005 to 2008

    If you're logged onto the 2005 host or the 2008 host, are you able to ping the other server, either by hostname or IP?

  • RE: Linked Servers 2005 to 2008

    We've created linked servers on SQL 2005 pointing to SQL 2008 and vice versa with no problems. What's the exact error that you're getting?

  • RE: table not using index

    Updates to fields not covered by the index would not cause any extra overhead of maintaining the index, so no concerns there.

    You just want to keep in mind...

  • RE: table not using index

    If you're using all three columns as possible criteria, go from most unique to least in the index. Of course, if this is a relatively static table, there's no...

  • RE: table not using index

    Since you're not including the Active field in the index, SQL Server isn't going to use it for that query. If it did, it would first scan the index,...

  • RE: Trigger - Access to filepath?

    USE AdventureWorks;

    GO

    CREATE TABLE myTable(

    FileName nvarchar(60),

    FileType nvarchar(60),

    Document nvarchar(max));

    GO

    ALTER TRIGGER myTrig

    ON myTable

    INSTEAD OF INSERT

    AS

    DECLARE @filename nvarchar(60);

    DECLARE @filepath nvarchar(60);

    DECLARE @sqlstmt nvarchar(4000);

    DECLARE @document nvarchar(max)

    SELECT @filename = Filename FROM inserted ;

    SET @filepath...

  • RE: AVG function on varchars

    Hopefully I understand what you're trying to do here. I made a test scenario:

    create table satisfaction(

    sati_satiidsmallint,

    sati_quickly char(1),

    sati_informed char(1),

    sati_lettersunderstand char(1),

    sati_recommend char(1)

    )

    go

    declare @i smallint

    set @i = 1

    while @i <= 100

    begin

    insert into...

  • RE: Why does it take longer to run a script through a linked server?

    My suggestion, especially since you're only referencing remote tables, use OPENQUERY.

    select * from OPENQUERY(SQLDB-02,

    'select a.CustomerID, b.LineItemNumber,

    sum(case when datepart(yyyy,InvoiceDate)=2010 and datepart(mm,InvoiceDate)<=1 then ShipQuantity*ItemShippingVolume else 0 end) YTD

    from [FSDBRP].dbo.FS_ARInvoiceHeader...

  • RE: TSQL Help

    Would this work for you?

    select State,County,City, lunch_year, lunch_month, actual_lunch_date, served

    ,(select avg(l.served) from lunches l where l.state = lunches.state and l.county = lunches.county and l.city = lunches.city

    and l.actual_lunch_date between dateadd(yy, -2,...

Viewing 12 posts - 76 through 87 (of 87 total)