You are not logged in.
Announcement
Unanswered posts
|
Pages: 1

Hi
I want to delete row in a database from csv where columnA + or - 0.015.
Easy if the number is exactly the same (tmap, output, delete in database).
But, how and where I do this range (value in csv: everything row database that, for a specified field: value from csv + or - 0.015 = delete theses data...)?
Thank
MartinF
Offline

Hi MartinF
You can use tXXXDBRow to execute sql statement.
tFileinputDelimited--main->tXXXDBRow
"delete from TableName where FieldName <"+(row1.columnA+0.015)+" and FieldName >"+(row1.columnA-0.015)
Regards,
Pedro
Offline

pedro wrote:
Hi MartinF
You can use tXXXDBRow to execute sql statement.
tFileinputDelimited--main->tXXXDBRowCode:
"delete from TableName where FieldName <"+(row1.columnA+0.015)+" and FieldName >"+(row1.columnA-0.015)Regards,
Pedro
Hi,
I think the condition should be 'or'.
like - > "delete from TableName where FieldName <"+(row1.columnA+0.015)+" or FieldName >"+(row1.columnA-0.015)"
please correct if I am wrong..
Offline

hi,
yes that's correct. thanks for the correction.
Offline

Hi
The query is
"delete from nbfsc.groomers_data where
Longitude < "+(row1.Longitude+0.015)+" and Longitude > "+(row1.Longitude-0.015)+" and
Latitude < "+(row1.Latitude+0.015)+" and Latitude > +(row1.Latitude-0.015)"
MartinF
Offline

Hi
The query is
"delete from nbfsc.groomers_data where
Longitude < "+(row1.Longitude+0.015)+" and Longitude > "+(row1.Longitude-0.015)+" and
Latitude < "+(row1.Latitude+0.015)+" and Latitude > +(row1.Latitude-0.015)"
MartinF
Offline
Pages: 1