Skip to content Skip to sidebar Skip to footer
Showing posts from September, 2023

Mutually Exclusive Queries

Question How would you role an IF...ELSE that produces mutually exclusive results into a query that… Read more Mutually Exclusive Queries

Sql Migration Assistant For Mysql

I want to convert my MySQL database to SQL Server, so that I can migrate my website into Azure. I … Read more Sql Migration Assistant For Mysql

Ssis Package Fails On File.delete Of Script Task

I have an SSIS package, zip.dtsx. This package successfully runs on serverA. I copied this package … Read more Ssis Package Fails On File.delete Of Script Task

Update All Rows In A Column To New Value

Apologies, I am sure this has been asked plenty of times but I have searched around for a good exam… Read more Update All Rows In A Column To New Value

How To Solve Msg 8115, Level 16, State 2, Line 2 Arithmetic Overflow Error Converting Expression To Data Type Int.?

I have a formula like this. But the formula has an error. Please help me. select [DAY] as [DAY… Read more How To Solve Msg 8115, Level 16, State 2, Line 2 Arithmetic Overflow Error Converting Expression To Data Type Int.?

Update Other Table Based On A Table Value In Sql

I have two tables named Employee and Time. I want to assign OnTrack=y if all the TaskList of employ… Read more Update Other Table Based On A Table Value In Sql

Sql*plus Csv Export Slower Than Sql Developer

I'm trying to export a moderately complex query to a CSV file. I've been doing this manuall… Read more Sql*plus Csv Export Slower Than Sql Developer

Objective-c Appdelegate Array

I'm creating a SQLite application, with two simple views. I have two arrays in SQLAppDelegate: … Read more Objective-c Appdelegate Array

Get All Duplicate Data By Parent Or Child Id [sql Server]

I have table with Named EmailChangeRequest which has following columns: 1. ChangeRequestId -- (INT)… Read more Get All Duplicate Data By Parent Or Child Id [sql Server]

How To Create Group By On Min And Max Date

I have a database table like this emp_id start-date end_date title location 111 1-JAN-200… Read more How To Create Group By On Min And Max Date

Oracle : Year Keyword Invalid

I have dates stored in the price_date column in one of my oracle tables. I need to filter records t… Read more Oracle : Year Keyword Invalid

How To Group Values Together If They Share The Same Id Value In Sql

I'm trying to group together authors who have worked on the same title. Currently i have the fo… Read more How To Group Values Together If They Share The Same Id Value In Sql

Sql Query And Dropdownlist

I have a drop down list which has the values of column's table. and I have the following stat… Read more Sql Query And Dropdownlist

Prepared Statements And The Built-in Connection Pool In .net

I have a long-running service with several threads calling the following method hundreds of times p… Read more Prepared Statements And The Built-in Connection Pool In .net

Generally, Are String (or Varchar) Fields Used As Join Fields?

We have two tables. The first contains a name (varchar) field. The second contains a field that re… Read more Generally, Are String (or Varchar) Fields Used As Join Fields?

Select Distinct + Select Top To Merge Multiple Rows

I'm trying to select rows from a table, one row per email address, and return one firstname fro… Read more Select Distinct + Select Top To Merge Multiple Rows

Using Xml, Xslt And C# To Create An Rtf Or Pdf

EDIT: User has informed me that he will accept PDF format also I have to create a simple RTF or PDF… Read more Using Xml, Xslt And C# To Create An Rtf Or Pdf

Sql Variable In Xml Node

I have the following code: DECLARE @x TABLE (item XML (document Galeries)) DECLARE @schemaname … Read more Sql Variable In Xml Node

How To Find If A List/set Is Contained Within Another List

I have a list of product IDs and I want to find out which orders contain all those products. Orders… Read more How To Find If A List/set Is Contained Within Another List

Using Update And Replace With Wildcards

UPDATE database_posts SET post_content = REPLACE (post_content,'%submitted by%%%%%', &… Read more Using Update And Replace With Wildcards

Sql Server 2005 Reporting Services: Reports Are Compressed

I have a report that I am capable of viewing correctly in Internet Explorer (IE) with the help of R… Read more Sql Server 2005 Reporting Services: Reports Are Compressed

Asp.net Hash Password Using Md5

I've got the following code, which hashes a password as inputted by the user, and subsequently … Read more Asp.net Hash Password Using Md5

Using A .mdf Sql Server Database With Asp.net Versus Using Sql Server

I'm currently writing a website in ASP.NET MVC, and my database (which doesn't have any dat… Read more Using A .mdf Sql Server Database With Asp.net Versus Using Sql Server

Sql - Query Count For Related Table Affected By Other Join

The tables in this query are as follows: Post User Comment Tag Tagged_Post Post_Category I'm … Read more Sql - Query Count For Related Table Affected By Other Join

Proper Checking Of Nil Sqlite Text Column

I have an sqlite string column that is assigned to a string. I need to make sure it isn't nil … Read more Proper Checking Of Nil Sqlite Text Column

How To Use Db Functions In Tortoise Orm

I am trying to write a simple query but using PSQL functions CURRENT_DATE and INTERVAL, for instanc… Read more How To Use Db Functions In Tortoise Orm

Using Collation In Linq To Sql

Imagine this sql query select * from products order by name collate Persian_100_CI_AI asc Now usin… Read more Using Collation In Linq To Sql

Calculate The Last Day Of The Prior Quarter

What's the most efficient way to calculate the last day of the prior quarter? Example: given t… Read more Calculate The Last Day Of The Prior Quarter

How To Select Data Basing On Both A Period Of Date And A Period Of Time In Clickhouse

I want to filter some data by both yyyymmdd(date) and hhmmss(time), but clickhouse don't suppor… Read more How To Select Data Basing On Both A Period Of Date And A Period Of Time In Clickhouse

Retrieving A Bit Column From Sql Database In Vb Net

I have encountered a problem where in my database I have a column that is a bit either 0 or 1 speci… Read more Retrieving A Bit Column From Sql Database In Vb Net

Spring And Mixing Sql And Nosql Db

The answers to my previous post encouraged me mixing SQL and NoSQL db. What is the best practice im… Read more Spring And Mixing Sql And Nosql Db

I Want Combine My Time Slots As Per Interval (15,30,,45,60) And Do The Additon Of Columns In Sql Stored Procedure

I am getting the 'interval' wise (30 min, 15 min, 45 min) data in my stored procedure now I… Read more I Want Combine My Time Slots As Per Interval (15,30,,45,60) And Do The Additon Of Columns In Sql Stored Procedure

Sql Server Clr Stored Procedure Json Parameter

I've come across a scenario where I want to pass a large amount of data to a Stored Procedure f… Read more Sql Server Clr Stored Procedure Json Parameter

Comma's Causing A Problem Using Bulk Insert And A Format File

I'm trying to import .CSV files using BULK INSERT on SQL Server and a Format File. I have creat… Read more Comma's Causing A Problem Using Bulk Insert And A Format File

Join Record With Most Recent Record On Second Table

I have 2 tables Delivery -------- deliveryid int (PK) description long varchar DeliveryHistory --… Read more Join Record With Most Recent Record On Second Table

Sql Server: Can Concurrent Threads Update Same Row?

I have a stored proc that has this UPDATE query: UPDATE TOP(1) Batch_tbl SET locked = 1 OUTPUT inse… Read more Sql Server: Can Concurrent Threads Update Same Row?

Generate View With X And Y From Geometry Type

In sql-server-2012 I want to generate view with all points from geometry type. How can I do this? V… Read more Generate View With X And Y From Geometry Type

Update Sql Command Syntax Error

I've checked and rechecked and looked over and over at it but can't understand what's w… Read more Update Sql Command Syntax Error

How To Transpose Rows Of Data Into A Single Row With Different Columns In Sql Server

Currently I have data from #temp where I extract it from other tables. The #temp table format is as… Read more How To Transpose Rows Of Data Into A Single Row With Different Columns In Sql Server

Sqlite: How To Get A Count Of Group Counts

I have a SQLite table of user actions on a website. Each row is the same action on a web site, jus… Read more Sqlite: How To Get A Count Of Group Counts

Sql Query Works Fine In Toad , But Not When Placed In Java Code

The following sql query executes fine when ran in TOAD editor and shows results,but does not fail o… Read more Sql Query Works Fine In Toad , But Not When Placed In Java Code

How To Upload Sqlite Database File To Server From Iphone Application In Ios

In my iphone application i used sqlite3 for creating database. Now i want to take backup of a data… Read more How To Upload Sqlite Database File To Server From Iphone Application In Ios

Adding Constraints That Check A Separate (linked) Table For A Value

I have two tables: Book(BookID, Title, Author, Decision) BookShipment(BookID, ShipmentID) CREATE TA… Read more Adding Constraints That Check A Separate (linked) Table For A Value

Fast Read Of Blobs Within Sqlite Using Simplequeryforblobfiledescriptor?

I am reading blobs with size between 100kb and 1000kb from SQlite in my Android App using the follo… Read more Fast Read Of Blobs Within Sqlite Using Simplequeryforblobfiledescriptor?

Stored Procedures Vs No Stored Procedures - Security Viewpoint

For a web application database, from a security standpoint only, what are arguments counter to the … Read more Stored Procedures Vs No Stored Procedures - Security Viewpoint

Running Multiple Sql Statements In The One Operation

I'm trying to use ADO to create several tables at once, into MS Access. Is it possible to do mu… Read more Running Multiple Sql Statements In The One Operation

Gem Load Error Is: Undefined Method `type_cast_from_database' For Class `arjdbc::mssql::uuidtype'

I'm struggling for many hours now using activerecord-jdbcmssql-adapter with Rails 5.1 (or 5.2).… Read more Gem Load Error Is: Undefined Method `type_cast_from_database' For Class `arjdbc::mssql::uuidtype'