Viewing 15 posts - 13,906 through 13,920 (of 14,953 total)
Another option to look at with the update, is can it be done in pieces? Perhaps in a temp table, even. With complex updates with a lot of...
May 1, 2008 at 1:28 pm
The reason you're getting 0 on small databases is because this, "sum(page_count)*8/1024" is integer math, and any number smaller than 128 for sum(page_count) will give 0.
Cast the page count as...
May 1, 2008 at 1:11 pm
Is there a reason to not use the import wizard in Management Studio? Is this a one-time import, or something you'll do regularly?
May 1, 2008 at 1:08 pm
The format doesn't matter. Dates and times are stored in SQL as numbers. The missing milliseconds will cause it to not be equal.
In datetime, dates are stored as...
May 1, 2008 at 10:44 am
Okay, I'm kicking myself now. Should have thought to test with nchar, instead of char.
May 1, 2008 at 10:37 am
Grant Fritchey (5/1/2008)
You're telling me I fixed it by accident? I just put the semi-colon on because I've gotten in the habit of closing commands with it.
Yeah, SQL Server isn't...
May 1, 2008 at 10:34 am
lfmn (5/1/2008)
Thanks. I'm concerned about performance. Do you know if this solution would out-perform the convert function?
Which solution are you asking about? Steve's use of datepart in the Select...
May 1, 2008 at 10:28 am
I'm getting "£". Didn't check for that.
Tested:
create table #Test (
ID int identity primary key,
Val char(1) COLLATE SQL_Latin1_General_CP1250_CS_AS )
insert into #test (val)
select char(0xA3) union all
select 'L'
select *
from #test
where val like...
May 1, 2008 at 10:04 am
Actually, when I was first learning SQL, Books Online took too much for granted in many cases. Too many circular definitions, too much left out in too many cases.
I...
May 1, 2008 at 10:03 am
Apprenticeship is a good way to train someone. Give them simple tasks to do, and some help on those, and work your way up from there.
May 1, 2008 at 8:51 am
You should be able to do that from within Windows Control Panel.
May 1, 2008 at 8:48 am
My favorite way to do this on tables where you query this kind of thing regularly, is to use indexed, computed columns.
Alter table dbo.MyTable
add DateYear as datepart(year, MyDateColumn),
DateMonth as datepart(month,...
May 1, 2008 at 8:45 am
jezemine (5/1/2008)
one of the dbs I have to...
May 1, 2008 at 8:38 am
Try querying the XML the usual way, return the results as a standard set, then use For XML to turn the sub-results back into XML. Will that work for...
May 1, 2008 at 8:28 am
You need to end the alter table command with a semicolon ";", then you don't need a "go".
May 1, 2008 at 8:23 am
Viewing 15 posts - 13,906 through 13,920 (of 14,953 total)