Viewing 15 posts - 91 through 105 (of 222 total)
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...
Paul Ibison
Paul.Ibison@replicationanswers.com
January 29, 2002 at 5:50 am
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...
Paul Ibison
Paul.Ibison@replicationanswers.com
January 28, 2002 at 10:55 am
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
Paul.Ibison@replicationanswers.com
January 28, 2002 at 9:36 am
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...
Paul Ibison
Paul.Ibison@replicationanswers.com
January 28, 2002 at 3:56 am
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...
Paul Ibison
Paul.Ibison@replicationanswers.com
January 18, 2002 at 9:28 am
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...
Paul Ibison
Paul.Ibison@replicationanswers.com
January 18, 2002 at 8:36 am
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...
Paul Ibison
Paul.Ibison@replicationanswers.com
January 18, 2002 at 8:24 am
Apologies for above - replied to wrong topic!!
Paul Ibison
Paul Ibison
Paul.Ibison@replicationanswers.com
January 9, 2002 at 5:20 am
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...
Paul Ibison
Paul.Ibison@replicationanswers.com
January 9, 2002 at 5:17 am
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...
Paul Ibison
Paul.Ibison@replicationanswers.com
January 8, 2002 at 9:32 am
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
...
Paul Ibison
Paul.Ibison@replicationanswers.com
January 8, 2002 at 7:04 am
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...
Paul Ibison
Paul.Ibison@replicationanswers.com
January 8, 2002 at 5:04 am
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...
Paul Ibison
Paul.Ibison@replicationanswers.com
January 8, 2002 at 4:57 am
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...
Paul Ibison
Paul.Ibison@replicationanswers.com
January 8, 2002 at 3:15 am
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)...
Paul Ibison
Paul.Ibison@replicationanswers.com
January 4, 2002 at 9:59 am
Viewing 15 posts - 91 through 105 (of 222 total)