Viewing 15 posts - 1,051 through 1,065 (of 1,923 total)
I would go with a single table with 2 columns.. Column 1 being the variable name and column 2 being value column.. Then u could make use of some SET-based...
November 22, 2010 at 6:39 pm
How about this?
DECLARE @StartDate DATETIME --= '2010-11-22'
DECLARE @EndDate DATETIME --= '2010-12-22'
SET @StartDate = '2010-11-22'
SET @EndDate = '2010-12-22'
; WITH Tens (N) AS
(
SELECT 1
UNION ALL SELECT 1
UNION ALL...
November 22, 2010 at 7:03 am
How about this?
SELECT Col1 + SPACE(32-LEN(Col1))
November 7, 2010 at 8:02 am
WayneS (11/3/2010)
November 3, 2010 at 10:00 am
WayneS (11/3/2010)
November 3, 2010 at 9:57 am
Richard Warr (11/3/2010)
SELECT 665/12
SELECT CAST(665 AS MONEY)/12
..and...
November 3, 2010 at 9:42 am
mbender (11/3/2010)
Also what is the difference between the IsNull and Coalesce?
2 main differences
1. Data-type precedence and conversion
2. COALESCE can accept any number of input column, the...
November 3, 2010 at 9:32 am
Try this:
DECLARE @PatientsInfo TABLE
(
PatientID VARCHAR(15),
PatientCode VARCHAR(5),
Activity DATETIME
)
INSERT INTO @PatientsInfo
...
November 3, 2010 at 9:29 am
I guess, some of your DBs are having spaces in their names...
Try changing part of your query to
SELECT @SQL = '['+@DBName+']' + '..sp_HelpFile'
November 1, 2010 at 3:52 am
Dint you try cast and convert functions?
select cast ( '6/9/2006' as datetime)
select convert( datetime,'6/9/2006' )
October 28, 2010 at 9:26 am
traughberk (10/27/2010)
October 27, 2010 at 8:37 pm
Try these:
select CONVERT ( date , '12-14-2004 15:34:00')
select CONVERT ( time , '12-14-2004 15:34:00')
But, why would you want to do it ? Store dates fully!
October 25, 2010 at 5:33 am
Chris Morris-439714 (10/22/2010)
ColdCoffee (10/21/2010)
Chris Morris-439714 (10/21/2010)
ColdCoffee (10/21/2010)
And i presume your EmpName does not have trailin/leading commas.. Else we will have to use another method.
There's a trick for that...put them in...
October 22, 2010 at 2:42 am
The issue is with your "insert" statement.. If you do not provide the INSERT statement with the column names, it will insert the values as how it is in the...
October 21, 2010 at 11:21 pm
What about this?
select reverse(stuff( reverse(stuff(@string,1,1,'')) ,1,1,''))
Ugly, but still 😛
October 21, 2010 at 10:30 am
Viewing 15 posts - 1,051 through 1,065 (of 1,923 total)