Skip to content

Tag: sql

String formatting issue for creating the SQL query for BCP

I want to use some of the static data to the new BCP query and export the extracted data to CSV. The static data are generated as a result after running some BCP command earlier. But I have been facing string formatting issue for creating the SQL query using those variables and generate a SQL command. I simpl…

Need help understanding Postgresql query execution

I have a generated query from an ORM that selects data from a nested join on a junction table. When executing it looks like it performs a full table scan on a table with >55 million records resulting in a slow execution time. My expectation was that it would perform the filtering first then lookup by index…

ORA-01861: literal does not match format string use oracle SQL

I have data field in oracle database, i need to update my data field and use add_months function to add 3 more month as show below, my table name psm_voucher. then I try update query as below but fail Your kinds help is much appreciated. Answer As date in your table is stored as a string, you will need to