cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
TONYMA
Level III

HOW to delete the same data in the table?

dear,

 every time i go to menu which “row” to detele  the same data ,

i  want to delete the same data in  the table automaticly, and  i don t know to how  to write JSL  

how i do to write ?

 

you are your god.
13 REPLIES 13
rwright
Level III

Re: HOW to detele the same data in the table?

Made slight mistake - using Min will return your "delete" table.
rwright
Level III

Re: HOW to detele the same data in the table?

I went ahead and redid it by putting subquery as table so you can see difference. Sometimes one way works better or is clearer than the other. Here the "t1" and "t2" are aliases.

 

SELECT t1.*

FROM Solubility t1,

( SELECT DISTINCT "LOT NO", Min("Column 1") AS "Column 1" FROM Solubility GROUP BY "LOT NO" ) AS t2

WHERE t1."Column 1" = t2."Column 1"

;

TONYMA
Level III

Re: HOW to detele the same data in the table?

 

i am sorry to tell you that it can not work

the alarm is circular reference;

 

SELECT t1.*
FROM [Solubility$] t1,
( SELECT DISTINCT "LOT NO", Min("Column 1") as "Column 1" FROM [Solubility$] GROUP BY "LOT NO" ) AS t2
WHERE t1."Column 1" = t2."Column 1"

you are your god.
rwright
Level III

Re: HOW to detele the same data in the table?

I just started from scratch and it worked on my end. Tried both MIn() and Max() and it gave what I was expecting.

 

I did notice a couple of things:

1. When I told you I added column 1, I forgot to mentioned I initialized it to sequential numeric. IE I basically replicated the row number.

2. Noticed you use the brackets around the table name, and the table name ends in "$". Those are MS take on SQL. Try eliminating those.

3. Can't remember if I told you to hit the update button in the custom sql window or not, but seems to help me before I run query.