Forum Replies Created

Viewing 15 posts - 451 through 465 (of 911 total)

  • Reply To: Problem writing a query to handle dynamic field usage

    >> Why don't you use a CASE and depending on the [sic] type, return the column you want? <<

    You don't do this because it doesn't work. Did you notice when...

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

  • Reply To: Problem writing a query to handle dynamic field usage

    >> I have been presented with some source data and mapping tables where the source data is stored as : <<

    why did you fail to post any DDL? Did you...

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

  • Reply To: T-SQL - Ways to get customized rows?

    Booleans have always been a problem in SQL. Our three value logic has problems from a mathematical viewpoint. Starting with the basics, Boolean datatype should have {true, false} as it's...

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

  • Reply To: T-SQL - Ways to get customized rows?

    Please do a little research and look up the design flaw called EAV. You are reinventing it, and on top of that, you added assembly language style bit flags. You...

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

  • Reply To: Count of entries & grouped by month - extracted from a date

    A useful idiom is a report period calendar. It gives a name to a range of dates. The worst way would be to use temporal math; it tells the world...

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

  • Reply To: Order of a task path

    >> Basically in table1 I have the name of the task and the id. <<

    Why do you think that "table_1" and "table_2" are useful names? Did you know the IDENTITY...

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

  • Reply To: Need help with query where i need to aggregate an aggregate

    The poster can control the @ and # tables he creates, can't he? Data element names, etc. are also under their control. Yes, you can get stuck with crap DDL...

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

  • Reply To: Need help with query where i need to aggregate an aggregate

    I have been doing this for over 30 years. I found that people who post bad SQL on forums also write bad code in production. As one guy told me...

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

  • Reply To: Need help with query where i need to aggregate an aggregate

    Data is collected and inserted into a "storage" table at various times throughout the month which shows customers and how much storage they are consuming.

    I need to report on the...

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

  • Reply To: Cursor returns Multiple Rows & Columns

    Let's start with the basics. For over 35 years, Netiquette on SQL forums is to post DDL --not pictures-- when asking for help. Now we have to print out your...

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

  • Reply To: Overlapping Charge Dates

    Kuznetsov’s History Table is a SQL idiom which builds a temporal chain from the current row to the previous row. This is easier to show with code:

    CREATE TABLE Tasks

    (task_id CHAR(5)...

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

  • Reply To: T-SQL Query Help

    Have you considered using a relational database, and following basic data modeling rules?

    You are using SQL to write a 1960’s magnetic tape file! There is no such crap as an...

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

  • Reply To: Primary Keys

    The textbook definition of a relational key is a subset of columns (NOT fields! Try attributes, if you want a near-synonym) which is unique within each row (NOT record) of...

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

  • Reply To: Is there a better (shorter) way to right this short query?

    Does your boss also expect you to write code without any DDL? Perhaps is time for you to update your resume and move on to a company that is run...

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

  • Reply To: Retire Old steps in a table

    >> I have table with loans and different steps for processing , <<

    Really? Where is the DDL for this table? Why don't you follow Netiquette? Why did you use a...

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

Viewing 15 posts - 451 through 465 (of 911 total)