Forum Replies Created

Viewing 15 posts - 61 through 75 (of 626 total)

  • Reply To: Aggregate data with convert rows into column

    drew.allen wrote:

    Y.B. wrote:

    Thanks for the tip Drew, I've made the change to the code.

    I see you updated the LAST_VALUE(), but not the FIRST_VALUE().  The default isRANGE BETWEEN UNBOUNDED PRECEDING...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • Reply To: Aggregate data with convert rows into column

    Thanks for the tip Drew, I've made the change to the code.


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • Reply To: Aggregate data with convert rows into column

    So just a couple tips for the next time you post.  Make sure you put any DDL statements in a code block so its easier to read.  Most people don't...

    • This reply was modified 7 years, 1 months ago by Y.B.. Reason: Small edit to code
    • This reply was modified 7 years, 1 months ago by Y.B..
    • This reply was modified 7 years, 1 months ago by Y.B.. Reason: Updated Code


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • Reply To: Argument data type datetime is invalid for argument 1 of substring function.

    Looks like you are trying to use a string function on a datetime field.

    --instead of this
    --SELECT SUBSTRING(GETDATE(),1,10)

    --do this
    SELECT CAST(GETDATE() AS DATE)


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • Reply To: IDENT_CURRENT is out of sync

    ZZartin wrote:

    It's possible someone deleted some values out of the middle of the identity then reseeded it.


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • Reply To: Delete is very slow

    Guras wrote:

    No, I am the only one running this query at the moment.

    That doesn't mean there can't be another process locking your table.

    • This reply was modified 7 years, 1 months ago by Y.B.. Reason: Added additional comment


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • Reply To: General SQL Development Question.

    koti.raavi wrote:

    second -need to check whether member already exist or not , if not it would be new member 

    Just to clarify, does the source contain the full current data set...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • Reply To: Code snippets removing line spaces

    --That's Great News!

    --Thanks ;)


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • Reply To: Merge all rows to one row in results

    drew.allen wrote:

    This method of concatenating strings is undocumented and unsupported.  You are better off using STRING_AGG() if you are on SQL 2017 (or later) and XML concatenation otherwise.

    I only...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • Reply To: Code snippets removing line spaces

    This was driving me nuts too.  I tried a few things in post to see if there was a way around it but I think I edited one too many...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • Reply To: Merge all rows to one row in results

    There isn't a lot of info here and it seems like someone was already helping you on a previous thread.  However, if you are just looking for a method to...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • Reply To: t-sql 2012 most current year

    I would just assign it to a variable first.

    DECLARE @year SMALLINT
    SELECT @year = MAX(SCHOOLYEAR)
    FROM ASemester

    SELECT *
    FROM ASemester ASemester
    JOIN AMilestone AMilestone
    ...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • Reply To: Cleaning Your Tables

    I knew this one all too well.  When we migrated images stored as varbinary out of our database and deleted the data it was interesting that we hadn't reclaimed any...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • Reply To: The Minimum Upgrade Point

    Steve Jones - SSC Editor wrote:

    Y.B. wrote:

    I would think another big factor holding some back could be licensing.  Not everyone pays for Software Assurance.

    This isn't a question on whether to upgrade. If you've...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • Reply To: Deleting or updating two rows based on a value of one of them

    Providing a sample of what you would like the end result to look like would be very helpful here.  You aren't very specific about whether you want rows updated or...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

Viewing 15 posts - 61 through 75 (of 626 total)