Forum Replies Created

Viewing 15 posts - 91 through 105 (of 222 total)

  • RE: T-SQL variable

    I'd insert the logic intop a separate sp:

    create procedure myproc

    @dGetDT datetime output,

    @bVal bit = 0

    as

    begin

    set nocount on

    if (@bVAL = 0 )

    set @dGetDT = getdate()

    else

    set @dGetDt = '2000-02-24 00:00:00.000'

    end

    go

    declare @dGetDT datetime

    declare...

  • RE: Network performance on large inserts...

    Updating separate batches of columns doesn't sount too good - you'll have to use COM+/MTS and create a transaction to ensure ACIDity. COM+ objects work with having a master object...

  • RE: Differences script

    One posibility would be to generate scripts and save them as text files. The files could be compared in SourceSafe or TextPad which will both list the differences.

    Paul Ibison

    Paul.Ibison@btinternet.com

  • RE: T-SQL variable

    If the declarations are in the exec statement then it will work ok:

    declare @vSTR varchar(100), @bVAL binary

    set @vSTR = 'declare @vVAL int , @dGetDT datetime '

    set @bVAL = 1

    if...

  • RE: Case in Where clause

    This is called "lazy evaluation" - I have a script on this site which shows an example. I think it's really only of academic interest in SQL for everything but...

  • RE: How do I keep the @@identity the same - Restore

    Sorry Brian - just got to read your comments.

    I suppose then that the value of @@identity is really dependant on a individual's OLEDB connection and what statements have been...

  • RE: How do I keep the @@identity the same - Restore

    Has another insert been run subsequent to the insert onto the original table (having an identity column)? If there has, and the new insert affects a table not having an...

  • RE: Moving Records between tables

    Apologies for above - replied to wrong topic!!

    Paul Ibison

    Paul.Ibison@btinternet.com

  • RE: Moving Records between tables

    As for the user auditing this is really an interesting question and perhaps deserves its own topic but anyway, on projects I've worked on it depends on the architecture you're...

  • RE: Installing Applications on a Production Server

    My reflex is similar to yours, and in projects I've worked on before the webserver hosted the vb com+ dlls in mts, which meant that this layer was abstracted from...

  • RE: Archive generated CSV file

    In a DTS ActiveX script this will rename a file called c:\misc\xxx.txt - try it out.

    Dim fs, sFilePath, sDestinationPath

    Set fs = CreateObject("Scripting.FileSystemObject")

    sFilePath = "c:\misc\xxx.txt"

    sDestinationPath = "c:\misc\yyy.txt"

    If fs.FileExists(sFilePath) Then

    ...

  • RE: Archive generated CSV file

    Usually manipulating files is done using the file system object in an ActiveX Script in the DTS package, or alternatively in an xp_cmdshell script (which could be done as a...

  • RE: Moving Records between tables

    In BOL have a look at INSERT INTO... Adding rows With Insert - there is an example and it's pretty straightforward. I personally wouldn't use a timestamp. I think it...

  • RE: Moving Records between tables

    DTS is great for copying and transforming data between datasources, but in your case you're dealing with just SQL Server so I'd not use it. I would use INSERT INTO...

  • RE: HELP! SQL is freaking out.

    Might be helpful to narrow it down further:

    can you get any cmdshells to work?

    does the select work ok on its own in QA?

    can you run the bcp command (with servername)...

Viewing 15 posts - 91 through 105 (of 222 total)