If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > MS-SQL SQL to Access SQL

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-12-04, 04:44
Matt_T_hat Matt_T_hat is offline
Registered User
 
Join Date: Sep 2003
Location: UK
Posts: 122
Arrow MS-SQL SQL to Access SQL

I have some SQL that looks like this (see below) it is for MySQL and MS-SQL (so I am told) however I need to impliment the data structure in Access. I have written a VBscript Class that converts and adds all the tables etc but the constraints are not going to work.

My script can strip out the "[dbo]." that access doesn't need but what I need to get any further is to reconstruct this SQL (See below) so that I have SQL that does the same thing in Access.

Once there I can create a few string manipulations to transform it and bingo job done.

I need some help as I am very weak in the ALTER TABLE department.
Code:
ALTER TABLE [dbo].[openwiki_macrohelp] ADD 
CONSTRAINT [DF__openwiki___macro__7908F585] DEFAULT (1) FOR [macro_builtin],
CONSTRAINT [DF__openwiki___macro__79FD19BE] DEFAULT (0) FOR [macro_numparams],
CONSTRAINT [DF__openwiki___macro__7AF13DF7] DEFAULT ('No description available') FOR [macro_description],
CONSTRAINT [DF__openwiki___macro__7BE56230] DEFAULT ('None') FOR [macro_param1],
CONSTRAINT [DF__openwiki___macro__7CD98669] DEFAULT ('None') FOR [macro_param2],
CONSTRAINT [DF__openwiki___macro__7DCDAAA2] DEFAULT ('None') FOR [macro_param3],
CONSTRAINT [DF__openwiki___macro__7EC1CEDB] DEFAULT ('None') FOR [macro_comment]
GO
__________________
Matt the Hat says: "what!?"
A child of five could understand this! Fetch me a child of five!
SCARY HARD CHALLENGE: http://www.dbforums.com/database-concepts-design/988682-better-relational-design.html
Reply With Quote
  #2 (permalink)  
Old 12-13-04, 13:09
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,605
I can't see why you'd need any code in MS-Access. Just set the default values specified using the MS-Access GUI, and it should handle the rest for you.

While MS-Access doesn't scale well compared to MS-SQL, it certainly is easier to use!

-PatP
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On