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

Conditional Where Statement In T-sql

I've got a table that returns the history of a value, as well as the current one, each with a d… Read more Conditional Where Statement In T-sql

Linq Select Records X Minutes Apart

I have a simple table that keeps track of the entry date. I would like to select records that are X… Read more Linq Select Records X Minutes Apart

Sqlite Query To Group Columns

I want to write a query to group my two columns based on third column and show result in a row as … Read more Sqlite Query To Group Columns

Microsoft Access Cannot Add Records Join Key Of Table Not In Recordset

I know this is a repost, I have done my research on everything possible and I couldn't find any… Read more Microsoft Access Cannot Add Records Join Key Of Table Not In Recordset

Error When Trying To Insert Values In Postgres Query Inside Bash Script

I'm executing the query as follows: ssh user@XX.XX.1XX.XX 'PGPASSWORD=myPassword psql -U ps… Read more Error When Trying To Insert Values In Postgres Query Inside Bash Script

Sql Server: Advanced Report Of Multiple Rows Into One

I have code that puts together data from many tables regarding a users response to all questions of… Read more Sql Server: Advanced Report Of Multiple Rows Into One

How Do I Find Out What Tables Have Data In A File In Sql Server?

I want to drop a now supposedly redundant file in SQL Server (2005), but when I try to drop it I am… Read more How Do I Find Out What Tables Have Data In A File In Sql Server?

Insert A Empty String On Sql Server With Bulk Insert

