Viewing 15 posts - 49,441 through 49,455 (of 49,566 total)
Is you database in full recovery mode? If so, backup the log. That will truncate the log and allow you to shrink it.
If the database is in simple recovery mode,...
August 18, 2005 at 3:10 am
I can't believe I missed that.... ![]()
August 17, 2005 at 11:48 pm
There's a few problems with this, other than the obvious that a cursor is in no way necessary here.
You're never using the value you get from the cursor. I'm not...
August 17, 2005 at 3:47 am
Remove (dbo.t_Attachments.AttachmentID) from the Group By clause. Since you want a count of it, you don't also want to group by it.
August 16, 2005 at 4:38 am
Dynamic sql is, in general, a very bad idea. It, amoung other things, leaves you very open to certain vulnerabilities, eg sql injection. See http://www.sommarskog.se/dynamic_sql.html for more detail
That said...
The error means...
July 26, 2005 at 5:24 am
Well 8114 is an error converting data type. My guess is that one of the fields that you're comparing with '' is of a type that empty string doesn't convert...
July 25, 2005 at 3:18 am
Hi Killer
You're more likely to get useful responses to this if you post it in the SQL Server administration forum.
This forum is just for discussion of the site's Question...
July 25, 2005 at 3:09 am
Do the not null columns have defaults defined on them?
July 21, 2005 at 2:03 am
I think you should get a dev/playground database where you can try stuff out before running on live.
July 18, 2005 at 6:22 am
Unless I'm misunderstanding...
Update tbl set B=A where B IS NULL
tbl Before
| A | B |
|---|---|
| 1 | a |
| 2 | NULL |
| 3 | NULL |
| 4 | d |
tbl After
| A | B |
|---|---|
| 1 | a |
| 2 | 2 |
| 3 | 3 |
| 4 | d |
July 18, 2005 at 5:07 am
Sure. By altering the view like that you've removed the schemabinding, hence you can now do anything with the base table
July 14, 2005 at 11:52 pm
???
Create Table Testing (
Test int
)
GO
Create View vwTest WITH SCHEMABINDING AS
Select Test FROM dbo.Testing
GO
DROP TABLE Testing
GO
The drop table returns
Server: Msg 3729, Level 16, State 1, Line 1
Cannot DROP TABLE 'Testing' because it...
July 14, 2005 at 12:26 am
> You CAN modify the table as long as you don't touch the columns included
> in the view. The other columns are changeable...
Ah. *reads fine print in BoL* So...
July 13, 2005 at 11:49 pm
Create the view WITH SCHEMABINDING
That way the tables (or other views) referenced by the view cannot be modified in any way unless the view is dropped first.
July 13, 2005 at 3:52 am
I've had this before, though I don't know what caused it. Looking at the table list in Ent Manager the table had no owner listed. When I checked sysobjects, I...
July 11, 2005 at 2:48 am
Viewing 15 posts - 49,441 through 49,455 (of 49,566 total)