Forum Replies Created

Viewing 15 posts - 14,251 through 14,265 (of 15,381 total)

  • RE: Help with SQL code

    Or just remove the subquery as it really isn't needed.

    SELECT

    ESO_PORT,

    sum(case when ONTIME_S = 'On Time' then 1 else 0 end) as Ontime_s,

    ...

  • RE: Using Identity Field as my main relation in joins

    One of the important elements in deciding on a natural key vs a surrogate key is to determine if the value you pick is going to change. In the first...

  • RE: a=b=c?

    R.P.Rozema (8/16/2011)


    Sean Lange, I hadn't yet seen the additional requirement of skipping 0's when I wrote my reply. That is why yours looked over complicated to me. Sorry about that.

    Of...

  • RE: Inserting summarized data

    troe_atl (8/15/2011)


    Thanks Sean. I will look at a better way to code this. I actually inherited this database and I’m trying to modify it the best way possible without reinventing...

  • RE: Guid with a fix part

    Theknee (8/15/2011)


    I'm Sorry for the mistake with your name šŸ™

    I will tell Him.

    Thanks again.

    No worries. šŸ™‚ Happens all the time. Good luck. šŸ˜‰

  • RE: Guid with a fix part

    Theknee (8/15/2011)


    Thanks SSCrazy

    This is not the way I expect to see the problem to be resolved, But this will work.

    I'm not the DB designer for this project, but from...

  • RE: Inserting summarized data

    Like the previous poster said, you only have two inserts.

    that being said I would start with "what am I doing wrong"? You are managing your own identity type data.

    ...

  • RE: Requesting user input

    Are you looking for a way to have sql server pop an input box to capture this email? If so, there is no visual component of SQL server. That would...

  • RE: a=b=c?

    The ALL operator is interesting. Seems to make this awfully complicated though. Try this.

    DECLARE @a int = 102733019,

    @b-2 int = 102733019 ,

    @c int = 0

    select case when

    (@a = @b-2 and...

  • RE: Guid with a fix part

    I hope you are not using a UniqueIdentifier as your primary key. There are a zillion reasons that is not a great idea. But you can "roll your own" UniqueIdentifier...

  • RE: Search & pattern matching within text/html values

    With the huge amount of variance in the size of the fields you are facing a slow search process no matter how you slice and dice this. At first I...

  • RE: ISNULL on Empty Set

    tomperson349 (8/12/2011)


    I know. I am brand new employee at this company. Its only my 2nd week. I havent been given SQL Server 2005 access yet. So for the past week...

  • RE: split long char field for Label making software

    This isn't quite 100% but it is very close...just a little tweaking on the substring math and you should be there.

    create table #Test

    (

    Label varchar(101)

    )

    insert #Test

    select 'Lorem ipsum dolor sit amet,...

  • RE: ISNULL on Empty Set

    Just a suggestion but you should build you sql in ssms and then move you query to your code. You are fighting too many battles at the same time. Get...

  • RE: ISNULL on Empty Set

    You do not need a variable to hold Result1. You do however need to convert your date to a varchar of some type if you are going to put 'N/A'...

Viewing 15 posts - 14,251 through 14,265 (of 15,381 total)