Library tutorials & articles

SQL In Simple English

Introduction

I have found that many articles found on the net are good and detailed but they are not really friendly to novice programmers.

In my article the topic is presented as a Q&A session. Most of the questions are the ones that most novices would like to ask. And the Answers are present in very simple language. This approach is excellent and readers who aren't familiar with the technology seem to understand the article in 1 reading itself.

I have kept the article totally language neutral. Hence programmers using any language and who want to do database programming will find it useful.

Comments

  1. 10 Jun 2003 at 14:57

    Hi I would first like to say your site has been really helpful to me.


    When using ASP to display database information in a web page you might use


    [courier new]
    Set adoConnect = Server.CreateObject("ADODB.Connection")
    adoConnect.Open "Reports"
    Set onIndex = Server.CreateObject("ADODB.Recordset")


    strSQL = "SELECT * FROM index WHERE number=10"


    onIndex.Open strSQL, adoConnect
    [/courier new]


    Then if you wanted to display the recordset you could use


    [courier new]
    <% onIndex=("Number") %>
    [/courier new]


    but what I can't work out is if your select statement uses COUNT how do you display the result


    [courier new]
    Set adoConnect = Server.CreateObject("ADODB.Connection")
    adoConnect.Open "Reports"
    Set onIndex = Server.CreateObject("ADODB.Recordset")


    strSQL = "SELECT COUNT(*) FROM index WHERE number=10"


    onIndex.Open strSQL, adoConnect
    [/courier new]

  2. 06 Mar 2002 at 09:17

    sorry probably it has been too long  and may be you've got the answer but try this
    select  * from table where date> #2/2/1979#

  3. 26 Feb 2002 at 12:35
    hi..
    check this ... should work

    select * from table_name where DateOfBirth<TO_DATE('10/9/1976','mm/dd/yyyy')

    try using TO_DATE with the date you want.. i have used this before in this manner..

    hope it helps

    bye
  4. 26 Feb 2002 at 06:47
    Thanks, very helpful.

    What about dates though?  What is the code for finding dates using the SELECT statement eg 'SELECT from * WHERE DateOfBirth < 10/9/76 10:01:10', I can't get it to work.
  5. 01 Jan 1999 at 00:00

    This thread is for discussions of SQL In Simple English.

Leave a comment

Sign in or Join us (it's free).

Kiran Pai

Related podcasts

  • Rocky Lhotka on Data Access Mania, LINQ and CSLA.NET

    Scott talks with developer and author Rockford Lhotka about the attack of the DALs (Data Access Layers). How can we put LINQ to SQL, LINQ to Entities and classic multi-tiered design all into a larger context? What's the right strategy for your data access needs? Scott's got questions and Rocky's ...

We'd love to hear what you think! Submit ideas or give us feedback