Solved

Urgent:Generating a Database from SQL Script

Posted on 2004-10-31
236 Views
Last Modified: 2008-02-01
Hey experts,

I have a database in the form of an SQL script (its data & meta-data), and I want to generate a database on Access using this script......any help??
0
Question by:mte01
    5 Comments
     
    LVL 3

    Author Comment

    by:mte01
    Can anyone help...this question is a bit urgent....
    0
     
    LVL 18

    Expert Comment

    by:Data-Man
    What does the script look like?

    Mike
    0
     
    LVL 3

    Author Comment

    by:mte01
    Something like that:



    /****** Object:  Table [dbo].[UPR10300]    Script Date: 07/30/2004 4:16:04 PM ******/
    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[UPR10300]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[UPR10300]
    GO

    /****** Object:  Table [dbo].[UPR10304]    Script Date: 07/30/2004 4:16:04 PM ******/
    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[UPR10304]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[UPR10304]
    GO

    /****** Object:  Table [dbo].[UPR41105]    Script Date: 07/30/2004 4:16:04 PM ******/
    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[UPR41105]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[UPR41105]
    GO

    /****** Object:  Table [dbo].[UPR41300]    Script Date: 07/30/2004 4:16:04 PM ******/
    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[UPR41300]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[UPR41300]
    GO

    /****** Object:  Table [dbo].[UPR41301]    Script Date: 07/30/2004 4:16:04 PM ******/
    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[UPR41301]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[UPR41301]
    GO

    /****** Object:  Table [dbo].[UPR41302]    Script Date: 07/30/2004 4:16:04 PM ******/
    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[UPR41302]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[UPR41302]
    GO

    /****** Object:  Table [dbo].[UPR41303]    Script Date: 07/30/2004 4:16:04 PM ******/
    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[UPR41303]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[UPR41303]
    GO

    /****** Object:  Table [dbo].[UPR41600]    Script Date: 07/30/2004 4:16:04 PM ******/
    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[UPR41600]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[UPR41600]
    GO

    /****** Object:  Table [dbo].[UPR10300]    Script Date: 07/30/2004 4:16:13 PM ******/
    CREATE TABLE [dbo].[UPR10300] (
          [CMPANYID] [smallint] NOT NULL ,
          [USERID] [char] (15) COLLATE Latin1_General_BIN NOT NULL ,
          [PYRLACTV] [char] (7) COLLATE Latin1_General_BIN NOT NULL ,
          [DEX_ROW_ID] [int] IDENTITY (1, 1) NOT NULL
    ) ON [PRIMARY]
    GO

    /****** Object:  Table [dbo].[UPR10304]    Script Date: 07/30/2004 4:16:15 PM ******/
    CREATE TABLE [dbo].[UPR10304] (
          [CMPANYID] [smallint] NOT NULL ,
          [BACHNUMB] [char] (15) COLLATE Latin1_General_BIN NOT NULL ,
          [UPRBCHOR] [smallint] NOT NULL ,
          [USERID] [char] (15) COLLATE Latin1_General_BIN NOT NULL ,
          [UPRBCHST] [smallint] NOT NULL ,
          [DEX_ROW_ID] [int] IDENTITY (1, 1) NOT NULL
    ) ON [PRIMARY]
    GO

    /****** Object:  Table [dbo].[UPR41105]    Script Date: 07/30/2004 4:16:16 PM ******/
    CREATE TABLE [dbo].[UPR41105] (
          [CCode] [char] (7) COLLATE Latin1_General_BIN NOT NULL ,
          [CCodeDesc] [char] (31) COLLATE Latin1_General_BIN NOT NULL ,
          [DEX_ROW_ID] [int] IDENTITY (1, 1) NOT NULL
    ) ON [PRIMARY]
    GO

    /****** Object:  Table [dbo].[UPR41300]    Script Date: 07/30/2004 4:16:17 PM ******/
    CREATE TABLE [dbo].[UPR41300] (
          [TAXCODE] [char] (7) COLLATE Latin1_General_BIN NOT NULL ,
          [DSCRIPTN] [char] (31) COLLATE Latin1_General_BIN NOT NULL ,
          [TXCALCTN_1] [smallint] NOT NULL ,
          [TXCALCTN_2] [smallint] NOT NULL ,
          [TXCALCTN_3] [smallint] NOT NULL ,
          [TXCALCTN_4] [smallint] NOT NULL ,
          [TXCALCTN_5] [smallint] NOT NULL ,
          [TXCALCTN_6] [smallint] NOT NULL ,
          [TXCALCTN_7] [smallint] NOT NULL ,
          [TXCALCTN_8] [smallint] NOT NULL ,
          [TXCALCTN_9] [smallint] NOT NULL ,
          [TXCALCTN_10] [smallint] NOT NULL ,
          [ESTDEDTN] [numeric](19, 5) NOT NULL ,
          [DEPEXMPT] [numeric](19, 5) NOT NULL ,
          [MXEICPMT] [numeric](19, 5) NOT NULL ,
          [EXWGLIMT] [numeric](19, 5) NOT NULL ,
          [EXTXRATE] [int] NOT NULL ,
          [DEX_ROW_ID] [int] IDENTITY (1, 1) NOT NULL
    ) ON [PRIMARY]
    GO

    /****** Object:  Table [dbo].[UPR41301]    Script Date: 07/30/2004 4:16:17 PM ******/
    CREATE TABLE [dbo].[UPR41301] (
          [TAXCODE] [char] (7) COLLATE Latin1_General_BIN NOT NULL ,
          [TXFLGSTS] [char] (7) COLLATE Latin1_General_BIN NOT NULL ,
          [STSDESCR] [char] (31) COLLATE Latin1_General_BIN NOT NULL ,
          [LINCLIM] [numeric](19, 5) NOT NULL ,
          [PRSEXAMT] [numeric](19, 5) NOT NULL ,
          [INCPSNEX] [tinyint] NOT NULL ,
          [INCADALW] [tinyint] NOT NULL ,
          [INCLDEPN] [tinyint] NOT NULL ,
          [FDTXPRCT] [int] NOT NULL ,
          [FEDTXMAX] [numeric](19, 5) NOT NULL ,
          [FICATXPT] [int] NOT NULL ,
          [FICATXMN] [numeric](19, 5) NOT NULL ,
          [FLATAXRT] [int] NOT NULL ,
          [STDDMTHD] [smallint] NOT NULL ,
          [STDDPCNT] [int] NOT NULL ,
          [STDDEDAM] [numeric](19, 5) NOT NULL ,
          [STDEDMIN] [numeric](19, 5) NOT NULL ,
          [STDEDMAX] [numeric](19, 5) NOT NULL ,
          [SPCLEXAM] [numeric](19, 5) NOT NULL ,
          [SPCLSDED] [numeric](19, 5) NOT NULL ,
          [SPCLTXRT] [int] NOT NULL ,
          [DEX_ROW_ID] [int] IDENTITY (1, 1) NOT NULL
    ) ON [PRIMARY]
    GO

    /****** Object:  Table [dbo].[UPR41302]    Script Date: 07/30/2004 4:16:18 PM ******/
    CREATE TABLE [dbo].[UPR41302] (
          [TAXCODE] [char] (7) COLLATE Latin1_General_BIN NOT NULL ,
          [TXFLGSTS] [char] (7) COLLATE Latin1_General_BIN NOT NULL ,
          [TXTBLTYP] [smallint] NOT NULL ,
          [TXTBLSEQ] [smallint] NOT NULL ,
          [TXBRULMT] [numeric](19, 5) NOT NULL ,
          [TXBRKTAM] [numeric](19, 5) NOT NULL ,
          [RXBRKTRT] [int] NOT NULL ,
          [TXBREXWG] [numeric](19, 5) NOT NULL ,
          [DEX_ROW_ID] [int] IDENTITY (1, 1) NOT NULL
    ) ON [PRIMARY]
    GO

    ................etc


    0
     
    LVL 18

    Accepted Solution

    by:
    I don't think you can use the script in Access without modifying it.
    If you have access to SQL Server, you could link the tables from SQL Server and then copy possibly copy and paste them as Access tables.

    Mike
    0
     
    LVL 3

    Author Comment

    by:mte01
    Ahaa.....okk...thank you.....my problem has been solved right now because I re-installed MSSQL Server
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
    I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
    Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
    In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

    875 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now