Forum Replies Created

Viewing 15 posts - 13,906 through 13,920 (of 14,953 total)

  • RE: no lock table or row when update transaction

    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...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: DB space used in SQL 2005

    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...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Export Excel data onto SQLServer 2005

    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?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Datetime data type and its format

    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...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: 0xA3 when is it L and when L

    Okay, I'm kicking myself now. Should have thought to test with nchar, instead of char.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: ALTER TABLE error...

    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...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Group by Date

    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...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: 0xA3 when is it L and when L

    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...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Can't find a word in a string

    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...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: They want me to teach my coworker SQL IIS administration

    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.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: want to uninstall Sql Server 2005 Express Edition

    You should be able to do that from within Windows Control Panel.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Group by Date

    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,...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Primary key vs NOT NULL unique key..

    jezemine (5/1/2008)


    you might want use a tinyint for the PK on a states table if it was being referred to from other large tables.

    one of the dbs I have to...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: SQL query how to split xml into seperate xml's

    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...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: ALTER TABLE error...

    You need to end the alter table command with a semicolon ";", then you don't need a "go".

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 15 posts - 13,906 through 13,920 (of 14,953 total)