Does anyone have resources/advice on how to connect to a third party WebDAV with PL/SQL? I will be placing a file onto their server and retrieving a log file. Is it as simple as using UTL_HTTP & ‘…
Tag: sql
How to select sub string in oracle?
I have a scenario where my data is something like below: Chapter 18 Unit 10 Sect 16 Case 1 : I want to select Chapter 18 from the above string. Case 2 : I want to select Unit 10 from the above …
Get minimum unused value in MySQL column
I have a table with integer ID column. I would like to get the minimum unused value for this column. The query should find the first hole in table IDs and get the minimum value inside it. I’ll try to explain it with some examples. Example 1: no-holes table In this case, I have a table without holes and …
Calculate Median with SQL (DB2)
I’m having issues calculating the median for my result set and could use some help. I need to provide the median, max, min, avg, and standard deviation. There are 222 rows which can be more or less and I’m not sure what I have so far is an accurate way of calculating the median. Here is my query. …
PostgreSQL:How get last rows from a select query
See the below example, And if I Execute Will Get So,How Can I Get the Last 2 Rows in select * from data? What I’m expecting is…. Answer You have two options according to your need i.e, Or LIMIT and OFFSET if you want the 4th and 5th row just offset the first 3 so that the 4th row becomes
SQL Server range indexing ideas
I need help understanding how to create proper indexing on a table for fast range selects. I have a table with the following columns: Column — Type frameidx — int u — int v — int x — float(53) y — float(53) z — float(53) None of these columns is unique. There are to b…
NVarChar to C# Data Types
The database stores nvarchar, I retrieve the information and I’d like to jam it into C# data types without any declarative conversion code. Can you implicitly convert nvarchar to C# data types? (e.g. nvarchar to int) Answer Nvarchar is a string, if you want to turn it in to a int you will have to go thr…
Can’t insert Cyrillic symbols into MySQL with JDBC
I have a web app which uses com.mysql.jdbc.Driver to connect to MySQL database. Here are jdbcMySQL.properties: I create database like this: And the problem is: if I make then I have in my table BUT, if I make: I have in my table: Answer MySQL is a bit crazy w.r.t. encodings, try: Furthermore there is one more…
Text was truncated or one or more characters had no match in the target code page including the primary key in an unpivot
I’m trying to import a flat file into an oledb target sql server database. here’s the field that’s giving me trouble: here are the properties of that flat file connection, specifically the field: here’s the error message: [Source – 18942979103_txt [424]] Error: Data conversion fa…
How do you write a parameterized where-in raw sql query in Entity Framework
How do you write a parameterized where-in raw sql query in Entity Framework? I’ve tried the following: But as expected, it throws an error on DateParam because it’s expecting a single value. Answer This isn’t a problem specific to entity-framework, you can solve it by generating your own par…