Viewing 15 posts - 571 through 585 (of 1,109 total)
Rama (12/3/2007)
Pls Execuse me for giving late reply. I was away from my office.
Even i am setting for single column as you said for foreign key references i am...
December 3, 2007 at 6:50 am
Ramesh (12/3/2007)
Well, you need to interchange * with /
You are right, (I probably need to sleep more)
You'll surely need...:D
Actually, I did indeed mean *.
multiplying the year (or part...
December 3, 2007 at 6:33 am
You are right, (I probably need to sleep more) 🙂
A corrected version is:
DATEPART( wk, '3/12/2007' ) + (DATEPART( yyyy, '3/12/2007' )-1950) * 53
(the *53 should be on the year...
December 3, 2007 at 6:06 am
You could try to add spaces as a prefix, and then take the rightmost n characters, e.g.:
selectright(space(10) + rtrim('hi'), 10)
union all
selectright(space(10) + rtrim('hello'), 10)
The result is:
----------
...
December 3, 2007 at 5:41 am
Prakash (12/3/2007)
Dear All,I want to get the records created in a particular week.
if i pass 3/12/2007 i want to get the records created in that week
You could use :
datepart(wk, '3/12/2007')*53...
December 3, 2007 at 5:34 am
skarsbo (12/3/2007)
I wonder if it is possible to use the step-by-step method backup/recovery to upgrade the database from 2000 to 2005 and at the same time convert between 32 and...
December 3, 2007 at 2:34 am
Another thought, do not forget about the indexes 🙂 If you are deleting a large number of rows, you may want to disable unused indexes, and then rebuild them.
Regards,
...
November 30, 2007 at 8:27 am
Chris Gierlack (11/30/2007)
November 30, 2007 at 8:23 am
bjohnson (11/30/2007)
Rameesh - I tried the query but it failed with this error:
Msg 156, Level 15, State 1, Line 6
Incorrect syntax near the keyword 'OVER'.
Msg 102,...
November 30, 2007 at 7:43 am
Try having the following select part:
SELECT MAX(COALESCE(ih.max_P21_no, iha.max_acclaim_no)) AS last_invoice_no
, cs.customer_id
, max(cs.CUSTOMER_NAME)
Regards,
Andras
November 30, 2007 at 7:15 am
AVB (11/30/2007)
After testing the constraint...
November 30, 2007 at 7:05 am
You could use dynamic SQL like:
declare @q varchar(1000)
set @q = 'SELECT * FROM ' + @tableName
exec (@q)
Regards,
Andras
November 30, 2007 at 5:23 am
Rama (11/29/2007)
Hi Andras,Thank you for your response.
Primary key is already defined on the table.
My requirement is FK with empno and empname with emp.
You can add a unique index...
November 29, 2007 at 7:45 am
You need to create a unique index or a primary key on the referenced table. In your case you can do this with:
ALTER TABLE [test].[emp]
ADD CONSTRAINT [PK_Emp]
PRIMARY KEY...
November 29, 2007 at 7:25 am
Imke Cronje (11/29/2007)
...
set rowcount 1000
while (select * from [Table] with (nolock) where createdt between '2007-04-16' and '2007-04-30')
BEGIN
delete from [Table] where createdt between '2007-04-16 00:01:00.000' and '2007-04-16 03:16:02.000'
if @@rowcount =...
November 29, 2007 at 7:19 am
Viewing 15 posts - 571 through 585 (of 1,109 total)