Forum Replies Created

Viewing 15 posts - 226 through 240 (of 911 total)

  • Reply To: Varchar to datetime

    To keep the record straight, the ANSI/ISO SQL standards allow only the ISO – 8601 "YYYY-MM-DD" format for dates. The. The reasons we pick this one were:

    1) it's not ambiguous,...

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

  • Reply To: aggregate value by group

    What you posted is by definition not a table at all! The table must have a key. You cannot embed spaces in the data element name in any of the...

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

  • Reply To: How to show multiple individuals>

    This is a common misconception about the three valued logic and SQL. We have three logical values: true, false and unknown. The search condition used in WHERE or ON clauses...

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

  • Reply To: Create a view...

    >> I have a customer table and than a customer group group table which is basically grouping customers <<

    Why did you fail to post any DDL? Why is the sample...

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

  • Reply To: How to show multiple individuals>

    >> ]This is how the data is stored in the system. There is no start or end date in the system. Any actual day off is recorded in a row...

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

  • Reply To: Transpose Rows

    Incentive trying to mimic procedural (recursive) code in SQL, I would've used a nested set model. You can Google it and see that it's very set oriented so it works...

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

  • Reply To: How to show multiple individuals>

    http://www2.cs.arizona.edu/~rts/publications.html

    This also has his other books on temporal SQL, etc.

     

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

  • Reply To: How to show multiple individuals>

    You don't know how to do a data model for temporal data. Please get a copy of Rick Snodgrass's book from the University of Arizona on temporal queries in SQL....

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

  • Reply To: Splitting a crazy column into two new columns

    I strongly agree with your decision to clean the data before it goes to the database. However, we never designed SQL to be a string handling language. If you can...

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

  • Reply To: Create string from broken hierarchy

    Have you ever considered normalizing your table? Or following ISO 11179 naming rules? What you did post is a mess. First of all, a table has to have a key,...

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

  • Reply To: Find run of repeating value

    >> I want to find runs of at least three 1s, and return the result below. The 0s would be any test_values that are not 1. <<

    This is been a...

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

  • Reply To: convert scalar function to table valued function

    >> failed to convert the below scalar function to table valued function, i tried many times and always got error <<

    Actually, your problem is that you're not writing SQL yet!...

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

  • Reply To: SQL query error help

    >> I have a table, around 320 fields... <<

    You might want to read the SQL standards, so you'd know what the term "field" means in this language. It is a...

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

  • Reply To: Add a Time column and a Date column together?

    DATE and TIME are available data types that can be combined into the newer DATETIME2(n) data type. Just use the CAST() function and simple math. The use of an integer...

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

  • Reply To: Auto generate AlphaNumeric with defined letters and numbers (e.g. A1-A6)

    >> I need to generate a sequence AlphaNumeric characters based on a certain condition. <<

    You talk about a sequence, but that's how filesystems work. Perhaps you meant to think about...

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

Viewing 15 posts - 226 through 240 (of 911 total)