how to run a file in MySQL

2005-04-04 Thread Joppe A
Hello all, This is probably really basic for all of you but I have been trying to find it in the manual without success... My question is if it is possible when you are logged in to MySQL to run a file with sql-statements in, instead of sit and execute each statement seperatly. The file I hav

error message when creating tables

2005-03-04 Thread Joppe A
Hello all, I have a problem with a script I have made, it always stops when it tries to creat a special table, I have been comparing this part of the script with the other parts that is working and cand find anything that looks wrong... The message MySQL write is: Can't create table './test_

problems...

2005-03-01 Thread Joppe A
Hello all, I have I small problem I wonder if there is a easy solution for.. I have a SQL-query where I count out how many users per "n_id" I have. it is a little tricky because I had to do a left joint and compare two tables to get out thoose that are represented only in one of the tables. SE

Fwd: how can I do instead of using subselects?

2005-02-28 Thread Joppe A
Please help, this must be easy for experinced MySQL users but for me as a newbie isn't it. I have tried to find the answer on the things below in older MySQL manuals but without any success... I have a problem with a few sql-queries because I have written the questions with subselect statement

how can I do instead of using subselects?

2005-02-28 Thread Joppe A
Hello everyone, I have a problem with a few sql-queries because I have written the questions with subselect statements and then will they not work on older MySQL DB:s. Can any one help me to say haw to solve it without subselect! Today looks the questions like this: SELECT (SELECT count(SUB.S

Re: SQL problem

2005-02-23 Thread Joppe A
Sorry, I have missed information in my earlir question, that I have added below. > Joppe A wrote: > > Hello all, Please help a newbie ;-) Have a little problem with to > make a sql-query as I want to have it... The problem is I need to > check in 3 tables and count out and get

SQL problem

2005-02-23 Thread Joppe A
Hello all, Please help a newbe ;-) Have a little problem with to make a sql-query as I want to have it... The problem is I need to check in 3 tables and count out and get it presentated per "n_id" like n_id counted 01 5 02 10 03 2 My tables look as follows... In sub: id n_id

SQL-Query problem

2005-02-22 Thread Joppe A
Hello all, Have a little problem with to make a sql-query as I want to have it... The problem is I need to check in 3 tables and count out and get it presentated per "n_id" like n_id counted 01 5 02 10 03 2 My tables look as follows... In sub: id n_id In us: id email In s

how to make question that check...

2005-02-21 Thread Joppe A
The following statement helped Roger Backlund me with a few days ago, It works great but now I need to make it more advance and I don#t get any where to find the right solution.. SELECT COUNT(created) from SUBSCRIBER where date_format( date_sub(now(), interval 1 day), '%Y%m%d%H%i%s') <= created;

How to make so I only need to specify the id once..

2005-02-21 Thread Joppe A
Hello, I have a small problem that is probably easy to fix but it is to advanced for me as a "newbe". In my sql-query (below) have I the ID specified twice, I wonder if there is a easy way to solve it so I only need to write my ID once in the query? SELECT (SELECT COUNT(*) FROM subs WHERE id=1

Subquery problems

2005-02-17 Thread Joppe A
hello all, I am a newbe working with MySQL. I have a problem that I can't figure out how to do. I have 2 tables that I want to take out data from, the tables looks like below. tableA == ID VARCHAR(12) NAMEVARCHAR(255) CREATED TIMESTAMP tableB == USER_ID