Can I perform a minus operation between two result sets, like oracle's MINUS operator?

Hi!

For example:

Two result sets: A and B.
I want a new set : A-B

Thank you!
0
From
12/14/2001 8:50:56 AM
sybase.ase.general 8655 articles. 0 followers. Follow

2 Replies
889 Views

Similar Articles

[PageSpeed] 52

AFAIK there are two ways to do this in ASE:

(1) Load A into a temporary table and delete from it via a join with B.

(2) Select A.STUFF into DIFFERENCE
      from A
      where not exists (select B.key1
                                 from B
                                 where B.key1 = A.key1
                                     and B.key2 = A.key2
                                     ....)


The second technique may be slow owing to the "not exists".


"From East" <none@none> wrote in message
news:73ej1ugikfa96fnq0n4dm3t89crg2hut5j@4ax.com...
> Hi!
>
> For example:
>
> Two result sets: A and B.
> I want a new set : A-B
>
> Thank you!


0
Carl
12/14/2001 11:56:34 AM
Try this one:

create table A (pk int)
go
create table B (pk int)
go
insert A values (1)
go
insert A values (2)
go
insert A values (3)
go
insert B values (1)
go
select A.pk
from A, B
where A.pk *= B.pk
group by A.pk, B.pk
having B.pk = Null
go

0
Arkady
12/21/2001 2:58:57 PM
Reply:

Similar Artilces:

Can I have two ISP's operating?
I am trying out NetZero now because my current ISP has been pooping out too much. I joined NetZero on a trial basis and dialed up one of the access numbers and got on. I loaded SeaMonkey and noticed that I was on the old ISP's phone number! I didn't notice when it switched..... Can I have both phone numbers set up and choose which to use, or am I limited to one or 'tother...? DoctorBill DoctorBill wrote: > I am trying out NetZero Good luck!!!! Thats all I can say about NetZero > Can I have both phone numbers set up and choose which to use, or ...

Set Operations:MINUS
Are any SET operations other than UNION supported bu ASIQ? I see documentation on the UNION operator but not a word about either INTERSECT or MINUS. Chuck Branson chuckbra@exabyte.com All, Must I assume that no answer to my question means there is no way to do the MINUS or INTERSET operations in ASIQ? Chuck Correct. <Chuck> wrote in message news:96842B7BAB1CF52F005414C8852569F4.005E5F65852569F3@webforums... > All, > Must I assume that no answer to my question means there is no way to do the > MINUS or INTERSET operations in ASIQ? > Chuck ...

