I am trying to create a number of stored procedures in SQL accessing an Oracle database. All dates in Oracle are stored as a 10 digit number which is causing some confusion. I have designed some dynamic SQL which allows us to run an OPENQUERY to pick out parameters however what I want to be able to do is use
How to compare time in mysql
I have a column of Time data type in mysql. I want to compare the time with a time string but don’t know how to compare it. e.g., I want to know that some specific time is greater than 10:30:00. How …
Generate range of numbers between two numbers
I could use some help with a query to expand a CSV I’m working with, but I don’t know the best way to handle the query. My data looks like this: ID-Begin | ID-End | Color | Dwelling —————–…
Insert a list using dapper.NET C#
I’d like to insert a list of objects in an SQL table. I know this question here but I don’t understand. Here is my class : I’d like to know how could I insert my list using Dapper, I don’t want to iterate on the list and save them one by one, I would like to insert all of them
SQL SUM Group by – based on ‘group’ from another table
I hope I am explaining this correctly. I have 2 tables, with first table (table1) +————+——+——-+——-+ | Date | Item | Block | Total | +————+——+——-+——-+ |…
MSSQL Geometry, distance from point inside shape to closest edge
I have a shape file that I have imported in to MSSQL as a table with a geometry column. The geometry column is essentially the outline of the UK coastline. What I have been asked to do is to be able to supply latitude/longitude and calculate the closest distance to the coast I have established that the proble…
There is already an object named ‘#tmptable’ in the database
I´m trying to execute stored procedure but I get an issue of an existing temporal table, but I just create one time and use into another part of code SELECT … INTO #tmpUnidadesPresupuestadas FROM …
INSERT INTO table SELECT not working with constant values in H2 DB
Following is the H2DB query What I am trying to achieve is to insert a record into userpermission for user with given email address in user table, for each permission in permission table. Following is the error The same query is working in MySQL. Answer As mentioned in the comments, Use single quotes for stin…
php add a counter in while loop and return to a new line when i reach this counter
this is my code: now this code works fine, but it echo my results on the same line since its a loop. i want my output to be 3 photos per line for example: image1 image2 image3 (jumps to line) image4 image5 image6 and not: image1 image2 image3 image4 image5 image6. To be more precise i want to add a
Hive Create table – When to use VARCHAR and STRING as column data type
I am trying to create a HIVE table. I am not sure when we use VARCHAR and when we use String. If we use VARCHAR then do we have to define length like we define in RDBMS as VARCHAR(10) Please help Answer VARCHAR was introduced in Hive 0.12.0 for more SQL-compliant behavior, such as SQL string comparison semant…