Dolamite Jenkins
asked on
can i create a command insert or replace WHERE ( based on data in non unique id colum)
I wanna eliminate duplicates , for a number of reasons if can't use my unique Identifier... is there a command that I can use ....I am currently using insert or replace and I know that this command is dependent on the unique Id... but my next column generates a random number that is assigned to every entry... can i create a command insert or replace WHERE ( based on random column data) ... can I do this and how .... Im using sqlite3 and python 2.6
ASKER
Thanks Im new what is like pattern
Too confuse for me.
INSERT/REPLACE data WHERE ???
I did understand.
If you need to get data with no duplicates you can use something like
SELECT sub.columns, YOUR_RANDOM_NUMBER
FROM (SELECT DISTINCT column FROM table WHERE conditions) sub
INSERT/REPLACE data WHERE ???
I did understand.
If you need to get data with no duplicates you can use something like
SELECT sub.columns, YOUR_RANDOM_NUMBER
FROM (SELECT DISTINCT column FROM table WHERE conditions) sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
you can use like ='%pattern%'