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

How To Group By Multiple Columns In Sql Server

I understand how GROUP BY works and I also understand why my query does not bring the results I am … Read more How To Group By Multiple Columns In Sql Server

Android - Content Values Over Writing Existing Rows

I'm trying to insert values using ContentValues, I've inserted 5 values to 5 columns After … Read more Android - Content Values Over Writing Existing Rows

Sql Server 2008 - Add To String In Particular Position Within Name Column

I have been asked to do a job which is beyond my SQL skills a little and having done some research … Read more Sql Server 2008 - Add To String In Particular Position Within Name Column

How To Obtain Nhibernate Generated Sql In Code At Runtime?

I know you can view the NHibernate generated SQL by hooking it up to log4net or piping it out to th… Read more How To Obtain Nhibernate Generated Sql In Code At Runtime?

Rand() Query And Performance

I'm trying to prepare a query for performance. I'm hoping to remove the RAND() from the que… Read more Rand() Query And Performance

How Can I Reset Identity Column Of My Table In Sql Server?

How can I reset my IDENTITY column in my already populated table? I tried something like this, but … Read more How Can I Reset Identity Column Of My Table In Sql Server?

Connect Ef To Sql Server Management Studio

I'm using EF code-first and I want it to create the new database in SQL Server Management Studi… Read more Connect Ef To Sql Server Management Studio

Inserting Data Into Multiple Tables Through An Sql View

Is there any way to insert data into multiple tables through a view in mysql? Solution 1: The MySQ… Read more Inserting Data Into Multiple Tables Through An Sql View

How Can I Join My Data To A Calendar To Get A Record For Each Day From Start To End In Sql Server

I have the sample data See the fiddle. I want to generate a calendar from start(column 3) to last d… Read more How Can I Join My Data To A Calendar To Get A Record For Each Day From Start To End In Sql Server

Get Either Of The Entry In Duplicate Records

This question is in reference to Get specific entry in case of duplicate entry Now in this scena… Read more Get Either Of The Entry In Duplicate Records

Recursive Cte While Parent Id Not In A List

I have the following Nested Set That results in this tree I have a list of produts SELECT Id, Nam… Read more Recursive Cte While Parent Id Not In A List

How To Assign The Counter Based On A Condition

