Forum Replies Created

Viewing 15 posts - 166 through 180 (of 498 total)

  • RE: problem on TSQL expresion

    It seems to me that you would be better off to use a self join rather than the subselect. Since I don't know your schema this is a little hard...

  • RE: Create Excel XLS from T-SQL (Append)

    anderson,

    Have you simply tried a direct insert using the OPENDATASOURCE syntax?

    INSERT INTO OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0'

        ,'Data Source="<FilePath>.xls";User ID=Admin;Password=;Extended properties=Excel 8.0'

        )...Sheet1$

    (Field1, Field2)

    SELECT Field1, Field2

    FROM Foo

     

  • RE: Adding Columns to table in the proper order

    First off, I've never worried about column ordering. If I need to add a column I just add it and never look back. Since all my database access is usually...

  • RE: How to FileCopy LAN to DMZ using SQL?

    I haven't tried this but what if you turn your insert statement into an SP on the DMZ side. Then simply pass the blob data as a parameter?

  • RE: How do I show progress of backup in query analyzer message window?

    Mike,

    Great idea, unfortunately I never think about it until AFTER I start a process and by then it's too late. The other problem is you would have to actually do...

  • RE: How do I show progress of backup in query analyzer message window?

    From another window in QA you should be able to run a query against the table you are updating to see watch the results change by using the NOLOCK hint....

  • RE: Error occuring during Restoring database

    As Alzdba stated use sp_who2 to find out who is connected. Then if you want to kick them off use KILL along with thier SPID that was in sp_who2. Just...

  • RE: How to FileCopy LAN to DMZ using SQL?

    Yikes, glad I'm not working in that environment!

    I would hate to have to do this but... you could write a simple VB app...

  • RE: Scripting ALTER TABLE - and ALTER STORED PROCEDURE

    Lars,

    I don't know of any way to script them in bulk using alter rather than create. In Query Analyzer if you right click in the object browser on Views, SPs,...

  • RE: Best Practice - Copy Database

    As Thomas stated I would use backup/restore to move the database. For the dts packages (I think they are actually stored in the msdb database) I would manually open them...

  • RE: Error, The process could not deliver update(s) at the publisher

    If you look at the merge agent history for the one that failed on you the error should still be in the history if you go to the session details....

  • RE: Prompt for user input

    I concur with Frank. Also since SQL2K is the "BACK END" you should create a stored procedure that accepts parameters and then have a "FRONT END" application pass those parameters...

  • RE: Next Number

    If you are doing this from VB then I would suggest calling the sp with all paramters for both records. Then have the sp do all the inserts. If it...

  • RE: EXPORT TO XML

    Look for the "FOR XML" clause in SQL Books Online.

    SELECT Field1, Field2

    FROM FOO FOR XML AUTO

  • RE: Next Number

    As Frank stated I would use the scope_identity() function. If you are doing the inserts within a SP then this not a problem at all for multi-user scenarios. Simply insert...

Viewing 15 posts - 166 through 180 (of 498 total)