Computers, Consoles and I.T. Post all computer related chat in here for our I.T techies to help with. Please be aware that any discussions related to piracy will be removed and render the member liable to a possible ban. Piracy renders PassionFord Admin liable for prosecution, as well as its members.

SQL help needed

Old Nov 28, 2005 | 08:28 PM
  #1  
J4son's Avatar
J4son
Thread Starter
Virgin
 
Joined: Jul 2005
Posts: 14
Likes: 0
From: west yorkshire
Default SQL help needed

I am getting seriously peed off with this 'should be simple, but isn't' question...

I have FieldA and FieldB, I want to output to fieldC in a table.

ie. I want to run some type of SQL statement that will save me from having to go through each record in a mahooosive database...

I have JAN in FieldA and 05 in FieldB I want to populate FieldC with JAN05

and if FieldA is FEB and FieldB is 110 I want to populate FieldC with FEB110 etc etc...

It should be easy, believe me I have tried all sorts.

I have tried a simple INSERT INTO STATEMENT, I have tried all kinds of configurations of this, I have tried the UNION route and also in my desperation I have tried an Append query, which would never work anyhow, I just can't get it to play ball.

I would appreciate it if any of you computer bods could help out.
Reply
Old Nov 29, 2005 | 09:01 PM
  #2  
AKJ-Dan's Avatar
AKJ-Dan
Regular Contributor
 
Joined: May 2004
Posts: 308
Likes: 0
Default Re: SQL help needed

Originally Posted by J4son

I have JAN in FieldA and 05 in FieldB I want to populate FieldC with JAN05
INSERT INTO tbl_name (FieldC) VALUES(tbl_name.FieldA . tblname.FieldB) WHERE tbl_name.FieldA='JAN' AND tbl_name.FieldB='05';

What about that?
Reply
Old Nov 29, 2005 | 11:02 PM
  #3  
J4son's Avatar
J4son
Thread Starter
Virgin
 
Joined: Jul 2005
Posts: 14
Likes: 0
From: west yorkshire
Default

Cheers for the info fella....

It turned out to be

UPDATE tblname SET FieldC = FieldA & FieldB
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
JoeyBoyden
Restorations, Rebuilds & Projects.
26
Jan 4, 2024 02:36 PM
jessie_rs
Ford RS Cosworth Parts for Sale
11
Jun 3, 2019 04:57 PM
borboyous
Cars for Sale
6
Aug 22, 2015 11:17 AM
col93saphcos
Ford Sierra/Sapphire/RS500 Cosworth
5
Aug 7, 2015 03:21 PM


Thread Tools
Search this Thread

All times are GMT. The time now is 10:25 PM.