Viewing 15 posts - 10,981 through 10,995 (of 13,462 total)
do you mean using the WITH clause with a Common Table expression, or do you mean where you use the WITH clause to use a hint, like WITH(TABLOCKX)?
a CTE would...
June 12, 2009 at 10:09 am
I think you have two choices; raise an error like you were planning, but you could also use an INSTEAD OF trigger, and ignore any changes to the ID column,...
June 12, 2009 at 10:01 am
you'd be looking for a DELETE or TRUNCATE command; there's nothing in place to look at where it happened.
the default trace would have information if the table was dropped, but...
June 12, 2009 at 9:35 am
here's what i do:
i create a view for any trace i create, so I can easily access it.
here's a code example:
--review all my traces
select * from sys.traces
--find the path to...
June 12, 2009 at 8:33 am
excellent. with the table definitions it is REALLY easy for us to help. good job providing us with that.
here's a basic example that works; note the key is to use...
June 12, 2009 at 7:30 am
this is known as a "running totals" problem. running totals require a defined ORDER BY...wkether it is a PK, or alphabetically, or whatever...your example so far does not meet the...
June 12, 2009 at 7:04 am
here's the first way i thought of: compare the value to the convert(,int) of itself.
declare @number decimal(18,4)
Set @number = 10.0
--here's one way, compare the value to the integer conversion of...
June 12, 2009 at 6:37 am
the CONVERT function has a third parameter which has some built in formats for converting datetime to varchar:
char to datetime:
select convert(datetime,'090611',12)
--results:
2009-06-11 00:00:00.000
and going the other way, datetime to char
select convert(varchar,getdate(),12)
--results:
090611
using...
June 11, 2009 at 6:44 pm
Andras gave you an example; we thought you could extrapolate.
note the assumption that with the data, there is always space and then the two digit state code.
here is a...
June 11, 2009 at 6:21 pm
i think you are missing a reference; try adding
Imports System.Collections
to the top of your class. IEnumeration is a member of System.Collections.
June 10, 2009 at 11:26 am
the issue is the way exclusive locks work.
a lock prevents the SELECT,UPDATE/INSERT/DELETE of the table.
it does not prevent the selecting of the current ident value, or reviewing of any other...
June 10, 2009 at 11:08 am
why are you selecting @CurrentId from an identity value manually? INSERT into the table and get the Scope_Identity() its the right way to do it. it looks like you are...
June 10, 2009 at 9:38 am
andy.gear (6/10/2009)
June 10, 2009 at 7:44 am
Viewing 15 posts - 10,981 through 10,995 (of 13,462 total)