Viewing 15 posts - 16 through 30 (of 38 total)
I think you may need u.database_id = db_id() in the Where Clause
March 1, 2010 at 6:06 am
Excellent article. I have a lot of forecast and actual time-series data and will check out the methods this weekend.
February 26, 2010 at 5:50 am
I always use select a/nullif(b,0) for division when there is a possibility that the divisor is zero.
February 26, 2010 at 5:36 am
This is not a huge database [about 100 Mb] and our IT guy did a full backup daily.
Problem arose when he moved the database to a Virtual server and...
December 21, 2009 at 1:46 pm
Thanks.
Unfortunately, the good backups are a few weeks old.
That said, any ideas on the cause? Could it be the disk controller as suggested on the Microsoft KB?
Eddie
December 21, 2009 at 1:14 pm
Declare @dt DateTime
Set @dt='20090604 09:00:00.123'
select convert(char(24),dateadd(dd,datediff(dd,0,@DT),0),121)
September 23, 2009 at 6:32 am
Can you send a sample of the CSV file.
Are you updating the XML or creating new records?
September 22, 2009 at 6:44 am
Solution using XML to concatenate strings
;With T1 as
(
Select
Col1,
Col2=Max(cast(b.x as varchar(max)))
From tab_Test a
Cross apply(select x=(select col2+',' from tab_Test...
September 19, 2009 at 10:49 am
Agreed, but XML constructs are part of T-SQL and therefore, always available
June 26, 2009 at 7:52 am
I find the use of XMl to be a cleaner method to concatenate rows into a single value:
select Fname+','
From Employee
For XML Path(''), Type
June 26, 2009 at 6:00 am
Elegant solution on Post http://www.sqlservercentral.com/Forums/Topic704553-145-1.aspx
April 29, 2009 at 4:58 pm
My strings usually have less that 20 "tokens"
April 20, 2009 at 6:24 pm
I use the recursive function below
Create Function dbo.GetStringTokens(
@String Varchar(Max),
@Delimiter varchar(1)
)
Returns Table
AS
Return
(
with StartEnd(ID,i,j) as
(
select
ID=1,
...
April 20, 2009 at 5:58 pm
I used this yesterday and worked perfectly, slightly different from your syntax
Select *
from OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\temp\Spreadsheet.xls;',
'SELECT...
April 11, 2009 at 12:09 pm
Viewing 15 posts - 16 through 30 (of 38 total)