Forum Replies Created

Viewing 15 posts - 1,396 through 1,410 (of 1,424 total)

  • Reply To: SQL Collation different in tables and columns

    Chris Wooding wrote:

    If your database originally resided on a different server (with a different collation), columns created would have used that default. Columns created after the migration would default to the...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Generate a string format based on fixed length and numeric units on increment

    Why do you declare province to be char(2) and then assign it left(col_name, 1) which is only 1 character?

    Does the sequence reset for each country?

    What is the needed sort order...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Generate a string format based on fixed length and numeric units on increment

    Suppose the code you need to calculate is called the "Country Province Number" CPN.  The issue here is the example you provided only declares variables for a single record and...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Generate sequence of stations

    You have 2 tables?

    1. Dates  -- contains the master list of dates.  Table has 1 column.
    2. Stations -- contains the date and # of stations.  Table has 2 columns

    The output...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Insert multiple columns into one column sql

    The "or" we were looking for.  The second example, the one with "coalesce", consolidates the 3 columns (Employed, Not employed, Retired) into 1 column (Employed status) by selecting the first...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Insert multiple columns into one column sql

    The first post referenced:

    The employment status depending on the Name would be "Manager", "Fired", "Enjoying Life". I basically need to insert 3 different columns into a single column.

    Then you wrote:

    How...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Insert multiple columns into one column sql

    Well it's still not clear to me.  Here are examples of both.  If you're choosing concat then make sure table_b has wide enough column to fit (including the spaces).

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Insert multiple columns into one column sql

    Do you want concatenation or coalescence of the 3 columns?  Can be 1 and only 1 value per row in these 3 columns?  Could all 3 columns have values in...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Syntax Inquiry

    You posted 2 code blocks.  It appears there is an issue with the second one.  Where you define the cte:

    VESValidEnrollList AS(
    SELECT
    ...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Syntax Inquiry

    So it's turtles all the way.  At some point you must have a statement that access the cte's yes?  Because if you define a cte and don't use it sql...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Syntax Inquiry

    It won't let me post code.  Please add a select statement that references the common table expression.

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Syntax Inquiry

    The spam filter will not let you post "select *star*" which is kind of annoying on a Sql site.

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Syntax Inquiry

    Sorry, the 1,2,3,... syntax only works in sort by in Sql Server.   Can't tell if the syntax parses because the tables aren't in my test instance.  Please try:

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Syntax Inquiry

    These are the 5 'group by' columns in the select list:

         EnrollmentID
    ,CoveragePeriod
    ,PSPolicyTransID
    ...

    • This reply was modified 7 years, 3 months ago by Steve Collins. Reason: Put column lists in code editor

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Will SQL Server supports Nepal Calendar

    Oh ok I've looked into a little more.  Sql does get calendar/clock time zone info from the OS (on Windows, not sure how it works on Linux).  This is a...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Viewing 15 posts - 1,396 through 1,410 (of 1,424 total)