Hello!
My company curently use microsoft SQL, we discover the MySQL database few
weeks ago and we really impressed, but i have a few problems becouse my
querys use the union select which is not acceptet by MySQL, for example:
SELECT
DATE_FORMAT(min(time_stamp),'%Y.%m.%d') as
time_stamp_date,
DATE_FORMAT(min(time_stamp),'%H:%i:%s') as
time_stamp_time,
avg(number) as vlu,
instance_name
FROM
P_VIEW A,
SELECT 0 as N, 100 as number
union select 1,0
union select 2,0
union select 3,0
union select 4,0
union select 5,0
union select 6,0
union select 7,0
union select 8,0
union select 9,0
union select 10,0
B
WHERE
A.value = B.N and
time_stamp >= '2001.01.01' and
time_stamp <= '2001.01.10' and
instance_name = 'xxx' and
node_name = 'LocalHost' and
parameter_name = 'ServiceStatus' and
app_name = 'NT_SERVICE'
GROUP BY " .
datepart (hour, time_stamp),
instance_name
order by
time_stamp_date,
time_stamp_time
the errror exepted :
You have an error in your SQL syntax near 'SELECT 0 as N, 100 as number
union select 1,0
union select 2,0
u' at line 9
I will be greatfull for substitute or solution.
Thank's, Nir Oren.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php