Forum Replies Created

Viewing 15 posts - 106 through 120 (of 911 total)

  • Reply To: SELECT records from table 1 that does not exist in table 2 via UNION

    >> Suppose I have TABLE Customers and TABLE Orders. The relationship is that 1 customer can have many or no orders. <<

    The conventional SQL forms for over 30 years has...

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

  • Reply To: Having sum(amount) = 0 returns negatives as well.

    >> I'm trying to get a list of ID's that have a total sum of their amount column = to zero... But I'm getting a lot of negative numbers, but...

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

  • Reply To: Conditional Update of Column

    CREATE TABLE Samples

    (sample_id CHAR(3) NOT NULL PRIMARY KEY.

    DEFAULT 0,

    col_1 INTEGER NOT NULL

    DEFAULT 0,

    col_2 INTEGER NOT NULL

    DEFAULT (0));

    INSERT INTO Samples (sample_id, col_1, col_2)

    col_value ('AAA', 0, 0), ('BBB', 0, 0), ('CCC', 0,...

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

  • Reply To: GoTo Looping

    This thread is giving me flashbacks to the days when I wrote columns on structured programming in the trade press. That was decades ago! In particular, there was the Bohm-Jacopini...

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

  • Reply To: Adding a surrogate key to a view

    If you want us to help you with your code, you probably ought to show it to us. Just offhand, my guess would be that something is wrong with your...

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

  • Reply To: GoTo Looping

    A go to statement can jump into the middle of a begin – end block. This means that all of those local variables have to be allocated beginning of the...

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

  • Reply To: UniqueIdentifier as Primary Key, non-clustered index, fragmentation issue

    >> I've been working a little bit with a few tables here, they've got "CreatedDate" as clustered Index and and Id (UniqueIdentifier) as Primary Key. The Id's are generated from...

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

  • Reply To: Seeking input on Best Method to Join on First or Last Row in a 1:M Join

    >> I did NOT have any involvement with the creation of the DB's design. .. do NOT have any access to modify the design <<

    There is an old poem:

    " I...

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

  • Reply To: Seeking input on Best Method to Join on First or Last Row in a 1:M Join

    After all these decades. I don't remember why the inmate number was that long. I believe we display the first nine digits because that matches the Social Security number. The...

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

  • Reply To: Help on aggregation with dates

    For over 35 years, SQL forums have asked posters to provide DDL, sample data and their first honest attempt at a solution on their own.

    I had a little something extra...

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

  • Reply To: Seeking input on Best Method to Join on First or Last Row in a 1:M Join

    Jeff, have you noticed that most credit cards are 16 digits broken into groups of four? American Express or Diners Club or older credit card systems uses a little bit...

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

  • Reply To: Doing a select with dynamic columns

    >> I have a query that produce a table where I have a list of columns. Then I choose check what columns are on the table excluding the column from...

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

  • Reply To: Seeking input on Best Method to Join on First or Last Row in a 1:M Join

    This is correct You got so much wrong in your design. I'm trying to figure out where to start. Your column declarations make no sense; a variable length. 30 characters...

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

  • Reply To: Recursive query problem - find ALL related records for a given record

    >> I need a way to find all of the related records sic in a set of relationships given any record_id sic in the set. The nature of the relationships...

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

  • Reply To: SQL Subqueries

    In the future, would you mind following forum rules of been in place for over 30 years and post DDL? It would also help if you would read just one...

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

Viewing 15 posts - 106 through 120 (of 911 total)