update source and sql