Forum Replies Created

Viewing 15 posts - 1,351 through 1,365 (of 1,472 total)

  • RE: cross-referencing values

    Thanks for the creation scripts. Is there any reason you can't simply do this?

    [font="Courier New"]SELECT DISTINCT *

    FROM ptAppointments P

           INNER JOIN coApptResources C ON LTRIM(RTRIM(REPLACE(REPLACE(REPLACE(P.Location,'-SOUTH',''),'-NORTH',''),'CHRISTOPHER J ',''))) =...

  • RE: wants to add an integer value to a column which is char type.

    What issues are you running into in your attempt that you need help with?

    declare @C char(2),

    @d char(2)

    set @C = '01'

    set @d = '10'

    select

  • RE: sp_execute returns error

    You are trying to execute a dynamic sql statement with the variable actually in the statement. Usually, when you use dynamic sql you'd do something like

    SET @sql...

  • RE: Selecting more recent child record with parent

    SQL 2000 Version:

    [font="Courier New"]SELECT I.*, V.*

    FROM Items I    

       INNER JOIN Versions V ON I.Ref = V.Item_Ref

       INNER JOIN (SELECT Item_Ref, MAX(Ref) Ref FROM Versions GROUP BY Item_Ref) V2 ON...

  • RE: Find and Replace Script Needed

    Yes, but he also wants to replace B100 with B98, so as long as he does that replace first, he should be fine in that particular case. However, it...

  • RE: Help needed in removing dynamic SQL

    There definitely wouldn't be any manual typing in. It would all be check boxes or drop downs. However, because it's on the internet, I'm not necessarily happy with...

  • RE: Help needed filling in values based on previous row

    Jeff Moden (10/16/2008)


    Garadin (10/15/2008)


    While my subquery seems to fit all that criteria, I'm not sure that it's creating a triangular join in this case. The subquery method is blazingly...

  • RE: Sproc to upd tbl in a different server

    Assuming you are using linked servers, you should just be able to replace:

    Update Mytable

    Set Myfield = MyData

    FROM Mytable

    WHERE MyCriteria = Something

    With

    Update Server2.Database2.dbo.MyTable

    Set Myfield = MyData

    FROM Server2.Database2.dbo.MyTable

    WHERE MyCriteria = Something

    You don't...

  • RE: SPROC works way slower than SELECT statement

    We noticed something similar in attempting to do cross server queries with views. I believe the difference comes in because doing it one way will pull the entire dataset...

  • RE: SQL COMPLEX QUERY - Urgent

    Yep, those were the answers I was expecting. The above query should work fine.

  • RE: SQL COMPLEX QUERY - Urgent

    Just saw your edit. Try this one:

    [font="Courier New"]DECLARE @Language   VARCHAR(10)

    SET @Language = 'JP'

    SELECT DISTINCT T1.ID, COALESCE(T2.Name, T3.Name) Name, COALESCE(T2.Description, T3.Description) Description,

           COALESCE(T2.Language, T3.Language) Language

    FROM #Table1 T1

       LEFT JOIN...

  • RE: SQL COMPLEX QUERY - Urgent

    Yeah, that changes things a bit. A few questions.

    You supply a language and return a row for each ID, attempting to grab the one for that language. If...

  • RE: SQL COMPLEX QUERY - Urgent

    That makes more sense. Thank you for the table definitions / inserts, it makes things much easier. (Although in the future, try to make sure they work 😉 )

    [font="Courier...

  • RE: How to run a .bat file on the second sql server, from DTS on the first sql server?

    PSExec ? (Part of PSTools) That's kinda a shot in the dark, I haven't tried it, as I don't do much with DTS.

  • RE: SQL Server 2000

    You can handle it in many ways.

    A few are:

    Passing in the date to the table along with the values being updated from ASP, and updating it...

Viewing 15 posts - 1,351 through 1,365 (of 1,472 total)