Viewing 15 posts - 46 through 60 (of 238 total)
It is better to put the most distinct restriction (date in this case) first anyway. You never know what surprises to expect from the optimizer. So why gamble? It become...
May 6, 2003 at 3:07 pm
Here is a modification of the script above to create a batch that would do the work. You would then apply the batch to the given database:
select 'ALTER TABLE '...
May 5, 2003 at 11:07 am
I think using a table variable instead of a temp table will help you:
DECLARE @t1 TABLE( c1 int, c2 varchar(10) )
now @t1 is a local table variable. Memory for it...
May 2, 2003 at 5:49 pm
WHERE invoicedate BETWEEN
DATEADD( mm, -6, CAST( CAST( DATEADD( dd, 1-DAY( getdate()), getdate() ) AS CHAR( 11 ) ) AS DATETIME ) )
AND
CAST( CAST( DATEADD( dd, 1-DAY( getdate()), getdate() )...
May 2, 2003 at 3:40 pm
If you are talking about JOIN condition, it is better and more correct in the JOIN clause, not in the WHERE clause. It is also better to limit your result...
May 2, 2003 at 3:10 pm
The code seems very complex and... "not SQL-like". It looks more like coding of nested function calls in a procedural 3GL. This is not really appropriate for SQL. God knows...
May 2, 2003 at 2:58 pm
No cursor, no stored procedure:
select
convert(sysname,db_name()) TABLE_QUALIFIER,
convert(sysname,user_name(o.uid)) TABLE_OWNER,
convert(sysname,object_name(o.id)) TABLE_NAME,
convert(sysname,user_name(p.grantor)) GRANTOR,
convert(sysname,user_name(u.uid)) GRANTEE,
convert(varchar(32),case p.action
when 193 then 'SELECT'
when 195 then 'INSERT'
when 196 then 'DELETE'
when 197 then 'UPDATE'
else 'REFERENCES'
end) PRIVILEGE,
convert(varchar(3),case...
March 28, 2003 at 11:43 am
quote:
This quote from your first post :
quote:
By the way, why usage of a...
March 24, 2003 at 11:14 am
UPDATE W
SET FTSTab = '1',
ReferenceTN = W2.TN
FROM AP_FTS_Working W
JOIN AP_FTS_Working W2
ON W2.FTSTab = '0'
AND W.FTSTab IS NULL
AND W.Acct_No = W2.Acct_No
March 20, 2003 at 1:27 pm
So what is the primary key on this table? What is the exact table definition?
March 19, 2003 at 3:24 pm
Is TestField1 column of type float? What if you output @val1 rught before the INSERT statement? What does it print?
You forgot to show me the CREATE TABLE statement.
I actualy...
March 19, 2003 at 3:15 pm
What is your exact table CREATE statement and exact INSERT statement?
March 19, 2003 at 2:15 pm
This is impossible unless you actually create that column. Your solution would be to implement business logic in a stored procedure or elsewhere, not in the trigger.
March 19, 2003 at 2:11 pm
It should be a part of Yukon beta 1, right?
March 18, 2003 at 5:37 pm
Viewing 15 posts - 46 through 60 (of 238 total)