Viewing 15 posts - 1,261 through 1,275 (of 1,923 total)
New Commer (8/10/2010)
It works .. hooooo...
Wondering tht the task become possible from impossible (As i started this...
August 10, 2010 at 6:13 am
Try this , mate..
-- Conditionally drop if the procedure already exists
IF OBJECT_ID('dbo.Testing') IS NOT NULL
AND OBJECTPROPERTY(OBJECT_ID('dbo.Testing'), 'IsProcedure') = 1
BEGIN
...
August 10, 2010 at 5:17 am
For the ease of coding, i included an extra IDENTITY column so as to identify each record.. now, the code that will update enddate column with a value of (...
August 10, 2010 at 4:58 am
Are u using RightClick -> Export or BCP or SSIS for exporting?
August 10, 2010 at 4:32 am
Aspg (8/10/2010)
Here is the sample data .
Enddate is currently null .
What i want is the endate of 1st row should be the yesterday (from startdate ) of 2nd row...
August 10, 2010 at 4:12 am
Try this:
-- Conditionally drop if the procedure already exists
IF OBJECT_ID('dbo.Testing') IS NOT NULL
AND OBJECTPROPERTY(OBJECT_ID('dbo.Testing'), 'IsProcedure') = 1
BEGIN
PRINT 'Dropping Stored procedure Testing...'
DROP PROCEDURE dbo.Testing
END ;
GO
-- Procedure Definition
CREATE PROCEDURE dbo.Testing
@Date...
August 10, 2010 at 4:04 am
Need Sample data, sample script files (create table, insert into table etc etc) and a CLEAR desired-output.. This is help us to work on this straight away, friend !
August 10, 2010 at 3:44 am
Aspg (8/10/2010)
Thanks a lot .Solved my problem
🙂
Awesome 🙂 ... which solution u used, mate ?
August 10, 2010 at 2:39 am
And if your input is a string (varchar/char/nvarchar) , you can do this :
declare @i varchar(10)
set @i = '1234567890'
select stuff(@i, (len(@i) - 1), 0 , '.' )
Hope this helps!!
August 10, 2010 at 2:32 am
Would this help you ?
declare @i int
set @i = 1234567890
select cast( (@i / 100.00) as numeric(10,2))
August 10, 2010 at 2:28 am
To be precise
CAST (date AS VARCHAR)
-- OR
CONVERT (date , VARCHAR)
August 10, 2010 at 1:25 am
SET NOCOUNT OFF .
When u normally execute a query, you sure will get the number of rows affected in the "Message" Pane of the Results Window, unless u specify SET...
August 9, 2010 at 4:53 am
No, you can not, unless you are using Dynamic SQL..
If u want to use variables to decide the column u want to aggregate your result set , i can give...
August 9, 2010 at 2:16 am
Mr.Corn, are u populating data into a Global Temp table ? If yes, then are there any jobs scheduled at the same time that will drop the global Temp Table...
August 9, 2010 at 12:02 am
Try this:
--update table
--set ecode = NULL
select * from table
where
patindex('%[^0-9]%', ecode) > 0
or
...
August 7, 2010 at 6:50 am
Viewing 15 posts - 1,261 through 1,275 (of 1,923 total)