SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist ckchin's Avatar
    Join Date
    Mar 2002
    Location
    msia
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How can I import sql and create database

    I have the sql text as follows:

    CREATE DATABASE WebLogin
    GO

    USE WebLogin
    GO

    CREATE TABLE Users
    (
    UserName varchar(32) NOT NULL,
    Password varchar(32) NOT NULL,
    Role varchar(32)
    )
    GO

    INSERT INTO users (UserName, Password, Role) VALUES ('Jeff', 'imbatman', 'Developer')
    INSERT INTO users (UserName, Password, Role) VALUES ('John', 'redrover', 'Manager')
    INSERT INTO users (UserName, Password, Role) VALUES ('Bob', 'mxyzptlk', 'Developer')
    INSERT INTO users (UserName, Password, Role) VALUES ('Alice', 'nomalice', 'Manager')
    INSERT INTO users (UserName, Password, Role) VALUES ('Mary', 'contrary', 'Developer')
    GO
    My question is:

    How can I import this sql text into MSSQL or MSDE (I am using MSDE).

    Do you know any applications that can convert the above sql text to Microsoft Access?

    Thanks in advance.
    Last edited by ckchin; Jun 24, 2002 at 00:59.

  2. #2
    SitePoint Zealot fredmintah's Avatar
    Join Date
    Jun 2004
    Location
    Ghana
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ckchin
    I have the sql text as follows:

    CREATE DATABASE WebLogin
    GO

    USE WebLogin
    GO

    CREATE TABLE Users
    (
    UserName varchar(32) NOT NULL,
    Password varchar(32) NOT NULL,
    Role varchar(32)
    )
    GO

    INSERT INTO users (UserName, Password, Role) VALUES ('Jeff', 'imbatman', 'Developer')
    INSERT INTO users (UserName, Password, Role) VALUES ('John', 'redrover', 'Manager')
    INSERT INTO users (UserName, Password, Role) VALUES ('Bob', 'mxyzptlk', 'Developer')
    INSERT INTO users (UserName, Password, Role) VALUES ('Alice', 'nomalice', 'Manager')
    INSERT INTO users (UserName, Password, Role) VALUES ('Mary', 'contrary', 'Developer')
    GO


    My question is:

    How can I import this sql text into MSSQL or MSDE (I am using MSDE).

    Do you know any applications that can convert the above sql text to Microsoft Access?

    Thanks in advance.
    Create the database in Access or Excel and import it to mssql using the Data Transformation Services (DTS) wizard. Or create a text file together with the column headings and import it into the mssql database using the DTS wizard. You can create your database when you are importing the text file or the access database you created or the excel work sheet you created.

    Try it out.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •