Dear friends,
If i want to specify the column name as "acc_no" then it
total size is 6 it must get the first two letters as alphapets and the
remaining 4 as numbers for this how to write the query?. Please reply.
By,
Gobi S. 3 1422
what is the naming procedure i.e will you know what the letters and numbers
will be .
If you mean dynamically create the value then
DECLARE @number INT
SET @number = mynumber
'aa_'+convert(v archar(4),@numb er)
--
----
Jack Vamvas
_______________ _______________ _____
Receive free SQL tips - www.ciquery.com/sqlserver.htm
_______________ _______________ _____
"gobiparthi " <go*******@gmai l.com> wrote in message
news:11******** **************@ g10g2000cwb.goo glegroups.com.. . Dear friends,
If i want to specify the column name as "acc_no" then it total size is 6 it must get the first two letters as alphapets and the remaining 4 as numbers for this how to write the query?. Please reply.
By, Gobi S.
Hi Gobi
Not sure if you meant how to define the table or query it But here is how
you would define it.
Create table accountnums(
row_id int not null identity(1,1) Primary Key,
acc_no varchar(6))
alter table accountnums add CONSTRAINT CK_acc_no CHECK (acc_no LIKE
'[A-Z][A-Z][0-9][0-9][0-9][0-9]')
insert accountnums(acc _no) values('aa1234' ) --OK
insert accountnums(acc _no) values('AA1234' ) -ok
insert accountnums(acc _no) values('A11234' ) --Generates error.
--
-Dick Christoph
"gobiparthi " <go*******@gmai l.com> wrote in message
news:11******** **************@ g10g2000cwb.goo glegroups.com.. . Dear friends,
If i want to specify the column name as "acc_no" then it total size is 6 it must get the first two letters as alphapets and the remaining 4 as numbers for this how to write the query?. Please reply.
By, Gobi S. http://vyaskn.tripod.com/object_naming.htm
Madhivanan
gobiparthi wrote: Dear friends,
If i want to specify the column name as "acc_no" then it total size is 6 it must get the first two letters as alphapets and the remaining 4 as numbers for this how to write the query?. Please reply.
By, Gobi S. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Thomas Jerkins |
last post by:
When I write a create table SQL statement I want to add some information about the column heading of each column.
How does the exact syntax for the create table look like (which includes this column data look)?
How do I add later column headings ?
Tom
|
by: unwiseone |
last post by:
Hello,
Does any know how to specify a value of a DTD element? For example,
here's an external DTD that I have:
=======================================
<!ELEMENT summercamps (Camp+)>
<!ELEMENT Camp (name, campcode?, ContactPhone, ContactPhone?,
Activity+)>
|
by: Yeah |
last post by:
I have an HTML table with two columns of text. Here's what it looks like:
FIRST COLUMN (each cell is ID="date')
Background orange, font Serif size 13px, aligned center
SECOND COLUMN (each cell is class="entry")
Background white with clickable text link (Sans-serif 11px, link black,
visited blue, hover navyblue)
The first column's content has been assigned CSS ID "date", in the above
mentioned style. The second column's content has...
|
by: John Baker |
last post by:
Hi:
Access 2000 W98!
I have a table with numerous records in it, and am attempting to delete certain records
that have been selected from it. These are selected based on the ID number in a different
table. While I am using the tools in Access for query setup, its easier to show it on here
using the SQL for the query, which is as follows( the table is ):
DELETE .date, .,
|
by: Grey |
last post by:
i need to design a datagrid in asp.net. the column name of the grid is
changing every time it generate. the column name should be get from the xml
attribute. is it possible to do that ??
million thanks
| |
by: Jan Wagner |
last post by:
Hi,
can't figure this one out, what's the CSS way to specify the language?
In HTML it would be simply an lang="xx" attribute, or XHTML
xml:lang="xx", but, how about in CSS? This would be required for a
screen reader (text to speech) for accessibility, to help the reader
software use the correct presentation method (e.g. correct language
module).
|
by: 205210864 |
last post by:
have to write page headings and column headings to a text file from vb.net.
please send me a piece of code to illustrate this process.
eg. heading = "heading"
column name = "column 1" , "column 2"
thanx
|
by: MeDontGetSomething |
last post by:
The thing is I'm currently working with Infragistics NetAdvantage UltraGrid and I use DataSet with one table as DataSource. Since data dosen't come straigh from database i have to make columns of that table manually so i just use Add method and only give column name as paramter.
For some reason when i try to change value in grid from number to nothing the grid gives me message that "Unable to update the data value: Cast from string "" to type...
|
by: =?Utf-8?B?Q0QuU21hbGxleQ==?= |
last post by:
Is there a command line switch available for the EventViewer which will allow
me to specify which directory to view the available logs from?
I will have multiple workstations writing to a mirrored set of really large
flash drives. The workstations will write to their specific standard .evt
files. I need to be able to start EventViewer and specify which
workstations's logs to go view at startup.
Is this possible w/o creating my own...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |