[U2] TU.SQL.CONNECT

2013-08-22 Thread Israel, John R.
Does anyone have any experience using the TU.SQL.CONNECT command to connect to a Microsoft Sequel database? I am not finding any on-line docs and the OLD book I am using is not very helpful. JRI ___ U2-Users mailing list U2-Users@listserver.u2ug.org

Re: [U2] TU.SQL.CONNECT

2013-08-22 Thread Bob Witney
This night give you a starting point: Use CONNECT to connect to a local or remote SQL server, such| |as another UniVerse system or an ORACLE, SYBASE, or INFORMIX| |system. | |

Re: [U2] TU.SQL.CONNECT

2013-08-22 Thread George Gallen
Not exactly what you are asking for...but we use tsql (freetds - open source odbc for linux) Setup: we have a "/tmp" opened to F.TMP * *** * Subroutine Execute Query, Put results into YDATA Dynamic Array (ROW,COLUMN) *

Re: [U2] TU.SQL.CONNECT

2013-08-22 Thread George Gallen
Leftout FIRSTFIELD as an IN: variable - setup as below: 1200: CRMFIELDS="field1, field2, field3" CRMFILE="table1name inner join table2name on (field1 = field2)" CRMWHERE="where field1 = 'value' ORDER BY field2" SQLCMD="select ":CRMFIELDS:" from ":CRMFILE:" ":CRMWHERE FIRSTFIELD="fi

Re: [U2] TU.SQL.CONNECT

2013-08-22 Thread Manu Fernandes
HI, TU.SQL.* are part of SB+/SBClient Utilities (Termulator Utilities) to interface SQL server via ODBC connection defined on the client. SBClient are the gateway between ODBC server request. On client, you define ODBC connection; like for excel or other. On server you have TU.SQL.* subrtoutin

[U2] SQL Update Multiple rows

2013-08-22 Thread Riverman
Here is the SQL example I am trying to follow UPDATE dbo.Product SET Availability=CASE When ProductId='1' Then '5' When ProductId='2' Then '5' When ProductId='6' Then '10' Else Availabili

Re: [U2] SQL Update Multiple rows

2013-08-22 Thread George Gallen
UPDATE TESTFILE SET TRAN.NUMBER="" WHERE CONTROL.NUMBER.NFMT='9001' OR CONTROL.NUMBER.NFMT='66551' OR CONTROL.NUMBER.NFMT='1205' Should do what you want George Basically, only clear out TRAN.NUMBER if CONTROL.NUMBER.NFMT is one of three values. -Original Message- From: u2-users-b

Re: [U2] SQL Update Multiple rows

2013-08-22 Thread Riverman
Dunces cap firmly attached to head. For future reference can multiple rows be updated to different values for the same field? -- View this message in context: http://u2-universe-unidata.1073795.n5.nabble.com/SQL-Update-Multiple-rows-tp41681p41683.html Sent from the U2 - Users mailing list arch

Re: [U2] SQL Update Multiple rows

2013-08-22 Thread Riverman
I had to change "" to NULL. The field has a format of 8R so I assume SQL is interpreting this as a numeric field, not a string. UPDATE TESTFILE SET TRAN.NUMBER=NULL WHERE CONTROL.NUMBER.NFMT='9001' OR CONTROL.NUMBER.NFMT='66551' OR CONTROL.NUMBER.NFMT='1205' -- View this message in context:

Re: [U2] SQL Update Multiple rows

2013-08-22 Thread Riverman
As Kurt pointed out I should have used single quotes ('') instead of NULL. NULL updated the field with char(128). -- View this message in context: http://u2-universe-unidata.1073795.n5.nabble.com/SQL-Update-Multiple-rows-tp41681p41685.html Sent from the U2 - Users mailing list archive at Nabble

Re: [U2] [UV] Globally catalogs - source code

2013-08-22 Thread Charles Stevenson
Hello LeRoy, Haven't seen you on u2-list for a while. Are you still in South Africa? I'm just up the road a piece (well, 3000 km, not necessarily paved) from you in Dar es Salaam as of last month. Chuck Stevenson On 8/21/2013 5:43 AM, LeRoy Dreyfuss wrote: Many are in APP.PROGS in the UV a