Re: Witango-Talk: SQL question: combining results

2010-01-22 Thread Ben Johansen
you can use UNION on a sql select statement that is a searching select and not a variable select select @menu,@... is a variable select and in the directDBMS you are actually creating a Stored Procedure on the fly the union is designed to be used when you have to select statements the return

Re: Witango-Talk: SQL question: combining results

2010-01-22 Thread Brian Humes
Here's the output: // BEGIN OUTPUT Command was executed successfully Warnings: ---> W (1): Nokia E71x (AT&T (Cingular)) W (2): Blackberry 9630 Tour (US Cellular) <--- [Executed: 1/22/10 11:00:23 AM EST] [Execution: 498ms] 1 record(s) selected [Fetch MetaData: 0ms] [Fetch Dat

Re: Witango-Talk: SQL question: combining results

2010-01-22 Thread Roland Dumas
what was the error you got after the UNION? On Jan 22, 2010, at 9:27 AM, Brian Humes wrote: > Hi all, > > I have the following in a Direct DBMS action: > > //begin SQL > declare @phone_id int > declare @manu varchar(50) > declare @phone_name varchar(50) > declare @carrier_id int > declare @carri

Witango-Talk: SQL question: combining results

2010-01-22 Thread Brian Humes
Hi all, I have the following in a Direct DBMS action: //begin SQL declare @phone_id int declare @manu varchar(50) declare @phone_name varchar(50) declare @carrier_id int declare @carrier varchar(50) declare @rownum_phones int declare phonelist cursor for SELECT DISTINCT b1.phone_id,b2.manufac