13 Discussion / Question Topics

Remove Filter
Member Avatar for
Member Avatar for joshmac

I am trying to do a check to see if a student meets the prerequisite before they can register for a course section. CourseSecID = 27 (ID of the course section the student wants to register for.) What I am doing is querying the student's acad cred records to see …

Member Avatar for joshmac
0
230
Member Avatar for de Source

Hi.. i want to get all columns from tbl_class where course_id of tbl_course is equal to course_id of tbl_class more over course_id of tbl_course should be thw one who has semester = 5 brife structure of tables are: tbl_class >class_id >course_id >class_room tbl_course >course_id >semester i have design this kind …

Member Avatar for rch1231
0
204
Member Avatar for ZER09

I came up with this query now when i tried to create a view it failed to create SELECT aDate FROM ( SELECT @maxDate - INTERVAL (a.a+(10*b.a)+(100*c.a)+(1000*d.a)) DAY aDate FROM (SELECT 0 AS a UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 …

Member Avatar for ZER09
0
331
Member Avatar for Dani

I'm trying to select rows from a table that meet a bunch of criteria, but one of the criteria is that a row doesn't already exist with two matching columns both being true at the same time. For example, suppose table t1 has columns: a, b, c and d Here's …

Member Avatar for BitBlt
0
291
Member Avatar for OsaMasw

Hello buddies , I have no Idea what is subquery, every time I tried to link two tables in one sql query I failed here is the scenario I want: in this pic I have posts with "**user_id**" only I need to show the username which stored on another tables …

Member Avatar for simplypixie
0
935
Member Avatar for diafol

SELECT t.* FROM (SELECT * FROM jobs WHERE `status` IN (0,1,2,3) ORDER BY `status` DESC, job_datetime LIMIT 11, 20) AS t That's a cut down sample of my sql. It was more complicated, but I've pared it down to this just to see why I was getting some strange numbers …

Member Avatar for pritaeas
0
180
Member Avatar for Szabi Zsoldos

Hi everyone, Trying to do a subquery to select the minimum price from table1, table what holds 15 million rows. I think that my approach is not the most suitable way of doing this. I want to select after oen_norm because oen_norm may have 1-10 rows per entry, but I …

Member Avatar for Szabi Zsoldos
0
146
Member Avatar for |-|x

I have a query in which I need to display some group function figures SUM COUNT etc from a joined table. I also need to select the latest version (by datetime) of a matching record from a separate table, which I can do using an ordered subquery in the join. …

Member Avatar for |-|x
0
209
Member Avatar for Biiim

Hi thought i'd try here see if anyone can help solve this quicker. First off we have a email database. The main table is the email data, all unique rows per email address with a unique id. eg. emailid,email 1,email@example.com 2,email@example.co.uk Next we have another table which logs the data …

Member Avatar for smantscheff
0
285
Member Avatar for mavrick4sky

SELECT * , 3956 *2 * ASIN( SQRT( POWER( SIN( ( 122.4058 - ABS( dest.lat ) ) * PI( ) /180 /2 ) , 2 ) + COS( 122.4058 * PI( ) /180 ) * COS( ABS( dest.lat ) * PI( ) /180 ) * POWER( SIN( ( 37.7907 - …

Member Avatar for fobos
0
173
Member Avatar for solomon_13000

I created a stored procedure as below: [CODE] DELIMITER$$ CREATE PROCEDURE updateCorporateDetails(IN companyName VARCHAR(30), IN rocNo VARCHAR(20), IN address VARCHAR(30), IN postalCode INT, IN state VARCHAR(20), IN country VARCHAR(20), IN contactNo VARCHAR(20), IN email VARCHAR(20), IN fax VARCHAR(20), IN lastUpdate DATETIME, OUT total INT) BEGIN DECLARE var1 INT; SET @var1 …

Member Avatar for solomon_13000
0
848
Member Avatar for MargateSteve

I have a query which generates a soccer standings table and although it works fine there I am trying to implement a couple of variations on it but everything I have tried has failed. I have searched and asked many times and for both problems and it seems as though …

Member Avatar for urtrivedi
1
300
Member Avatar for Lapixx

Hi, Although I'm not really a novice when talking about web development, I'm not really used to writing MySQL queries that are a bit more advanced than the absolute basic SELECT/INSERT/UPDATE/DELETE queries. Anyway, currently I started working on a project that shows relevant items to the user: A 'you might …

Member Avatar for smantscheff
0
189

The End.