complex SQL query 
Author Message
 complex SQL query

Would someone kindly help me in creating the appropiate query in the
following case:

Node_Table        InputList_Table        InputParameter_Table

NodeID    1 - oo  NodeID                    Input_ID
...               Input_ID         oo - 1     ....
...                ...                        ....

How do I retrieve all InputParameters by a given NodeID?

Robert



Mon, 14 Jul 2003 21:32:19 GMT  
 complex SQL query


Quote:
> Would someone kindly help me in creating the appropiate query in the
> following case:

> Node_Table        InputList_Table        InputParameter_Table

> NodeID    1 - oo  NodeID                    Input_ID
> ...               Input_ID         oo - 1     ....
> ...                ...                        ....

> How do I retrieve all InputParameters by a given NodeID?

> Robert

select  * from Node_Table, InputList_Table, InputParameter_Table where
NodeID = ID


Tue, 15 Jul 2003 00:17:35 GMT  
 complex SQL query
SELECT *   (Note, don't use *, type in the fields...)
FROM    InputList_Table IL
    JOIN InputParameter_Table IP ON IL.Input_Id = IP.Input_ID
WHERE IL.NodeId = ...

Elio


Quote:
> Would someone kindly help me in creating the appropiate query in the
> following case:

> Node_Table        InputList_Table        InputParameter_Table

> NodeID    1 - oo  NodeID                    Input_ID
> ...               Input_ID         oo - 1     ....
> ...                ...                        ....

> How do I retrieve all InputParameters by a given NodeID?

> Robert



Tue, 15 Jul 2003 07:11:21 GMT  
 complex SQL query
On Thu, 25 Jan 2001 09:17:35 -0700, "Gary Slaughenhaupt"

Quote:

>select  * from Node_Table, InputList_Table, InputParameter_Table where
>NodeID = ID

On Thu, 25 Jan 2001 18:11:21 -0500, "Elio M. Gonzalez"

Quote:

>SELECT *   (Note, don't use *, type in the fields...)
>FROM    InputList_Table IL
>    JOIN InputParameter_Table IP ON IL.Input_Id = IP.Input_ID
>WHERE IL.NodeId = ...
>Elio

Both look quite different.

Elio, what did you exactly mean with "(Note, don't use *, type in the
fields...)" and are IL and IP new created objects?

As I guess I have to dig into SQL and unfortunatly bought the wrong
book to begin with (Joe Celko) I had a look at amazon and found:

o - SQL: The Complete Reference (Osborne's
                      Complete Reference Series)  

o - MySQL (OTHER NEW RIDERS)  , Paul DuBois  

o - Database Magic with Ken North  

o - Sams Teach Yourself SQL in 24 Hours, Ryan Stephens, Ronald Plew,
Ronald R. Plew  

o - Advanced ANSI Sql Data Modeling and
                      Structure Processing (Artech House Computer
                      Science Library)  
(awfully expensive!)

I intuitivily intend to Osborn because of having experience with
Schildts C/C++ guide which was easy and understandable to read.

Would somebody recommend another book as a tutorial to get into SQL?

Thanks to Elio and Gary for their quick answers

Robert



Tue, 15 Jul 2003 19:55:17 GMT  
 complex SQL query
Gary,
I just tried your suggestion in the following code:

Set Dtbs = OpenDatabase(DB)
Set snap = Dtbs.CreateSnapshot("SELECT * FROM Nodes, InputList,
InputParameters WHERE NodeID = " & nd)

Which gave the error "1 parameters expected, 0 recieved", although
debugging showed that nd was a valid integer of "34".

Could you kindly give me a hint?

Robert



Tue, 15 Jul 2003 20:40:25 GMT  
 complex SQL query
Hallo ..

what about trying like this
...
 Set snap = Dtbs.CreateSnapshot("SELECT * FROM Nodes, InputList,
 InputParameters WHERE NodeID = " & Cstr(nd))


Quote:
> Gary,
> I just tried your suggestion in the following code:

> Set Dtbs = OpenDatabase(DB)
> Set snap = Dtbs.CreateSnapshot("SELECT * FROM Nodes, InputList,
> InputParameters WHERE NodeID = " & nd)

> Which gave the error "1 parameters expected, 0 recieved", although
> debugging showed that nd was a valid integer of "34".

> Could you kindly give me a hint?

> Robert



Tue, 22 Jul 2003 04:06:51 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Complex SQL Query...HELP!

2. complex SQL query

3. Complex SQL query

4. Need help with complex SQL query

5. Complex SQL Query: HELP!

6. Complex SQL Query

7. SQL's with complex queries

8. VB 4.0, ANSI SQL '89, complex queries?

9. how can I build 2 queries in 1 query(VB SQL query)

10. Query too complex

11. Query too complex

12. ADO : Query too complex (or something similar!)

 

 
Powered by phpBB® Forum Software