School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,431 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,502 people online right now. Registration is fast and FREE... Join Now!




INSERT and Substitution Variables - SQL

 

INSERT and Substitution Variables - SQL

f.ben.isaac

15 Jun, 2009 - 02:11 PM
Post #1

New D.I.C Head
*

Joined: 22 Mar, 2009
Posts: 12

insert into my_employee(id, last_name, first_name, userid, salary)
values(&enter_id, '&&last_name', '&&first_name',
substr('&first_name', 1, 1) || substr('&last_name', 1, 7),
&enter_salary);

everytime i run this script i need to get a text box to ask for first_name and last_name

so every time i run this script, i can insert new row with new data. && allows me to insert first name and last name once. Next time when i run script i only get asked to enter user_id and salary...

How can i let this script to ask me to insert first_name and last_name every time i execute it?

User is offlineProfile CardPM
+Quote Post


woodjom

RE: INSERT And Substitution Variables - SQL

18 Jun, 2009 - 12:57 PM
Post #2

D.I.C Regular
Group Icon

Joined: 8 May, 2008
Posts: 365



Thanked: 15 times
My Contributions
what language and environment are you going to use this. As any enterprise level database does not hold a interface structure. if you are using Access you can use a form to get the user input.

So my question to you is:
Where are you implementing this "script"?
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/8/09 12:43AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month