Source Table DDL :- CREATE TABLE temp ( REG_ID NUMBER(5) , Pkg_DES VARCHAR2(15… Read more How To Assign The Counter Based On A Condition

I Want To Insert Data Into A Sql Server Databse Using C#

I want to insert data into a SQL Server database using C#. There is no error in my code. But after… Read more I Want To Insert Data Into A Sql Server Databse Using C#

Stored Procedure Not Returning Filtered Results When Using Null To Ignore Parameter If Empty

I have a query in which the user can choose which columns they wish to search on (each column has a… Read more Stored Procedure Not Returning Filtered Results When Using Null To Ignore Parameter If Empty

Trying To Query Database Using Preparedstatement, Resultset Is Coming Back Closed When It Ought Not To

I am trying to query my database using a prepared statement. Initially, I had this: public ResultSe… Read more Trying To Query Database Using Preparedstatement, Resultset Is Coming Back Closed When It Ought Not To

How To Use An Update Statement In Sqldataadapter

I am trying to run an update statement after i built my sqldataadapter. I have column called INIT_… Read more How To Use An Update Statement In Sqldataadapter

Joining Tables , Data Between Dates

I am practicing with northwind database: I am quite new to sql. Question I am trying to solve is : … Read more Joining Tables , Data Between Dates

Best Way To Check For Current Date In Where Clause Of Sql Query

I'm trying to find out the most efficient (best performance) way to check date field for curren… Read more Best Way To Check For Current Date In Where Clause Of Sql Query

Searching Natural Language Sentence Structure

What's the best way to store and search a database of natural language sentence structure tree… Read more Searching Natural Language Sentence Structure

Union Syntax In Cakephp

Anyone knows a good way to make UNION query in CakePHP? I would like to avoid using $this->query… Read more Union Syntax In Cakephp

Doing An Idempotent Insert With Postrgres

I'd like something like INSERT VALUES(1,2,3) INTO sometable ON CONFLICT DO NOTHING IF EXACTLY S… Read more Doing An Idempotent Insert With Postrgres

How To Throw Exception From Sql Server 2005 Function?

When I try to use RaiseError, I get the following compilation issue Msg 443, Level 16, State 14, … Read more How To Throw Exception From Sql Server 2005 Function?

Sql Doing Math Find Smallest Value And Then Insert Into Column

i have 2 table this is my first table +-----------+---------+------+------+---------+---------+---… Read more Sql Doing Math Find Smallest Value And Then Insert Into Column

How To Update Only One Row In A Table?

How to I can update only one record in a table? Table: name name1 name2 ---------------… Read more How To Update Only One Row In A Table?

Sql: Normalization Of Database While Retaining Constraints

Suppose I have the following tables: ____________________ ____________________ … Read more Sql: Normalization Of Database While Retaining Constraints

What Should Be Indexed To Improve Performance?

Given this query, which column or columns should be indexed to optimize query performance? SELECT *… Read more What Should Be Indexed To Improve Performance?

Ssas - How To Configure Format Number For Calculated Measures?

I created a calculated measure in order to allow user to display the operating margin about sales. … Read more Ssas - How To Configure Format Number For Calculated Measures?

Sql: Select Values By Column Name

I'd like to fetch values form a table, but the reference is the column name of the destination … Read more Sql: Select Values By Column Name

Cannot Connect Access To Sql Server Linked Tables - Error Message Loggingin

I have a client for which I am setting up a new SQL Server Express and (on a different computer) co… Read more Cannot Connect Access To Sql Server Linked Tables - Error Message Loggingin

Use Just Inserted Id In Postgres

I want to create insert script for table Postgres database. The table should look like this. id … Read more Use Just Inserted Id In Postgres

Access '13 - Does Not Recognize Field Name Error, Crosstab To Report Issue

The Background Each month I run a crosstab query which is then 'spruced up' with an Access … Read more Access '13 - Does Not Recognize Field Name Error, Crosstab To Report Issue

How Do I Restore A Single Table From A Sql Server 2005 Backup?

I've got a backup made using the regular SQL Server 2005 backup command. Is there a way to res… Read more How Do I Restore A Single Table From A Sql Server 2005 Backup?

How To Call Stored Function Of In And Out Parameter In Oracle Database Using Java

public String getObjectDetails(String buffer) { dbcon con = new dbcon(); Re… Read more How To Call Stored Function Of In And Out Parameter In Oracle Database Using Java

Dynamic Pivot Table

I have the following table with the details as shown below in the example. Example: Table: test cre… Read more Dynamic Pivot Table

Getting Multiple Different Values From A Joined Table

I can't figure out a good way of querying this without multiple sub-queries. I can't restru… Read more Getting Multiple Different Values From A Joined Table

How To Connect Php With Sqlserver

I'm trying to connect the SQLServer 2008 with the PHP 5.4.6. But the server returns the followi… Read more How To Connect Php With Sqlserver

How Do I Get A List Of Numbers In Mysql?

I've got a database of movies, and I'd like a list of years where I don't have a movie … Read more How Do I Get A List Of Numbers In Mysql?

How Do I Can Show Forecast Years Data From Row Into Column?

Suppose if Item-A's Sale in 2013 is 100 Quantity and I'm expecting 10% of sales growth in n… Read more How Do I Can Show Forecast Years Data From Row Into Column?

How To Insert Jpeg Into A Sql Server 2000 Database Field Of Image Type Using Transact Sql

I'm trying to figure out how to insert a .JPG file into a SQL Server 2000 database field of typ… Read more How To Insert Jpeg Into A Sql Server 2000 Database Field Of Image Type Using Transact Sql

Retreiving Data From Sql Server 2008 To Asp.net Mvc 4 Either By Using Stored Procedure Or Entity Framework

I am new to ASP.ENT MVC and I am working on project where I have data in SQL Server 2008. Now I nee… Read more Retreiving Data From Sql Server 2008 To Asp.net Mvc 4 Either By Using Stored Procedure Or Entity Framework

Getting Total Values Of A Certain Column From Gridview

Him I am using a ASP.NET/VB.NET with SQL-Server-2012. I have a a GridView column with 3 fields and … Read more Getting Total Values Of A Certain Column From Gridview

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

Race Condition Between Select And Insert For Multiple Columns

Note: This is a question which is a follow up of this solution. You need to read the link to get co… Read more Race Condition Between Select And Insert For Multiple Columns

Append Sql Table Name With Today's Date

I understand that I can change a sql table using the follow sp: EXEC sp_rename 'customers',… Read more Append Sql Table Name With Today's Date

Loop Insert Problem, Reload Page Load?

Im trying to achieve an insert statment and return using my function in the pageload. Not sure how … Read more Loop Insert Problem, Reload Page Load?

Format Query Results In Sql*plus

when I want to see one table with its records in oracle, the table is disorganized,I mean is not li… Read more Format Query Results In Sql*plus

Get Puppet Build To Fail When The Contained Sql Script Fails Execution

I am attempting to run a vagrant build which installs Oracle XE in an Ubuntu Virtualbox VM and then… Read more Get Puppet Build To Fail When The Contained Sql Script Fails Execution

Insert Into Sql Vba

I am trying to select records that are in the first table but not in the second table and insert th… Read more Insert Into Sql Vba

Sql Update Command With Unique Constraint Asp.net

If you please help me out I am trying to update a table with a unique constraint which is on all 4 … Read more Sql Update Command With Unique Constraint Asp.net