Viewing 15 posts - 136 through 150 (of 314 total)
Have u tried to create a view? If u can create a view similar to the one below:
Select '00'
Union all
Select '0000000000'
Union all
Select '0000000000'
Union all
Select '0000000000'
Union all
Select '0000000000'
Union all
Select '0000000000'
Union all
Select...
September 18, 2006 at 1:42 pm
Try this:
SELECT ltrim(rtrim(Right(ColumnName,len(ColumnName)-3)))
FROM TableName
WHERE CHARINDEX('The', ColumnName) = 1
If this is what you want then change Select to Update:
Update TableName set ColumnName= ltrim(rtrim(Right(ColumnName,len(ColumnName)-3)))
WHERE CHARINDEX('The', ColumnName) = 1
Thanks
Sreejith
September 18, 2006 at 11:13 am
You can use the following(instead of creating "n" number of sps)
1. Procedures can accept default values.
2.If a default value comes in then you can set the appropriate boundary conditions. For...
September 18, 2006 at 10:15 am
Hope this is what u are looking for:
Select ORDER_HISTORY.BranchNo,ORDER_HISTORY.ItemCode,ORDER_HISTORY.Units,ORDER_HISTORY.[Date]
from ORDER_HISTORY INNER JOIN (Select BranchNo,ItemCode,max(Units) as MaxUnits
from ORDER_HISTORY
group by BranchNo,ItemCode) Max_ORDER_HISTORY
on ORDER_HISTORY.ItemCode =Max_ORDER_HISTORY.ItemCode
and ORDER_HISTORY.BranchNo = Max_ORDER_HISTORY.BranchNo
and ORDER_HISTORY.Units = Max_ORDER_HISTORY.MaxUnits)
Select ORDER_HISTORY.BranchNo,...
September 18, 2006 at 10:05 am
Is yiur backup location correct? Does ur new server have the copy of the backup from the old server at D:\DATA\MSSQL\BACKUP\imagedb1.bak
Thanks
Sreejith
September 18, 2006 at 9:51 am
1.Does the user that is used while calling sp have appropriate rights to delete /add/Update data in tables? It could be when u excute it from Query Analyer that u...
September 17, 2006 at 8:42 am
I think the problem has to do with the fact that it has changed the authentication mode to windows only instead of Mixed mode authentication(instead of SQL Server and Window)....
September 17, 2006 at 12:48 am
I think the problem has to do with the fact that it has changed the authentication mode to windows only instead of Mixed mode authentication(instead of SQL Server and Window)....
September 17, 2006 at 12:48 am
I think the problem has to do with the fact that it has changed the authentication mode to windows only instead of Mixed mode authentication(instead of SQL Server and Window)....
September 17, 2006 at 12:47 am
Hope this is what u are looking for:
Declare MinCartoonID int
select MinCartoonID = min(CartoonID) from tableName where Display = 1
Insert statements...
If (Select Count(*) from tableName where Display = 1) > 2
Begin
Update...
September 16, 2006 at 12:54 pm
U can use trigger:
CREATE TRIGGER tri_ins_Residential_Customers
on Residential_Customers
FOR INSERT
as
--Residential_Customers
Declare @CustomerId int,
@FirstName varchar(50)
@CustomerNo int
--SET @CustomerNo = SCOPE_IDENTITY()
select @CustomerId = CustomerId,
@FirstName = FirstName
from inserted
If Not exists (SElect 1 from Customers where CustomerId =@CustomerId...
September 16, 2006 at 12:45 pm
If u are using the function in Select statement then use what Lynn suggested. Cos u don't need to have a calendar table to do what SQL does best. And...
September 15, 2006 at 6:36 pm
Could it be the sid for the user is different on the new server. Have u tried sp_change_users_login
Thanks
Sreejith
September 15, 2006 at 6:27 pm
September 15, 2006 at 6:20 pm
You can try this:
exec sp_columns TableName.
Thanks
Sreejith
September 15, 2006 at 4:12 pm
Viewing 15 posts - 136 through 150 (of 314 total)