473,473 Members | 2,138 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

using a constant field

Hi Planet!

I have created a table (see test script below)

I have an Id field that will contains numerical values.
For reason behond my control This field has to have a
constant hard coded letter V in front of it.

V4789
V0023
ect...

Is there a way know to man kind to do this and
avoid storing 100 000 letter V for nothing...
And maybe keep a INT type rather than it becoming
VARCHAR or CHAR.

thanks for your help.
CREATE DATABASE JK_PROD;
USE JK_PROD;

CREATE TABLE VOUCHERS (
Id INT(8),
Marketing_Code VARCHAR(15),
Date_Created DATETIME,
Date_Used DATETIME,
Account_Nb VARCHAR(10) NOT NULL,

PRIMARY KEY(Id)
);

CREATE UNIQUE INDEX IDX_VOUCHERS ON VOUCHERS (Id);
INSERT INTO VOUCHERS VALUES
('','mrk code 1','2004-01-01','2004-01-02','AC01');
INSERT INTO VOUCHERS VALUES
('','mrk code 2','2004-01-01','2004-01-02','AC02');
INSERT INTO VOUCHERS VALUES
('','mrk code 3','2004-01-01','2004-01-02','AC03');
Jul 19 '05 #1
0 1514

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

Similar topics

0
by: Fred | last post by:
Hi Planet! I have created a table (see test script below) I have an Id field that will contains numerical values. For reason behond my control This field has to have a constant hard coded...
5
by: Roger Leigh | last post by:
I've written a simple container template class to contain a single value. This emits a signal when the value is changed (it's used as a notifier of changes), and listeners can connect to its...
3
by: Random Person | last post by:
Does anyone know how to use VBA to relink tables between two MS Access databases? We have two databases, one with VBA code and the other with data tables. The tables are referenced by linked...
2
by: Johm | last post by:
Can i use a constant in a query ? I have a constant Public Const rate As Double = 10 Can i use it in the query ? I want to multiply the field with the constant rate, but Access does not accept...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
1
by: Daveyk0 | last post by:
Hello there, I have a front end database that I have recently made very many changes to to allow off-line use. I keep copies of the databases on my hard drive and link to them rather than the...
5
by: Paul E Collins | last post by:
I have a class hierarchy representing data importers, each of which reads lines from a particular type of comma-separated data file and creates corresponding entries in a database. There is an...
13
by: Kantha | last post by:
Hi all, I have declared an Union as follows typedef union { struct interrupt_bits { unsigned char c_int_hs_fs_status : 1, c_setup_intflag : 1,
65
by: Arjen | last post by:
Hi, Form a performance perspective, is it wise to use the ref statement as much as possible? Thanks! Arjen
7
by: John Koleszar | last post by:
Hi all, I'm porting some code that provides compile-time assertions from one compiler to another and ran across what I believe to be compliant code that won't compile using the new compiler. Not...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.