Forum Replies Created

Viewing 15 posts - 46 through 60 (of 133 total)

  • RE: check if record exists then update else insert

    You might want to warn him that the code you proposed does not work because of cardinality errors in the old Sybase UPDATE .. FROM .. WHERE. And of course...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: check if record exists then update else insert

    >> I have to check if record [sic] exists in table, if there is record [sic] then UPDATE else INSERT. <<

    Please learn to post DDL, as per the forum...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: Inline table-valued function to list numbers

    Several years ago I got "Fizz Buzz" as an interview question. It is not that tricky, but people tend to write something like this:

    CASE WHEN x % 5 = 0...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: Table valued fucntion or scalar valued function

    I am not sure exactly what you want. I see you used camel case to make the the code harder to read (Google it and see the research; your I...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: How to use a CSV as parameter in a query

    I always used a query with an integer parameter, but now it has to change to more integers in the parameter.

    Before:

    DECLARE @Param INTEGER;

    SET @Param = 1

    SELECT *

    ...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: Completing Fixed Sets With Another Table

    >> I'm having some trouble finding a solution to a problem, its been a few hours now and I think I just completely loose track of what I'm doing and...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: SUM and Group using IN clause

    >> I am looking for a way to create a query to SUM and GROUP BY by using IN clause [sic: predicate, not clause] similar to below. <<

    Why did you...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: why my query returns scientific notation for a varchar field?

    I doubt the vast majority of developers today have even heard of COBOL, and they certainly have never programmed in it.

    Yep, and nobody takes Latin either. Yet everywhere you look,...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: Select exclusive ids comparing master list with two sub lists

    I need help with an SQL query. I have a "Master list table (X and Y categories)". I have to compare the above list with two Sub list tables -...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: Compare two columns before insert

    I have a source column value "abcd" , i will be updating the destination column with the source column value only if there is a change.

    I think you...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: why my query returns scientific notation for a varchar field?

    Let's ask the poster; was this data from a spreadsheet or a string of some kind?

    COBOL, COBOL, COBOL, you really should get yourself out of the '80s, it's time...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: why my query returns scientific notation for a varchar field?

    You do not understand the difference between a string and a numeric in SQL. Registration numbers are called "tag numbers" in data modeling; they are a name of an entity...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: function to clean a phonenumber

    >> I want a SQL function that will allow to make one update but with several replace on the same column. <<

    UPDATE Foobar -- we have no DDL or even...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: Selecting from two groups

    >> I am having issues with the following script. I have 3 tables that link together. <<

    We do not use "link" in RDBMS; that is assembly language. We have references...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: Database keys

    Soliciting other people to do your homework on an Internet form is cheating. Specifically, academic plagiarism, presenting the work of others as your own. We need to report you to...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

Viewing 15 posts - 46 through 60 (of 133 total)