Re: [U2] Joins Vorks

2011-07-27 Thread Brian Leach
Urgh. UniSQL does support the newer join formats, though IIRC not all
combinations.

SELECT A.FULLNAME,B.ID, B.AUTHOR_ID FROM U2_BOOKS B LEFT JOIN U2_AUTHORS A
ON B.AUTHOR_ID = A.ID;

Brian

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Brutzman
Sent: 26 July 2011 17:20
To: U2 Users List
Subject: Re: [U2] Joins Vorks

Brian:

0. Thanks for writing and for the example code.
1.  I see that JOINS appear in my older copy of the Rocket manual.  Thus...

SELECT * FROM LATES,INVOICE WHERE LATES.PACKSLIP = INVOICE.ID
SQL+
PACKSLIPLATE_CODEASSIGNED_BYDATE..TIME..
ORDER..

254889  C.FC karen  14271 34120.733
2-03757-1
256004  S.T  karen  14404 40352.5808
2-03520-18
257342  M.DR karen  14570 54232.1935
2-02859-13

2.  CF is a built on J2EE.  Thus, ColdFusion with UniObjects for Java and
JDBC should be workable.
3.  Back to the salt mines...

--Bill

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Brian Leach
Sent: Tuesday, July 26, 2011 11:51 AM
To: 'U2 Users List'
Subject: Re: [U2] What - No Joins?

Bill

I don't know ColdFusion, so I don't know how you're connecting CF to
Universe or what CF is doing - but UniVerse SQL *definitely* supports joins.


And if you can't get CF to build it, if you can get it to call stored
procedures you can also lovingly hand craft your UniVerse SQL grin and
wrap it into a subroutine as in the example below:

SUBROUTINE MySub

  SQL = SELECT ...
  Ok = SQLExecDirect(@HSTMT, SQL)
RETURN

And call it using the SQL CALL statement:

set dbConn = CreateObject(ADODB.Connection) dbConn.Open conStr, userId,
pass WScript.echo Connected

Set dbCmd = CreateObject(ADODB.Command) Set dbCmd.ActiveConnection =
dbConn


' set the command text to a SQL query
dbCmd.CommandText = CALL MySub
dbCmd.CommandType = 1

' Execute the command
tab = chr(9)

Set rs = dbCmd.Execute
Do While Not rs.EOF
   Wscript.Echo rs(0)  tab  rs(1)  tab  rs(2)
   rs.MoveNext
Loop


Brian

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Brutzman
Sent: 26 July 2011 15:35
To: U2 Users List
Subject: [U2] What - No Joins?

So I am still dabbling with ColdFusion.  It is satisfying to be able to
connect Flex - CF - UniVerse and see data.

When data appears in say two tables, the traditional CF way to grab the data
is with al SQL INNER JOIN statement.

It seems like all that I can do with CF and UniVerse is something like...
SELECT * FROM LATE_LIST and then SELECT * FROM SALES_ORDERS   and then
combine the two resulting arrays in CF. 

CF will show I-Descriptors in the list of table contents when invoked via an
@SELECT in the dictionary... but, my CF program did not grab any data from
this same I-Descriptor.

In advance of my printing out Rocket's UniVerse SQL tech manual... tips and
tricks would not hurt my feelings.

--Bill
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Joins Vorks

2011-07-26 Thread Bill Brutzman
Brian:

0. Thanks for writing and for the example code.
1.  I see that JOINS appear in my older copy of the Rocket manual.  Thus...

SELECT * FROM LATES,INVOICE WHERE LATES.PACKSLIP = INVOICE.ID
SQL+
PACKSLIPLATE_CODEASSIGNED_BYDATE..TIME..ORDER..

254889  C.FC karen  14271 34120.733 2-03757-1
256004  S.T  karen  14404 40352.58082-03520-18
257342  M.DR karen  14570 54232.19352-02859-13

2.  CF is a built on J2EE.  Thus, ColdFusion with UniObjects for Java and JDBC 
should be workable.
3.  Back to the salt mines...

--Bill

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Brian Leach
Sent: Tuesday, July 26, 2011 11:51 AM
To: 'U2 Users List'
Subject: Re: [U2] What - No Joins?

Bill

I don't know ColdFusion, so I don't know how you're connecting CF to Universe 
or what CF is doing - but UniVerse SQL *definitely* supports joins.


And if you can't get CF to build it, if you can get it to call stored 
procedures you can also lovingly hand craft your UniVerse SQL grin and wrap 
it into a subroutine as in the example below:

SUBROUTINE MySub

  SQL = SELECT ...
  Ok = SQLExecDirect(@HSTMT, SQL)
RETURN

And call it using the SQL CALL statement:

set dbConn = CreateObject(ADODB.Connection) dbConn.Open conStr, userId, pass 
WScript.echo Connected

Set dbCmd = CreateObject(ADODB.Command) Set dbCmd.ActiveConnection = dbConn


' set the command text to a SQL query
dbCmd.CommandText = CALL MySub
dbCmd.CommandType = 1

' Execute the command
tab = chr(9)

Set rs = dbCmd.Execute
Do While Not rs.EOF
   Wscript.Echo rs(0)  tab  rs(1)  tab  rs(2)
   rs.MoveNext
Loop


Brian

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Brutzman
Sent: 26 July 2011 15:35
To: U2 Users List
Subject: [U2] What - No Joins?

So I am still dabbling with ColdFusion.  It is satisfying to be able to connect 
Flex - CF - UniVerse and see data.

When data appears in say two tables, the traditional CF way to grab the data is 
with al SQL INNER JOIN statement.

It seems like all that I can do with CF and UniVerse is something like...
SELECT * FROM LATE_LIST and then SELECT * FROM SALES_ORDERS   and then
combine the two resulting arrays in CF. 

CF will show I-Descriptors in the list of table contents when invoked via an 
@SELECT in the dictionary... but, my CF program did not grab any data from this 
same I-Descriptor.

In advance of my printing out Rocket's UniVerse SQL tech manual... tips and 
tricks would not hurt my feelings.

--Bill
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users