Example table contains the fields Id (the Identity of the table, an integer); Name (a simple attrib… Read more Insert A Empty String On Sql Server With Bulk Insert

Room Booking Sql Query

I have a problem in writing the sql to get the available rooms from the tables. my table structures… Read more Room Booking Sql Query

Accounting And Database Design, Storing Debit And Credit Amount

QUESTION: In the case below should I have stored all my amount as positives decimal amounts then f… Read more Accounting And Database Design, Storing Debit And Credit Amount

Having A Lot Of Sql Query Conditions

I am updating remote MySQL database by comparing row by row from local MSSQL one. Idea was to do up… Read more Having A Lot Of Sql Query Conditions

Postgres Query To Get All The Children Ids

I'm an SQL noob and wrote only very basic queries so far. I have a table that looks like this … Read more Postgres Query To Get All The Children Ids

Sql Group By Using Strings In New Columns

I have a database of race results. Each race event has multiple classes. events table: event_id |… Read more Sql Group By Using Strings In New Columns

I Dont' Understand With “not” In Full Text Search

I don't understand why I'm getting these results with my full-text search query in SQL Serv… Read more I Dont' Understand With “not” In Full Text Search

Sqlite Query Not Matching String

I have a list of about 350 music files that I store in an sqlite table. If new files get added they… Read more Sqlite Query Not Matching String

Which Mysql Join Query Is More Efficient?

Given the following table structure: CREATE TABLE user ( uid INT(11) auto_increment, name VAR… Read more Which Mysql Join Query Is More Efficient?

How To Convert Xml Output From Stored Procedure To C# Object In Asp Net Core

SET ANSI_NULLS ON; GO SET QUOTED_IDENTIFIER ON; GO ALTER PROC [dbo].[getStateWiseCompanyDetails] AS… Read more How To Convert Xml Output From Stored Procedure To C# Object In Asp Net Core

Display Zero By Using Count(*) If No Result Returned For A Particular Case

I have a query like this that returns number of rows for each case in city . select case editi… Read more Display Zero By Using Count(*) If No Result Returned For A Particular Case

Sql Linked Server Query With Parameters

I need to select value from SQL Linked Server & get it to loacal variable This is what I've… Read more Sql Linked Server Query With Parameters

Why Update Statement Works With Initwithformat And Not With Stringwithformat?

I was having an issue with my UPDATE statement as I was telling here: Update issue with sqliteManag… Read more Why Update Statement Works With Initwithformat And Not With Stringwithformat?

Complex Sql Query, Checking Column Values In Multiple Tables

I have a pretty huge SQL query to check for notifications, and I have several different types of no… Read more Complex Sql Query, Checking Column Values In Multiple Tables

Arithmetic Division For Two Table In Sql (postgresql)

I am trying to do a very simple division in SQL (PostgreSQL). I want to get the count of all the re… Read more Arithmetic Division For Two Table In Sql (postgresql)

Table Name Placeholder - Tsql

Is there a way to do something like this? People is the name of the table. declare @placeholder var… Read more Table Name Placeholder - Tsql

Is It Possible To Use The Same Table Twice In A Select Query?

Hi I have the following query, and I'm wondering what it means: SELECT c1.id as sender, c2.id a… Read more Is It Possible To Use The Same Table Twice In A Select Query?

Keeping A History Of Data Changes In Database

Every change of data in some row in database should save the previous row data in some kind of hist… Read more Keeping A History Of Data Changes In Database

How To Use Collect With Varchar2 Oracle 10g

I'm trying to get the COLLECT function to work for me. I'm using 10g and therefore found t… Read more How To Use Collect With Varchar2 Oracle 10g

Unable To Connect To Mssql Database Via Django-mssql

I'm trying to connect to my Microsoft SQL Server database from django but I am getting the foll… Read more Unable To Connect To Mssql Database Via Django-mssql

How To Add Last Second Into Date?

is it possible to add such a thing as last second of the day into date? Let's say that I have d… Read more How To Add Last Second Into Date?

4000 Character Limit In Like Statement

I have been getting an error in a previously working stored procedure called by an SSRS report and … Read more 4000 Character Limit In Like Statement

Why Does My Query Involving Division And Count Always Result In 1?

I've simplified this down a bit since the literal data is pretty massive but a very simple exam… Read more Why Does My Query Involving Division And Count Always Result In 1?

Mysql Window Function To Calculate Averages Or Maximums Every 5 Minutes

I have a table data with columns clock (unixtime) and value, where records appear every 50-70 secon… Read more Mysql Window Function To Calculate Averages Or Maximums Every 5 Minutes

How To Read Config File Key In Sql Server 2008 Stored Procedure

I have a settings.config file in my c://config settings.config has this contents: d://mydata Now … Read more How To Read Config File Key In Sql Server 2008 Stored Procedure

Ssms Not Releasing System Memory

I just started at a new office as a Data Analyst. The job entails upgrading client systems from our… Read more Ssms Not Releasing System Memory

Coalesce And Concat In The Same Statement, Postgres

I am trying to concat an individual's first and last name together but coalesce a team name whe… Read more Coalesce And Concat In The Same Statement, Postgres

Ms Access Alternative To Sql Function Row_number()

I work with MS Access 07 and need a little help. I have two tables TbProjectTeam and TbProjectList.… Read more Ms Access Alternative To Sql Function Row_number()

Deleting An Item From Listview (using Sqlite) Results In Only Removing It From Listview.can't Delete It From Database

When I try to delete an item in list view ,it removes it from list view but when I add a new item o… Read more Deleting An Item From Listview (using Sqlite) Results In Only Removing It From Listview.can't Delete It From Database

How To Subtract Values From Two Different Sqlite3 Tables In Python

Assuming i have a main table containing a list of items and quantities. And a second table having a… Read more How To Subtract Values From Two Different Sqlite3 Tables In Python

Sql Split Function That Handles String With Delimeter Appearing Between Text Qualifiers?

There are several SQL split functions, from loop driven, to using xml commands, and even using a nu… Read more Sql Split Function That Handles String With Delimeter Appearing Between Text Qualifiers?

App.config File In C# For Sql Server 2005 In Vs 2008

Possible Duplicate: app.config file in C# for MS SQL Server 2005 in VS 2008 I have C# .net proje… Read more App.config File In C# For Sql Server 2005 In Vs 2008

Using Prepared Statements With Sqlite3 And Php

I'm trying to add data to a database using SQLite3 in PHP. I got it working without prepared st… Read more Using Prepared Statements With Sqlite3 And Php

Sql Sum Group By Two Tables

I'm having difficulty writing an SQL query that will correctly group account_no together and su… Read more Sql Sum Group By Two Tables

How To Generate A List Of Number In Sql As It Was A List Of Comprehension?

In my case, using sql anywhere (sybase). Something similar to haskell. [1..100]. I don't know h… Read more How To Generate A List Of Number In Sql As It Was A List Of Comprehension?

Sql Convert Nvarchar(255) To Datetime Problem

I'm using SQL server 2008. I have 2 Tables: Table 1 and Table 2. Table 1 has 1 column called: O… Read more Sql Convert Nvarchar(255) To Datetime Problem

Syntax Error Android Sqlite: Near "group"

Here is the exception shown by logcat window 06-08 11:25:55.532 8480-8480/example.com.shareit E/SQL… Read more Syntax Error Android Sqlite: Near "group"

When To Use Stored Procedures Instead Of Using Any Orm With Programming Logic?

Hi all I wanted to know when I should prefer writing stored procedures over writing programming log… Read more When To Use Stored Procedures Instead Of Using Any Orm With Programming Logic?

#error Showing Up In Multiple Left Join Statement Access Query When Value Should Be Null

I'm trying to return an ID's last 4 years of data, if existing. The table (call it A_TABLE)… Read more #error Showing Up In Multiple Left Join Statement Access Query When Value Should Be Null

Sql: How To Unite Fields Into A Vector In A Select Query?

What I mean is: ... select... where (a=1 and b=1) or (a=1 and b=2) or (a=2 and b=3) or(a=3 and b =2… Read more Sql: How To Unite Fields Into A Vector In A Select Query?

Regular Expression Special Character Elimination

I have a string like '11dd$%e11!@h' Can I have a regular expression to remove only special … Read more Regular Expression Special Character Elimination

How To Insert Datetime.now Values Into Datetime Type Field In Sql Database

my code is : SqlConnection cn = new SqlConnection('Data Source=.;Initial Catalog=haftehbaza… Read more How To Insert Datetime.now Values Into Datetime Type Field In Sql Database

Why Python+sqlite3 Is Extremely Slow?

I tried to process the same request to the same database using 'Python 2.7.4 + sqlite3' and… Read more Why Python+sqlite3 Is Extremely Slow?

Block Insert From Array To Sqlite In Python

So I read this article that says inserting in blocks beats one row at a time: Which is faster: mult… Read more Block Insert From Array To Sqlite In Python

Sql Stored Procedure(s) - Execution From Multiple Databases

My company works with data from a number of customers and has neglected to document what the tables… Read more Sql Stored Procedure(s) - Execution From Multiple Databases

Dynamic Database Backup For Certain Tables

I need to backup just some of the tables in my main database. The other tables are reference and ar… Read more Dynamic Database Backup For Certain Tables

Sql Split Field By Comma Delimiter

Given the following. Products_Joined.METATAG_Keywords AS Keyword, This returns this for 'keywo… Read more Sql Split Field By Comma Delimiter

How To Query Date Field In Mdx With And Without Aggregate Group

I have a seemingly simple requirement to create a query of price data that will return four sets of… Read more How To Query Date Field In Mdx With And Without Aggregate Group