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 2 of 4 (51 items) < Previous 1 2 3 4 Next >
Sort Posts: Previous Next
  • 09-03-2002 8:59 AM In reply to

    SQL Enterprise Manager

    I have an Excel spread sheet that I want to tranform the data to an SQL serv DB. I am trying to use the SQL Enterprise Manger import wizard to accomplish this. But unfortunately I am running into a slight problem. the following are the steps that I take:
    1) Select DTS Import Wizard
    2) Select Excel 8.0 as my data source
    3) Select my existing SQL db as my destination.
    4) Select Copy Table
    5) Click on Transform. This is where I am encountering the problem. The wizard does not allow me to selet the Append row option. It automatically selects the create a table option.

    My question is how can I go about selecting the append option instead of the create new table option.

    Thanks in advance
    • 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.

  • 09-25-2002 10:37 AM In reply to

    Find & Replace

    Good Morning Everyone;

    A quick question. I have a column in a table that has a date of 1/1/1992 repeated 250 times  I want to replace that with 1/1/1976 what is the sql command to use to do that.

    Thank you in advance
    • Post Points: 0
  • 09-30-2002 5:58 AM In reply to

    • Rujuta
    • Not Ranked
    • Joined on 09-30-2002
    • New Member
    • Points 30
    just find out date n replace it with new one by using

    update tablename set date=to_date(1/1/1976,"dd/mm/yyyy") where date=to_date(1/1/1992,"dd/mm/yyyy")

    check if it works
    • Post Points: 0
  • 10-03-2002 12:35 AM In reply to

    • Asher
    • Not Ranked
    • Joined on 10-03-2002
    • New Member
    • Points 5
    if the Excel file's format to keep data is consistent then access this through OLEDB Driver for Excel.





    • Post Points: 0
  • 10-07-2002 9:15 PM In reply to

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

    Multiple Tables in Visual Basic

    I need to link three Access tables in Visual Basic in one ADO data control.
    I also need to manipulate data in one of these tables.
    Can you help me, please?
    I really appreciate your help!
    Fernanda
    • Post Points: 0
  • 10-13-2002 5:18 PM In reply to

    To, nnadimi19
    I m a new member, so today I read out ur problem about append table in  SQL. If you still have same problem tell me. I'll give u solution.
    naqvi_haider@arabia.com
    • Post Points: 0
  • 11-20-2002 2:33 AM In reply to

    • Jeanette
    • Not Ranked
    • Joined on 11-20-2002
    • New Member
    • Points 5

    Help to code sql with adoc control

    I create three tables in access and I joined them ans I also created two queries in access .I displayed my queries by using  Datagrid & Adoc control , my problem is to search through the datagrid and I don't know how
    I tried using this coding:

    I want to search through the datagrid,  how many times does the name apprear on the database.

    Do while not eof(Datagrid1)
    if Ucase(txtName.text) = Ucase(Datagrid1) then
     counter = counter +1
    loop

    Please help!
    • Post Points: 0
  • 11-24-2002 2:24 PM In reply to

    Updating Number

    Hi:

    I have a table with a fieldname "Ranks", which is an integer. Let's say I have all the entries for items ranked from 1 - 15, and suddenly I want to insert a new entry which should be ranked 5th. How can I insert that new entry to be rank #5, and all the entries which was previously ranked 5 and above be automatically incremented to be ranked 6 - 16? The same way applies if I were to remove an entry in the middle (let's say rank # 7). So that all the items which was previously ranked 8th and above be decremented.

    Thanks

    Adrian
    • Post Points: 0
  • 11-26-2002 1:18 PM In reply to

    • ElBarto
    • Not Ranked
    • Joined on 11-26-2002
    • New Member
    • Points 10

    Update the fields that don't exist first

    This is a kind of dirty way to do it, but I would update all the ranks that = 15 to set = 16, then update all the ranks that =14 to set=15, ect. until you get to the point where you want to insert the rank (in your example: 5).

    Same with deleting. in your example, set all ranks that = 8 to set = 7 (this is assuming that you have decided what to do with 7 ranks if any exists).  Set the 9 to 8, ect.

    You would have to repeat the command to insert

    UPDATE Table1 SET Table1.rank = 16
    WHERE (((Table1.rank)=15));

    Decrementing the values of 16 and 15 until you reached the point that you want to insert.

    There may be an easier way, I'm sure... but this should work in your case.  (I would hate to do this for something that has 1000 rankings)
    • Post Points: 0
  • 11-26-2002 1:24 PM In reply to

    • ElBarto
    • Not Ranked
    • Joined on 11-26-2002
    • New Member
    • Points 10

    Need the syntax on the FORMAT Command

    Hello!

    I'm am trying to use the FORMAT command to sort through times in a date/time field in MS Access.  What I need is all records where the time is between 8:00 am and 7:00 pm.  I'm assuming that I have to use the format command in the query, but I cannot find the syntax anywhere.

    Thanks for your help.
    • Post Points: 0
  • 11-27-2002 3:26 PM In reply to

    • OldKrot
    • Top 500 Contributor
    • Joined on 11-27-2002
    • Member
    • Points 195

    VB accsess

    You can use union command in sql so you will get three linked tables as one
    and for exp

    strSQL = "select * from table1 union  (select * from table2) union (select * from table3)

    adodc1.recordsource=strSQL  an for manipulation with one table you can use
    adodb.connection
    • Post Points: 0
  • 12-09-2002 12:59 PM In reply to

    • xiaow
    • Not Ranked
    • Joined on 12-09-2002
    • New Member
    • Points 5

    VB.net database

    I want to use several tables to connect to VB.net,but I don't know how to do it, I can only connect 1 table. I preciate your help.

    thank you!
    • Post Points: 0
  • 12-24-2002 10:11 AM In reply to

    • MattAbar
    • Not Ranked
    • Joined on 12-24-2002
    • New Member
    • Points 25

    SELECT record in table using variable from textbox

    In ms access i have a form in which the users search for a specific record. I want to write an sql statment that uses the information that the user types into the textbox and SELECT it in the table.

    EX:

    Select * from Master_DBase where Comments1 = (info in textbox)

    How would i do this?
    • Post Points: 0
  • 02-26-2003 9:33 PM In reply to

    I have the same doubt!!!

    I'm the n00bie of the n00bies with VB

    Please help with some fresh easy code for extreme beginners
    • Post Points: 0
  • 03-18-2003 6:57 AM In reply to

    • kparazak
    • Not Ranked
    • Joined on 03-18-2003
    • New Member
    • Points 5
    Your Database name is SHOP.MDB
    you have a table called SALES

    One field of the table SALES is ITEM
    Command for acheiving this from VB is

    Declare variables rs as ADODB.Recordset, con as ADODB.connection in the general section

    Initialise variable as follows in the form load event

    set rs=new adodb.recordset
    set con=new adodb.connection

    rs.open "select * from sales where item=" & textitem.text , con, adopendynamic,adlockpessimistic


    This will work

    Thanks,
    Abdul Razak
    • Post Points: 0
Page 2 of 4 (51 items) < Previous 1 2 3 4 Next >