473,465 Members | 1,964 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Im hungry, tired and in need of some MS SQL help

2 New Member
Hello everyone,

I'm creating a database in access but using SQL... its for my course at uni. I want to set a boolean value: Yes/No. but i don't know how to do this, table i want -

CREATE TABLE CASE(
CASE_ID NUMERIC NOT NULL PRIMARY KEY,
CASE_NAME CHAR (255),
CASE_DESCRIPTION CHAR (1024),
CASE_TYPE_ID CHAR (8), /*(FK)*/
CASE_STATUS (YES/NO), <---- here i want it to be either 'OPEN' or 'CLOSED' instead of 'YES or 'NO' is this possible? but would also like how to do a yes and no, lol
CLIENT_ID NUMERIC, /*(FK)*/
INV_OFF_ID NUMERIC, /*(FK)*/
FEE_ID NUMERIC, /*(FK)*/

Cheers
Dan
May 7 '07 #1
1 1073
JConsulting
603 Recognized Expert Contributor
here's a blurb straight out of Northwind database. Notice the case for IsDiscontinued. Hope this helps.
J

Expand|Select|Wrap|Line Numbers
  1. CREATE TABLE Products (
  2.       ProductID int IDENTITY(1, 1) NOT NULL,
  3.       ProductName nvarchar(40) NOT NULL,
  4.       SupplierID int NULL,
  5.       CategoryID int NULL,
  6.       QuantityPerUnit nvarchar(20) NULL,
  7.       UnitPrice money NULL,
  8.       UnitsInStock smallint NULL,
  9.       UnitsOnOrder smallint NULL,
  10.       ReorderLevel smallint NULL,
  11.       Discontinued bit NOT NULL,
  12.       IsDiscontinued AS (case Discontinued when 1 then 'Yes' when 0 then 'No' end)
  13. )
May 7 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Thomas Heller | last post by:
I'm slowly getting tired maintaining py2exe. It is far from perfect, although it has interesting features (I would say). The problem, apart from the work, is that it is good enough for me - I...
10
by: Mark Harris | last post by:
Just wondering if anyone else has noticed that C# is fairly ram hungy, or at least assigns alot of ram? If you have has anyone developed any strategies to combat it? - Mark Harris
3
by: Sky Sigal | last post by:
I coming unglued... really need some help. 3 days chasing my tail all over MSDN's documentation ...and I'm getting nowhere. I have a problem with TypeConverters and storage of expandableobjects...
14
by: Thomas Andersson | last post by:
Hi, I am so so tired of getting this error message when I try to open a web project or create a new one: The web server reported the following error when attempting to create ot open the web...
9
by: Mat | last post by:
i reinstalled everything but the problem still persists. Really, i am tired to restart the IDE every 10 mn. -classes doesn't have constructors but i have 5 constructors -Variable xxx is not...
1
by: nickjaffe | last post by:
Hi all, I've spent literally hours trying to figure this one out. I'm re-developing an app from vb6 to vb.net, and I cannot get my XML code working. I've just started using .NET. I'm tired,...
14
by: Martin Wells | last post by:
When I want to store a number, I use "unsigned". I go with unsigned because it's the natural type for the system, and so should be the fastest. However, there are 8-Bit microcontrollers out...
0
by: pieandpeas | last post by:
Hi, i'm using a sqldatareader to display information in textboxes, now i need the best 'resource saving' method to save the information held in these textboxes back to the database.. i know there are...
4
by: pieandpeas | last post by:
Hi, i'm using a sqldatareader to display information in textboxes, now i need the best 'resource saving' method to save the information held in these textboxes back to the database.. i know there are...
1
by: dustylane | last post by:
I know very little about HTML and CSS but I've been able to decipher most of what I've needed to know based on trial and error. I had a friend coding me a website long ago and he abandoned the...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.