Viewing 15 posts - 391 through 405 (of 1,346 total)
With Great power comes great responsibility.
It asked you "Are you sure you want to delete this?" Right,
If you say yes, its gone
without backups I do not believe there is a...
January 18, 2007 at 12:54 pm
Use a function.
Check out a previous post
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=338&messageid=331770#bm331823
January 10, 2007 at 12:36 pm
Click the database, Tables -> right click on the table you want to modify,
Select design.
Go to desired field change the length value.
Click save.
January 10, 2007 at 12:34 pm
WHat is your deisred result?
there are functions on this site that calculate a persons age.
http://www.sqlservercentral.com/scripts/viewscript.asp?scriptid=326
DECLARE @age_at INT
SET @age_at = dbo.f_age_at ('2/16/1954', GETDATE ())
what you are showing...
January 5, 2007 at 11:51 am
Four part is Servername.DatabaseName.ObjectOwner.TableName
your database name is the same as the servername?
Something looks fishy, but not sure.
Sorry if I'm not much of a help.
December 28, 2006 at 12:04 pm
Can you please post table definition and some sample data so we have more information to answer your question.
With out this, it is a stab in the dark
select *
From [Database].[Live].[T1]...
December 28, 2006 at 11:59 am
If you make the change in Enterprise manager, before, or instead of hitting the save icon, click the generate script icon.
December 27, 2006 at 4:24 pm
Check out this message it uses the function approach
I would strongly urge you not to use the cursor.
Plus this can be used inline with a query.
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=338&messageid=331770#bm331823
December 23, 2006 at 12:15 pm
Try a UDF
-- Set up Test Scenario
use pubs
Create table mytable (pk int identity, [ID] int, col varchar(20))
insert into mytable ([id],col)
select 1, 'aaa' union
select 2, 'bbb' union
select 3, 'ccc' union
select 3,...
December 20, 2006 at 8:47 am
There is no way out of the box, you could easily develop a solution.
One way would to put a Created_Date field in your table with a default value of Getdate()....
December 19, 2006 at 12:36 pm
First make space
update mytable
set DisplayOrder = DisplayOrder + 1
where DisplayOrder >= 3
THen Insert
December 7, 2006 at 9:05 am
A more practical solution might be used.
Put delete trigger on the table, and on delete copy the row to an audit table.
Then you can just pull out erroeously deleted...
December 6, 2006 at 1:43 pm
Please post samples or examples as where you are having issues. Please include table definitions, and data
December 4, 2006 at 10:37 am
Why are you trying to do this.
you should do all this kind of stuff in the presentation layer.
You cannot concatenate a string to give you a "Dynamic" Column name....
December 4, 2006 at 9:35 am
This is not valid sql sytax
INSERT INTO Employees (
-- // OtherFields,
DeptID = null
);
-- This however works
insert into Employees (DeptID)
values(NULL)
select * from Employees
Results
December 4, 2006 at 9:27 am
Viewing 15 posts - 391 through 405 (of 1,346 total)