Skip to content Skip to sidebar Skip to footer
Showing posts from May, 2024

Sql Insert Into A Table With Computed Columns

I have a table with 4 columns, say COLA,COLB,COLC,COLD. COLC and COLD are computed columns. Suppose… Read more Sql Insert Into A Table With Computed Columns

Mysql Finding Min/max Values For Double

The relevant MySQL documentation states that for doubles: Permissible values are -1.79769313486231… Read more Mysql Finding Min/max Values For Double

Efficiently Convert Rows To Columns In Sql Server

I'm looking for an efficient way to convert rows to columns in SQL server, I heard that PIVOT i… Read more Efficiently Convert Rows To Columns In Sql Server

Postgresql Error: Column "manager" Does Not Exist

Can anyone please tell why is this error popping? Is there something wrong in my code? Which Manage… Read more Postgresql Error: Column "manager" Does Not Exist

Combine Three Sql Queries

I have the following three SQL queries. I would like to combine them into one is possible, either u… Read more Combine Three Sql Queries

Database Design - Sales From Multiple Sources

We currently have a SQL database with a table that holds online sales for our company, which sells … Read more Database Design - Sales From Multiple Sources

How To Link Parent And Child Ids?

I have the following table PNLParentId id operator 12 13 * 12 … Read more How To Link Parent And Child Ids?

Ruby Nubie On Osx - Can't Get Beyond Rake Db:migrate - Get [bug] Bus Error

Original problem: I'm (a newbie to ruby) using RVM to manage my ruby on Mac OSX 10.6 Here's… Read more Ruby Nubie On Osx - Can't Get Beyond Rake Db:migrate - Get [bug] Bus Error

Find Max Value And Show Corresponding Value From Different Field In Ms Access

