Forum Replies Created

Viewing 15 posts - 9,556 through 9,570 (of 26,489 total)

  • RE: UniqueIdentifier as a Primary Key

    CELKO (9/14/2012)


    Is it ever considered a best practice to use a UniqueIdentifier(GUID) as a primary key?

    By definition it cannot be a key; it is not an attribute of...

  • RE: Need to get YYYYMM from date ?

    KumarSQLDBA (9/14/2012)


    Hi Guys,

    Please help me to get YYYYMM from Getdate()?

    I have tried the below query.But it gives 20129 only not 201209 format?

    ANy help will be appreciated!!!!!!!!!

    SELECT cast(year(getdate()) as char(4)) +...

  • RE: T-SQL Help Needed

    Luis Cazares (9/14/2012)


    CELKO (9/13/2012)


    I really would love to listen to his answers regarding choosing natural keys for Persons and Companies entities (where the system is international and people/companies are...

  • RE: subqueries in sql server2000

    bala.a (9/14/2012)


    Wrong syntax.....

    You need to use both the columns seperately in the WHERE clause

    Like this..

    WHERE COL1 IN (SELECT COL1 FROM.....)

    AND COL2 IN(SELECT COL2 FROM........)

    Actually, to emulate the multiple column IN...

  • RE: Slow return of data to program

    m.henly (9/14/2012)


    Here is the err mssg and the line it went to:

    Msg 102, Level 15, State 1, Procedure MISQRY0000026, Line 32

    Incorrect syntax near '.'.

    outer apply [dbo].[BoxedStock](cil.modelid) bs(ItemCount)

    The above...

  • RE: NOT IN query very expensive, 100% CPU

    scogeb (9/14/2012)


    ... (Editted)

    I agree 100% with that last statement. Programs and databases are all so different, along with the systems they run on. Not to mention there...

  • RE: how to select active inventory

    Linda_web (9/14/2012)


    Thank you for your time and reply, I know how to do the script, but my question is: how to get active inventory by given date (month & year)...

  • RE: Slow return of data to program

    m.henly (9/14/2012)


    Hi Lynn,

    Can i bother you with a quick question? Have had a look at the code and am intersted in a couple of bits that are new to...

  • RE: SQL taking long time

    kiran.rajenimbalkar (9/14/2012)


    But How can I use #tmp table?

    Indexes are there on my tmp_load table.

    So please suggest me the best solution....In my above sql it giving me 50125 rows

    You haven't provided...

  • RE: NOT IN query very expensive, 100% CPU

    CELKO (9/13/2012)


    I was under the impression it's best to avoid temp tables if you can though. Is that not accurate?

    It is accurate. We have derived tables and CTEs which...

  • RE: NOT IN query very expensive, 100% CPU

    CELKO (9/13/2012)


    Who knows with the LTRIM/RTRIM. This was set up before my time here. We're trying to clean it up though. Trust me, I know it's...

  • RE: NOT IN query very expensive, 100% CPU

    CELKO (9/13/2012)


    Looks like he is not working in the "office". He is a TEACHER! I just can only image that his students love him to the bits, especially when...

  • RE: Using Print, will it slow down procedure?

    Modified code that should work in SQL Server 2005:

    with InitialData as (

    select

    InitData

    from

    (select '1994-00000001|12/27/1993 12:00:00 AM|01/03/1994|SL|16|33|STATE TAX LIEN|2|:OPR:1169:250|TEXAS STATE OF|KFC NATIONAL MANAGEMENT CO|::::::::::::FOR RELEASE SEE OR VOL...

  • RE: Using Print, will it slow down procedure?

    CptCrusty1 (9/13/2012)


    Lynn, It doesn't like the Values bit... I'll look at it tomorrow.. Thanks for the help on this BTW...

    Sorry, I am using SQL Server 2008 where I...

  • RE: SQL Compare 10

    GilaMonster (9/13/2012)


    Mail redgate support?

    Probably should, just hoping someone else had already dealt with this issue.

Viewing 15 posts - 9,556 through 9,570 (of 26,489 total)