Viewing 15 posts - 271 through 285 (of 1,347 total)
>>This field can contain a 0.
What does a zero mean in situation 1 ? NULL date ? Some other constnt past or future-dated date ?
Declare @NumDate1 as numeric(7,0),
@NumDate2 as...
August 29, 2006 at 2:38 pm
>>The good news is the rowset returned isn't out of order any more.
I would be concerned about the vendor's application quality if rowset order has a dependency on query plan.
It...
August 29, 2006 at 12:15 pm
>>for Reporting Services Report Builder which only allows tables and views.
Huh ? Since when did RS prevent use of stored procs ?
August 25, 2006 at 2:34 pm
>>I'm looking for the trigger to update the ChangeUser, ChangeDate, or both.
That changes things.
UPDATE TRASH
SET ChangeDate =
CASE WHEN d.ChangeDate <> i.ChangeDate THEN i.ChangeDate
ELSE GETDATE()
END,
CASE WHEN d.ChangeUser <> i.ChangeUser THEN...
August 25, 2006 at 2:24 pm
Use 2 datetime variables, and structure it as:
Declare @StartDate As Datetime
Declare @EndDate As DateTime
Select @StartDate = cast(convert(varchar,getdate(),112) As DateTime)
Select @EndDate = DateAdd(d, 1, @StartDate)
SELECT
...
WHERE CreateDate >= @StartDate
AND CreateDate < @EndDate
August 25, 2006 at 12:55 pm
Which version of SQL Server ? SQL 2005 has ranking functions which can supply a row number.
In SQL 2000, you'd need to first select into a temporary table with an...
August 25, 2006 at 11:35 am
So, the UPDATE may already have set the ChangeDate and ChangeUser column values ? And you only want the trigger code to fire if this *didn't* happen, correct ?
In this...
August 25, 2006 at 11:10 am
>>The application provides 2 variables: @ChangeDate, @ChangeUser
The application is VB.Net. Those are T-SQL variables. How does the application "provide" them ? As parameters to a stored proc ? And if so, what...
August 25, 2006 at 10:24 am
Why limit it to a SQL 2000 solution ?
Create Table #t ( RefNo Varchar(20) not null)
insert #t
select 'ABC-0' union all
select 'ABC-1' union all
select 'XYZ-0' union all
select 'XYZ-1' union all
select 'XYZ-02'...
August 25, 2006 at 10:14 am
>> It's SQL Server Standard, so I don't know what good the /3GB switch would do
It wouldn't do any good. But you hadn't mentioned Standard Edition or total RAM,...
August 25, 2006 at 8:28 am
>>the new one Windows 2003 Server Standard. The new server has the same RAM and # of processors (2),
How much RAM ?
Which edition of SQL Server on each server...
August 24, 2006 at 4:26 pm
Use dynamic SQL, so that the variable's value is passed to the linked server:
Declare @sql varchar(4000)
Select @sql = 'SELECT * FROM [Link].[DB}.[Owner].[TableName] Where SomeColumn = ''' + LocalVariable + '''...
August 24, 2006 at 3:46 pm
Use RaisError with a zero error code instead of PRINT.
Do you really need the loop and the continuous feedback ? Can't you just use WAITFOR ?
August 24, 2006 at 3:38 pm
"inserted" is a virtual table containing the row or rows being inserted. You can't Update it. You need to update dbo.sdata and join it to inserted on the primary key...
August 24, 2006 at 2:43 pm
Viewing 15 posts - 271 through 285 (of 1,347 total)