So I found this similar question and answer at (Find max value and show corresponding value from di… Read more Find Max Value And Show Corresponding Value From Different Field In Ms Access

Sql Count Of 90 Day Gaps Between Records

Say I have a Payment table. I need to know the number of times the gap between payments is greater… Read more Sql Count Of 90 Day Gaps Between Records

Issues When User Input Data In Sql Command

I have a batch files which when i run calls a SQL file. This SQL file prompts user to input data w… Read more Issues When User Input Data In Sql Command

How To Create A Pivottable In Transact/sql?

My source data table is MemID Condition_ID Condtion_Result ---------------------------------- 1 … Read more How To Create A Pivottable In Transact/sql?

Traverse Through All Foreign Keys In Database And Generate A Path

I wrote a query to find out primary key - foreign key relationship between all the tables in a data… Read more Traverse Through All Foreign Keys In Database And Generate A Path

Fetch A Record On Maximum Date Of Every Month

I want to fetch customers balances at the maximum date of every month, in every year in database. T… Read more Fetch A Record On Maximum Date Of Every Month

Sqlite : Insert Text With Single Quote Got From A Sql Request

I have already check all the forums about this issue and I found a solution for my first insert, I … Read more Sqlite : Insert Text With Single Quote Got From A Sql Request

Displaying Row Count From Sql Server To Program

I am working on a program on C# VS 2015. In my program, there is a big text display box that genera… Read more Displaying Row Count From Sql Server To Program

Combine Multiple Rows Into One "memo" Nvarchar(max)

2 tables 1 with clients other with accno information table 1: file, accno Solution 1: SELECT DISTI… Read more Combine Multiple Rows Into One "memo" Nvarchar(max)

Sql Select Distinct Column And Latest Date

I'm looking to select just the latest records of a table based on date, but only one one Distin… Read more Sql Select Distinct Column And Latest Date

Angular/ionic And Async Sqlite - Ensuring Data Factory Initialised Before Return

I'm writing a PhoneGap/Cordova app with Ionic, and using SQLite (with ngCordova) for persistent… Read more Angular/ionic And Async Sqlite - Ensuring Data Factory Initialised Before Return

Delete Empty Xml Nodes Using T-sql For Xml Path

I'm using FOR XML PATH to construct XML out of a table in SQL Server 2008R2. The XML has to be … Read more Delete Empty Xml Nodes Using T-sql For Xml Path

How To Insert Blob Datatype Values In Oracle 11g Database Through Sql*plus

I have created a table with Blob datatype but I do not know how to insert values into the table or … Read more How To Insert Blob Datatype Values In Oracle 11g Database Through Sql*plus

Better Way To Check If The Data Already Exists And Insert

Hi all I have the following SQL Server 2008 script that will check if a row already exists in Table… Read more Better Way To Check If The Data Already Exists And Insert

Find Second Highest Record From Oracle Db

I have the following data: id date mia 1 1/1/2017 3 1 1/2/2017 1 1 1/3/2017 … Read more Find Second Highest Record From Oracle Db

Creating A Json Result From Sql Server Database

I have an SQL server with the following layout Table ( id int title varchar(40), … Read more Creating A Json Result From Sql Server Database

How To Remove Diagramming Support Objects From Sql Server?

I need to remove diagramming support tables, stored procs, views, etc from SQL Servrer using TSQL s… Read more How To Remove Diagramming Support Objects From Sql Server?

How To Remove Multiple Cascade Paths In Entity Framework

I am trying to define relationships between tables, but getting the following error: Introducing F… Read more How To Remove Multiple Cascade Paths In Entity Framework

How To Use Loop In Stored Procedure To Copy Data From One Table To Another In Sql Server

I am working on SQL Server. I have a table Trans_Details with these columns: empId transDateTime… Read more How To Use Loop In Stored Procedure To Copy Data From One Table To Another In Sql Server

How To Set Time Zone For Asp.net Mvc 5 Application?

I have quite large web application, which is developed with ASP.NET MVC 5 and MsSql 2008. On my PC,… Read more How To Set Time Zone For Asp.net Mvc 5 Application?

How To Decode Base64 Unicode String Using T-sql

Can't decode turkish characters in base64 string. Base64 string = 'xJ/DvGnFn8Onw7bDlsOHxLDE… Read more How To Decode Base64 Unicode String Using T-sql

Pandas To Sql Server

I got following code. The problem is I could read data use panda.read_sql, but I could not use the … Read more Pandas To Sql Server

Ssis: Configuration Of Dynamic Connection String Integrated Security Mode

Setup In the local environments, we're using SQL Authentication with Username and Password to c… Read more Ssis: Configuration Of Dynamic Connection String Integrated Security Mode

How To Eliminate Duplicate Calculation In Sql?

I have a SQL that can be simplified to: SELECT * FROM table WHERE LOCATE( column, :keyword ) &… Read more How To Eliminate Duplicate Calculation In Sql?

How Can I Use Single Quote Inside Sql Command?

Possible Duplicate: How do I escape a single quote in sqlserver? I got a script below that drop e… Read more How Can I Use Single Quote Inside Sql Command?

Find Last Updated By And Last Update Date

I was told to come up with a solution for the following scenario. I need to return the 'Last U… Read more Find Last Updated By And Last Update Date

Sql: Inserting Row For Missing Month(s)

I have a table as follow: |----------|----------| | DT | FLAG | |----------|----------| |… Read more Sql: Inserting Row For Missing Month(s)

How Can I Use Aggregate Function Sum On An Alias Column?

Invoice ID, PO Number and dueDate are shown in duplicates. TotalPrice is an alias (It should be Uni… Read more How Can I Use Aggregate Function Sum On An Alias Column?

Clr Table-valued Function With Array Argument

I have a SQL CLR function like this one: public partial class UserDefinedFunctions { [Microsoft… Read more Clr Table-valued Function With Array Argument

Employee Manager Report - Sql Server

I have the below table empid empname managerID 1 A NULL 2 B … Read more Employee Manager Report - Sql Server

Android & Sqlite: Will A Blank Row Cause Any Database Issues?

I have a number of EditTexts on a UI where the user inputs data. The data is saved in a SQLite dat… Read more Android & Sqlite: Will A Blank Row Cause Any Database Issues?

Sqlalchemy: Self Referencing Default Value As Query

Let's say I have the following structure (using Flask-SqlAlchemy): class User(db.Model): id… Read more Sqlalchemy: Self Referencing Default Value As Query

Linq To Sql Insert Not Working On Deployed Server(iis)

title speaks for itself, db.ExecuteCommand('INSERT INTO tCSVFile(fileName, fileContent, mimetyp… Read more Linq To Sql Insert Not Working On Deployed Server(iis)

Trigger And Transactions On Temporary Tables

can we create trigger and transactions on temporary tables? when user will insert data then , if it… Read more Trigger And Transactions On Temporary Tables

Multiple Column Sql Joins In A Table

Background: Hi there, first time posting a question so please excuse any wrongdoings... I have been… Read more Multiple Column Sql Joins In A Table