Send a suggestion!

We're building a brand new version of the site, and we'd love to hear your ideas

Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

[48] SQL Commands

Last post 01-24-2007 7:18 AM by zible. 50 replies.
Page 1 of 4 (51 items) 1 2 3 4 Next >
Sort Posts: Previous Next
  • 01-01-1999 12:00 AM

    [48] SQL Commands

    This thread is for discussions of SQL Commands.

    • Post Points: 0
  • Advertisement

    • Red Gate Software

    Advertisement

    Want to boost your .NET application performance?

    Some developers always seem to write efficient and lightening-fast code. What is their secret? It’s ANTS Profiler. “We improved the performance of the application up to 10 times” Dan Ports, Intrigma.

    Try it for yourself now.

  • 01-26-2002 1:44 PM In reply to

    • kittiez1
    • Top 500 Contributor
    • Joined on 09-27-2001
    • Member
    • Points 355

    Finding Strings

    how do you get a record that contains a a string but the field does not equal the string?
    • Post Points: 0
  • 02-11-2002 11:19 PM In reply to

    • sabeer
    • Not Ranked
    • Joined on 02-09-2002
    • Junior Member
    • Points 235
    if it is SQL / Sybase database, execute below query:

    select * From [table name] where [field name] is like "%sabeer%"

    Where:
    [table name] is the name of table
    [field name]  is the nameof a field you want to search in for a string and
    sabeer in "%sabeer%" is a string u r looking for

    • Post Points: 0
  • 07-07-2002 1:19 PM In reply to

    • jaychow
    • Not Ranked
    • Joined on 07-07-2002
    • New Member
    • Points 10

    How to link the MS Access database & joint with SQ

    Can I know that before I use the SQL statement how can I connect the database like MS Access how to link it?
    • Post Points: 0
  • 07-08-2002 9:28 AM In reply to

    Quote:
    [1]Posted by jaychow on 7 Jul 2002 01:19 PM[/1]
    Can I know that before I use the SQL statement how can I connect the database like MS Access how to link it?

    Create a system DSN pointing to the Access/SQL database then connect with something like:-

    dim cnn, rst, sqltext
    set cnn = Server.CreateObject("ADODB.Connection")
    set rst = Server.CreateObject("ADODB.RecordSet")
    cnn.Open "DSN=MyDatabase ;"
    sqltext = "SELECT * FROM TableName WHERE Id="1"
    rst.Open sqltext,cnn,3,3
    ...
    do something with the returned records
    ...
    rst.close
    set rst = nothing
    set cnn = nothing
    • Post Points: 0
  • 07-22-2002 2:29 PM In reply to

    • cakers
    • Not Ranked
    • Joined on 07-22-2002
    • New Member
    • Points 5
    Will that work if 'sabeer' is the first part of the searched string (ie. 'sabeer123') ?

    Oops...nevermind...I just found the answer in another article.  
    • Post Points: 0
  • 07-22-2002 3:19 PM In reply to

    Yes it should work!
    • Post Points: 0
  • 08-09-2002 10:08 AM In reply to

    • ashi
    • Not Ranked
    • Joined on 08-09-2002
    • New Member
    • Points 5

    Deleting Records in MS Access using Dao

    hi..

    I am trying to delete a record from a MS access format database using DAO. The problem I am facing is that after deleting the record if I try to insert a new record then the unique id for this record does not start from the beginning.
    The unigue id(FileID) is created using
    m_oDaoPrjTableDef.CreateField("FileID",dbLong,4,dbAutoIncrField);
    where m_oDaoPrjTableDef is an object of type CDaoTabledef.

    If there is initially one record in the table having FileID 1 and it is deleted . Now on inserting a new record the FileID taken is 2 thouhg it is the only record in the table.
    Please suggest me how to get it started from 1 rather than 2

    Regards,
    Ashima
    • Post Points: 0
  • 08-12-2002 2:22 PM In reply to

    SQL Command questions

    I am very new to SQL. I have a couple quick questions.

    1) Is there a command that will display a detail of a table, in other words the fileds in a table with its field type and length????

    2) How can I comment out a couple of execution lines.

    Thanks
    • Post Points: 0
  • 08-16-2002 9:44 AM In reply to

    • Antoniol
    • Not Ranked
    • Joined on 08-16-2002
    • New Member
    • Points 10

    SQL Command questions

    Maybe this will help you...

    1) Is there a command that will display a detail of a table, in other words the fileds in a table with its field type and length????

    A:  SELECT *
        from INFORMATION_SCHEMA.Columns
        where table_name = 'your_table'

    2) How can I comment out a couple of execution lines.

    A:  If you want to comment out lines you can use these:
        -- Code  (this will commnet everything to the right of the 2 minus signs
        or
        //*  Code  *//  (this will comment everything between them)

    Hope this help you.

    Antoniol
    • Post Points: 0
  • 08-16-2002 10:05 AM In reply to

    SQL Commands

    I tried the command but kept on getting the following message>

    "Server: Msg 208, Level 16, State 1, Line 1
    Invalid object name 'INFORMATION_SCHEMA.Columns'."


    Thanks
    • Post Points: 0
  • 08-16-2002 10:09 AM In reply to

    • Antoniol
    • Not Ranked
    • Joined on 08-16-2002
    • New Member
    • Points 10

    SQL Command questions

    What SQL Server are you running??

    Antoniol
    • Post Points: 0
  • 08-20-2002 11:39 AM In reply to

    table schema

    Some one sent me the SQL code to display a table schema, but unfortunately I cannot find it any more. Would someone be kind enough and send me the command to display table schema in a database.

    Thanks:
    • Post Points: 0
  • 08-21-2002 10:31 AM In reply to

    Print SQL Results

    Help I need some Help!!!!

    I run a SQL command and I get the result on the screen, but when I try to print the result the only thing that gets printed is the SQL command and not the result. WHAT AM I DOING WRONG?????????????????????????
    • Post Points: 0
  • 08-30-2002 8:05 AM In reply to

    SQL Script

    I have an excel spread sheet that I want the data from the columns populated into my database. Can someone help me with the script for that.

    Thanks in advance
    • Post Points: 0
Page 1 of 4 (51 items) 1 2 3 4 Next >