To perform the 'Select' operation the DataFile property of the data source 'AccessDataSource4' must be set to a valid Microsoft Access database.
Hi, When i try to do a FormView.Changemode.(FormViewMode.Edit) i get this error "To perform the 'Select' operation the DataFile property of the data source 'AccessDataSource4' must be set to a valid Microsoft Access database." The database is an Access database and it shows the data in readonly mode. Let me know any other info you want thxs Is the DataFile property set declaratively on the data source?<asp:AccessDataSource ... DataFile="~/App_Data/Data.mdb" ... />Or is it set in code in some event?void Page_Load() {   AccessDataSource1.DataFile = "~/App_Data/...

Can't perform Create, Update or Delete operations on 'Table(outbox)' because it has no primary key.
 Hi,I'm a beginner in asp.net and I have some problem inserting data into sql server 2005 with linq. my code is :          Dim Result As New SMS.SendResult        If Result.status = 0 Then            Label1.Text = "Your Message Sent Successfuly"                        Dim db As New IGSSDataContext     &...

Problem with filtering DataTable's DefaultView (Cannot perform '=' operation on System.String and System.Int32.)
Hi everyone,I have following line:dt.DefaultView.RowFilter = "Jmb=" + userRegNo; // dt is of type DataTable"Jmb" column and "userRegNo" variable hold values consisting of numerals, although they are not numbers because they can start with zero. Values are like: 1504978101935, 0401975360029, 1902652, 01270974...These last values cause error to be thorwn:Cannot perform '=' operation on System.String and System.Int32.Obviously at some point, for reason unknown to me, framework decides to treat these values as integers. Or, it treats column as holding intege...

Error: Cannot perform 'Like' operation on System.Datetime
Hi all, I received an error: Cannot perform 'Like' operation on System.DateTime. However, I tested the same code in SQL Server 2000 and it's okay. my rowfilter is : dvJobInfo.RowFilter = strDMFiltering & " AND ( " & strLocFiltering & ")" & " AND ( " & strDueDateFiltering & ")" & " AND ( " & strPostedDateFiltering & ")" I need to have a rowfilter, and the function of this filter is : -------------------------------------------------------------------------- Sub FilterByDueDat...

Cannot perform 'Like' operation on System.Int32 and System.String
hi all, I am using datatable.select to filter my datatable. I am using like operator in the expression and it is working correctly if the value is string when i search on integer i am getting this error "  Cannot perform 'Like' operation on System.Int32 and System.String.". Can any one please help me regarding this?   here is my code Dim expression As String expression = ddlsearch.SelectedValue.ToString & " LIKE '%" & Convert.ToString(searchtext) & "%'"Dim foundRows() As DataRow foundRows = initial.Select(expression.T...

A3, the ';' operator, and hyper-operators
I haven't seen it mentioned here yet, so for those who haven't noticed A3 is now out: http://www.perl.com/pub/a/2001/10/02/apocalypse3.html There's a lot to like here. I'll just cover 2 points for now though... Larry's discussion of RFC 082, while not quite complete, does a great job of learning from APL/J's heritage while incorporating the greater flexibility of Perl. > Anyway, in essence, I'm rejecting the underlying premise of this RFC, > that we'll have strong enough typing to intuit the right behavior without > confusing people. Ne...

(missing operator) in query expression 'LIKE 'pop''
having trouble getting my search results to go to the next page of results. First page shows up fine but when i click next i get a .... Microsoft JET Database Engine error '80040e14' Syntax error (missing operator) in query expression 'LIKE 'pop''. 'pop should have quotes right on the connection line <!--search init--> dim strSearch strSearch = Request.QueryString("search") strSearch = Replace(strSearch, "'", "''") <!--connection string--> strSQL = "SELECT * " _ & "FROM products " _ ...

like oracle's rownum ,,,,ASIQ's number(*)
We use ASE 12.0 but unfamiliar with T-SQL. Let me know like oracle's "rownum" , ASIQ's "number(*)" function and mssql's "top" keyword . Hi Herald, If you want to set the n�mber of results(rows) returned by the ASE sql server, you can use the command "SET ROWCOUNT <any value you will need>" Ex: set rowcount 10 select * from Tb_X go HTH Regards. "Herald" <yheey@lycos.co.kr> wrote in message news:4COBVZvtCHA.198@forums.sybase.com... > We use ASE 12.0 but unfamiliar with T-SQL. > >...

superreview requested: [Bug 407538] newURI("http://foo.com:80").port is 80, should be -1 (can set a URI's port to it's default value by setting .spec) : [Attachment 292260] patch
Gavin Sharp <gavin.sharp@gmail.com> has asked Christian :Biesinger <cbiesinger@gmx.at> for superreview: Bug 407538: newURI("http://foo.com:80").port is 80, should be -1 (can set a URI's port to it's default value by setting .spec) https://bugzilla.mozilla.org/show_bug.cgi?id=407538 Attachment 292260: patch https://bugzilla.mozilla.org/attachment.cgi?id=292260&action=edit ------- Additional Comments from Gavin Sharp <gavin.sharp@gmail.com> I'm not sure about the XXX comment in the test - seems like we should probably fix that, too, but I&...

Re: A3, the ';' operator, and hyper-operators
> I haven't seen it mentioned here yet, so for those who haven't > noticed A3 is now out: > http://www.perl.com/pub/a/2001/10/02/apocalypse3.html And Exegesis 3 will follow within 24 hours. > But... earlier messages from > Larry suggested that the hyper-operator symbol would actually be an adverb > (back then ':' was being proposed, IIRC), which sounded even more > exciting... Is this still the plan, with more to come in later apocolypses > about other adverbs (a table adverb?, conjunctions?), or has the whole &g...

VMware's Greene: 'The Operating System Shouldn't Matter'
"The operating system shouldn't matter to the customer anymore. What matters to them is the service they're getting and how stable [the OS] is and how well it runs. Once you put in that virtual infrastructure, the only thing that the operating system is there for is to give the application a sort of platform to run on. [The situation] has gotten turned on its ear where the application is in charge of picking the best operating system. Historically in this industry �Microsoft has �had a complete lock on our industry, where they control the APIs to the applications, they c...

[perl #57706] Unary minus on 'numeric' inputs like '-1'
--4FDBBA91F72B9CC623B88B23BC3A70B7 Content-Type: text/plain Content-Transfer-Encoding: 8bit Hi, > % perl -E 'say -"-1"' > +1 > % perl -E 'say - -1' > 1 > % perl -E 'say 0 - "-1"' > 1 > > [...] > > I would expect to see > > % perl -E 'say - -1' > 1 > % perl -E 'say -"-1"' > 1 > % perl -E 'say -"-foo"' > +foo > > To me, that matches the documentation better than the current behaviour. The documentation is a bit inconsistent...

Web resources about - Can I perform a minus operation between two result sets, like oracle's MINUS operator? - sybase.ase.general

Resources last updated: 12/15/2015 6:01:32 PM