The Electrical Contractor Network

ECN Electrical Forum
Discussion Forums for Electricians, Inspectors and Related Professionals

Books, Tools and Test Equipment for Electrical and Construction Trades

Topic Options
Rate This Topic
#132072 - 02/20/05 12:25 AM SQL and Database help
Gloria Offline
Member
Registered: 05/01/04
Posts: 395
Loc: Budapest, Hungary
Hello!

I'm having problems with using access or sql. Can anyone help me?

1., I want to put together two coloumns. In excel I'd do it with concatenate. In access? There are some built-in functions, but I dunno which one to use. (It is not a solution to do it in excel, while the base datas can change and I have to run this update query some times.

2., How to choose a row of numbers from a database if I don't know, how long the number is?
This case it is telephone numbers, which cal be 1 - 7-8 long. How to look it up?

Thank you in advance,

Gloria
_________________________
The world is full of beauty if the heart is full of love
Top
Tools for Electricians:
#132073 - 02/20/05 08:51 AM Re: SQL and Database help
JCooper Offline
Member
Registered: 12/30/02
Posts: 229
Loc: Kendall Park, NJ USA
Gloria, you can concatenate in SQL with the 'concat' command

eg 'Insert into table1.field3 concat(table1.field1+table1.field2)'

I think that would work for you, but the concat is the concatenate command for SQL.

As far as the query for the phone number how is it structured? Is each number in its own column and you need to select non-null values?

'select * from table1 where column<>'0''
Top
#132074 - 02/20/05 10:34 PM Re: SQL and Database help
Gloria Offline
Member
Registered: 05/01/04
Posts: 395
Loc: Budapest, Hungary
Hello!

Thank you, I'll try.
The problem with the phone numbers is that I don't know, how long it is.
The best would be if I could enter 2-3-4-5, any numbers and it would recognize the location, I mean in the databases there are country and local numbers. For ex. 18007654321 and if I type 18007 it would recognize the 1800 which is in the list.
_________________________
The world is full of beauty if the heart is full of love
Top
#132075 - 02/20/05 10:40 PM Re: SQL and Database help
Gloria Offline
Member
Registered: 05/01/04
Posts: 395
Loc: Budapest, Hungary
Dear JCooper!

Sorry, It was not working in access.
I thought I had to make an update query, cause the base data table can change.

Any advise?
_________________________
The world is full of beauty if the heart is full of love
Top
#132076 - 02/23/05 07:44 AM Re: SQL and Database help
Gloria Offline
Member
Registered: 05/01/04
Posts: 395
Loc: Budapest, Hungary
I visited the ms online forum for help and that is -I must say - a very good site. there are very skilled people helping.

I can suggest to use it.
_________________________
The world is full of beauty if the heart is full of love
Top

Featured:

2017 NEC and Related
2017 NEC
Now Available!

Shout Box

Recent Posts
Members: Non-Members: Did you know?
by Admin
01/22/17 02:34 PM
Safety at heights?
by HotLine1
01/21/17 08:51 PM
International Wire Colour Codes
by Texas_Ranger
01/21/17 03:29 PM
Looking for older post
by Texas_Ranger
01/21/17 03:22 PM
Last time to chat here
by Trumpy
01/20/17 11:41 PM

Who's Online
3 registered (gfretwell, TRUE POWER, Admin), 123 Guests and 12 Spiders online.
Key: Admin, Global Mod, Mod
New in the Gallery:
Desk-mounted "power-board"
Top Posters
gfretwell 9066
Trumpy 8560
pauluk 7693
HotLine1 6833
sparky 5545
Member Spotlight
Tom
Tom
Member Since: 01/01/01
Posts: 1069

ECN Electrical Forums - sponsored by Electrical Contractor Network - Electrical and Code Related Discussion for Electrical Contractors, Electricians, Inspectors, Instructors, Engineers and other related Professionals