Forum Replies Created

Viewing 15 posts - 3,091 through 3,105 (of 15,381 total)

  • RE: Are the posted questions getting worse?

    Grant Fritchey (4/3/2015)


    Koen Verbeeck (4/3/2015)


    It's Friday and I'm grumpy...

    http://www.sqlservercentral.com/Forums/Topic1674050-3412-1.aspx

    OK. Funny, very funny, but a little uncool.

    I found it a rather fitting response to somebody who clearly seemed they felt entitled...

  • RE: syntax error

    dallas13 (4/2/2015)


    Thanks but we can not declare a variable inside view so have to use ## only. Thanks.

    Be careful if you use this approach. Once you start using global temp...

  • RE: datetime - 1/1/1900 treated as blank??

    ab5sr (4/2/2015)


    Can you provide an example?

    I think I know what you're trying to say, though. Like this?

    SELECT NULLIF(CAST('1/1/1900' AS datetime),'')

    Even though this thread is 6 years old...

    What is your...

  • RE: SQL 2008 R2 - Trouble Aggregating Data From Common Table Expression

    Could it be as simple as changing the where predicate in the first query?

    WHERE state_nbr NOT IN (SELECT state_nbr FROM CTE WHERE Ranking > 1 )

  • RE: Are the posted questions getting worse?

    Luis Cazares (3/27/2015)


    In a different order of ideas, I want to share with you my happiness.

    Starting on April 21st I'll be working in the US. I'll make a stop at...

  • RE: Duplicates

    Why not just add this to the join predicates to the Duplicates cte in the script I posted yesterday.

    AND d.ReferenceNumber <> r.ReferenceNumber

    I am more than a little concerned that you...

  • RE: Duplicates

    faulknerwilliam2 (3/26/2015)Should I be doing that in some other way?

    Not necessarily but your join condition did not reference the address table.

    INNER JOIN Address

    ON Reference.ReferenceNumber = Reference.ContactNumber

    If there is something else...

  • RE: Duplicates

    faulknerwilliam2 (3/26/2015)


    Hello Sean,

    Yes, it was a hopeless entry. I reposted with this, which I hope is clearer:

    Hello, I posted earlier with a poor script. Below is a better one.

    It pulls...

  • RE: any way to return from script instead of drop existing for ddl scripts?

    Eirikur Eiriksson (3/26/2015)


    sqlguy-736318 (3/25/2015)


    Hello,

    Let's say I have a function named MyCustomFunction and I want to ensure that it exists in the database. Let's say I have a create script...

  • RE: Duplicates

    faulknerwilliam2 (3/26/2015)


    Hello

    I have 4 tables:

    Customer address, name, telephone number and email address:

    SELECT A.Contact_id, A.first_name, A.last_name,

    B.Contact_id, B.Address_1, B.Address_2, B.Address_3, B.zipcode

    ...

  • RE: Query to select parent details from child table

    sqlquery29 (3/25/2015)


    We do not have separate Parent table.

    How do i join the child table with itself to get the Parent_ID codes?

    Thanks,

    You would join on YourChildID = YourParentID.

    If you want...

  • RE: The Worst Comments

    Took me a bit to find this one but is the funniest comment I ever saw.

    I know this is a kludge but it is after midnight and the deadline is...

  • RE: Get data changes from history table

    only_you (3/25/2015)


    ProductID,oldSalesPerson,newSalesPerson, Date (when record updated)

    Can you confirm which version of sql server you are using? Since you posted in the 2008 forum I assume that is correct. In 2008...

  • RE: Get data changes from history table

    only_you (3/25/2015)


    How to include Date column in select?

    Which date do you want? The MAX or MIN? You either have to group by the date column or decide which one you...

  • RE: Doubt about logic in T-SQL

    dwain.c (3/24/2015)


    I see no alternative other than a loop for this. Where the heck is Itzik Ben-Gan when you need him!

    Speak and he shall appear. The OP posted this...

Viewing 15 posts - 3,091 through 3,105 (of 15,381 total)