Default value in a table

  • Remi - his (her ?!) original request was only "how to create" - not how to optimise once created...

    what is the third language ?!







    **ASCII stupid question, get a stupid ANSI !!!**

  • French/Enlish/ (vb + C++ + sql server).

    Easy to get mixed up between percent and pourcent and % at this stage .

    The poster(tress!?) talked about a 20M + table, optimisation is always a factor in this situation.

  • I'm a he btw.

    As for why I don't use top 25 percent,etc it's because we create "dialing files" of anywhere from 25k to 250k depending on various factors.  Therefore my normal selections are simply:

    select top 250000 from table1 where criteria = XX and criteriaB=YY order by Sort

    Nothing too fancy, and yes the various criterias that are normally chosen are indexed, but honestly I'm not super concerned with optimizations on this table because it's something that runs as a background type job and in no way is mission critical.

    All I wanted to do was use something like Right(Phone,2) for default in EM, but for whatever reason it doesn't like that syntax, thus I was hoping someone had ran into this problem and knew the solution and could help me out (btw =Right(phone,2) doesn't work either).

  • nothing against you, I just hope I am not on your DB


    * Noel

  • Did you try under "formula" - did EM not allow you to create this ? what error msg did you get ?







    **ASCII stupid question, get a stupid ANSI !!!**

  • EM, you still use that thing????

    ALTER TABLE dbo.TableName ADD

    NewPhoneColName AS Right(Phone, 2)

    you can then create an index on that column just like if it was a real one.

  • Sushila wins the whole she-bang.

    I kept thinking that I wanted to use default under the EM instead of formula.  As soon as I typed what I wanted under formula I was getting what I was needing.  Now to check if I can query off that and sort by it and I'll be ready to go.

    Thanks again.

     

  • Why don't you take the time to index it? You're gonna kill the server with that query if it uses a table scan... even if it's a secondary operation.

  • If it takes and extra hour to generate the calling list, maybe I can get through dinner without having the phone ring...

     

     hehehehe

     

  • Maybe they could be able to call 1 hour earlier while you're not even home yet .

  • Jeff - have you not heard of the National Do Not Call Registry - or the caller ID - or how about not picking up the phone at all regardless of who calls...<:-)







    **ASCII stupid question, get a stupid ANSI !!!**

  • Registry didn't work all that well last time I heard, maybe that changed. Not picking is cool if too. But since I'm never home it's not a real big problem.

  • I guess it is no time for me to quit my day job to become a comedian.

  • Hey - if you can make 'em laugh - I say QUIT!!!







    **ASCII stupid question, get a stupid ANSI !!!**

  • Can or can't Sushila???

    Those typos seem to be plaguing you too .

Viewing 15 posts - 16 through 30 (of 31 total)

You must be logged in to reply to this topic. Login to reply