473,385 Members | 1,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Creating db from SQL statements

I have created a database (*.df) file for use with my website. I have
files containing DDL and DDM for creating the db schema and stored
procedures respectively. However, I have not (as yet) founs out how to
"import" the SQL statements into the datbase, to create the required
database objects. I would appreciate any help/info that will help me
generate the db objects from the SQL statements.

Additionally, I need to 'port' my SQL from PostgreSQl to SQL Server SQL.
I would like to use ANSI-SQL as much as possible, and avoid using SQL
specific SQL wherever possible. My tables typically look something like
this:

CREATE TABLE foobar_def(
id SERIAL PRIMARY KEY,
fkid integer references sometable(id) NOT NULL ON DELETE CASCADE,
name varchar(32) NOT NULL,
kval integer CHECK (kval between 1 and 3) NOT NULL
);

CREATE INDEX fb_idx ON foobar_def (name, kval);
What would be the equivalent syntax to create this table (and index) in
SQL Server?
Any one has links to the SQL Server SQL guide ?
Jul 9 '07 #1
1 1205
"Grey Alien" <gr**@andromeda.comwrote in message
news:F-*********************@bt.com...
What would be the equivalent syntax to create this table (and index) in
SQL Server?

Any one has links to the SQL Server SQL guide ?
You're in the wrong newsgroup - this one is for ASP.NET issues...

For SQL Server, please post to:

microsoft.public.sqlserver.server

or

microsoft.public.sqlserver.programming
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jul 9 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Edvard Majakari | last post by:
Greetings, fellow Pythonistas! I'm about to create three modules. As an avid TDD fan I'd like to create typical 'use-cases' for each of these modules. One of them is rather large, and I wondered...
2
by: Bill | last post by:
I have the following situation. We sell books on our website, and some of the books have more than one author. So I needed to create a many-to-many table, which is the intermidiate table between...
3
by: Robin Tucker | last post by:
Hi there, I have a database on my test machine that will need to be installed on users machines. I would like to create the database with the given schema on the users machine and also with...
2
by: Ben | last post by:
My current project requires me to create part of a form that is created on the fly. The project consists a list of entries to an event. The name and address and such is easy. The design is detup so...
1
by: Dixie | last post by:
I wish to add some fields to an existing table in code. I am using the following code from rkc. CurrentDb.Execute ("ALTER TABLE MyTable ADD MyNewField Text 25") This works , but I need to also set...
8
by: Simon Edwards | last post by:
Something thats been bugging me for a while... how do you create a namespace that has many children (namespaces) I.e system.io.blah.blah Iv'e done it by creating a class which contains...
1
by: OxfordConsult | last post by:
I have a form and it is to creat a 'link' between a project and a company. Creating a record form this table will simply create a record in a databse with the company ID and project ID. Project ID is...
1
by: Abdo Haji-Ali | last post by:
Previously I used to create user controls if I wanted to use a specific set of controls in multiple pages, however I want to deploy my control in other applications so I thought of creating custom...
13
by: jkimbler | last post by:
As part of our QA of hardware and firmware for the company I work for, we need to automate some testing of devices and firmware. Since not everybody here knows C#, I'm looking to create a new...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.