Forum Replies Created

Viewing 15 posts - 1 through 15 (of 911 total)

  • Reply To: Split concatenated column data into separate rows

    The short answer is to look up the STRING_SPLIT() function. Microsoft added it to let bad programmers kludge their code. Cleaning up data until at least you get to1NF should...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • Reply To: Concatenating Strings

    As an aside, the symbol for concatenation in ANSI/ISO standard SQL is <string 1> || <string 2>. ANSI X3 H2. picked this symbol from the old PL/1 programming language. It...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • Reply To: Calendar & Fiscal Year Table

    By definition, a table must have a key. You also have more NULL-able columns in this one table that I have an entire schemas. Why do you need 255 Chinese...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • Reply To: Calendar & Fiscal Year Table

    By definition, a table must have a key. You also have more NULL-able columns in this one table that I have an entire schemas. Why do you need 255 Chinese...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • Reply To: needing to insert 2 sets of numbers to a table to use as ranges for a query

    Did you know that a table has to have a key. By definition. Not as an option. You posted garbage! Why do you think of column names are meaningful? For...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • Reply To: What's Wrong with this Table?

    While everyone remembered that a primary key cannot have nulls, I'll take issue with some of the designs here. First of all, do you have more than one customer? Shouldn't...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • Reply To: How to get calculated values from a derived(?) table?

    You're not going to use this data as points in time, but as intervals, so model it that way

    Create table events

    (event_number integer not null primary key,

    event_start_timestamp dateime2(0) not null unique,

    event_finish_timestamp...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • Reply To: How best to identify one (and only one) default row in a table?

    Create table list_of_stuff

    (stuff_id char (10) not null primary key,

    ...));

    Create view anointed_one

    as

    SELECT ...

    From list_of_stuff

    where stuff_id = <parameter>

    Since you deal with the table, we know we've got a key, so why not...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • Reply To: SSRS Expression IIF Zero then ... Got #Error

    Please consider learning standard SQL. We don't have an IFF() construct; that was spreadsheets and perhaps some nonrelational languages. Take the time to write everything out as a CASE expression....

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • Reply To: Calculate Sales with different start Dates

    As an aside, MySQL had a proposal for extended ISO 8601 date formats. The idea was that the yyyy-mm-dd format which is the only one allowed in ANSI/ISO standard SQL...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • Reply To: Table reference issue

    Yes. Arrgh! Next time I will need see the spelling correction is doing its job. Dijkstra taught the University of Texas in Austin before his death. State got a lot...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • Reply To: Table reference issue

    Be glad you never had a class under Dykstra at UT. His favorite way of talking to students was to tell them "You're doing everything completely wrong!" But you knew...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • Reply To: Table reference issue

    Why do you think you need a non-relational IDENTITY column in this table? The primary key is supposed to be unique already; this is a definition, not an option. Is...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • Reply To: SQL Query requirements

    You're still writing SQL as if you were in BASIC or Fortran. Let's start off with the create table statement. By definition, and not as an option, table must have...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

  • Reply To: Searching in date field provides inconsistent results

    Actually this was a discussion inside ANSI on this Before relational modeling, there were other conventions; one of the most popular was IDEF (I can't remember what it stands for),...

    Please post DDL and follow ANSI/ISO standards when asking for help. 

Viewing 15 posts - 1 through 15 (of 911 total)