I have a function that executes SQL queries and returns a generic DataSet of the query results. This function has been working for years in many applications, but today with a specific query I am getting “Error executing [select top (1) RecordId, SourceCID, SourceID, CaseID, DisposeRequestedDate, Dispos…
db2: how to remove the decimal from number column?
A very simple query which work the result is I want to remove the ,00000000000 to obtain I have tried cast and round but without success. I’m on Db2 This nice ltrim works fine for all type of cars but using with avg return the string with the 00000 the result is.. 🙁 Only the , is changed. Answer casting…
Way to do “Any” on an aggregation in SQL Server
I have three fields that are always tied together (is there a proper term for this?), such as: table [other fields] country_name (United States) country_iso2 (US) country_iso3 (USA) In other words, …
ALTER TABLE SQL Oracle – 12c
we are confused with below answers.so our answer is 3, 5 Which three actions can you perform by using the ALTER TABLE command? 1- Lock a set of rows in a table. 2- Drop pseudocolumns from a table. 3- …
how to count dot number in a string in oracle
I have string like this 125.67.888.66.123. I want to count number of dot operations. For example: 123.45 => 2 3446.67.88 => 3 23.45.567.88 => 4 I write this query SELECT REGEXP_COUNT (‘3….
Fetch a set of words(char and non char seperated by space) from a sentence appearing prior to a particular words in Oracle Sql
I want to split a sentence and fetch a subset of words seperated by space , prior to a specific word in Oracle SqL. I tried regexp substring, instring but couldn’t arrive at solution. Source …
Saleforce retrieving fields from two different objects – (SOQL) Simple Salesforce Python
I am using simpleSalesforce library for python to query SalesForce. I am looking at two different object in SalesForce: Account and Backend (parent-child). The Id in account matches the records of Backend through acc_id I am trying to do this: But I get the response showing: Malformed request – didnR…
How to call C functions from SQL in Tarantool?
How can I call a C-function from SQL in Tarantool? Documentation says: C functions are imported from .so files But where shall I specify the reference to my .so file? It would be great to see an …
If all result equals, return true
I have a simple select that returns a single column: result: {1,1,2} I want to check if all result are 1 then return true and if one column have a 2 return false. Tried something like these: But obviously it returns true if a value is 1 and false if it is 2, instead of just one result. For example:
How to create ASC/DESC indexes using sqlalchemy?
I have the following table declaration from gino import Gino db = Gino() class DatasetUpdateModel(db.Model): __tablename__ = “dataset_updates” id = db.Column(db.Integer, …