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

Mysql: #1292 - Truncated Incorrect Double Value: '...'

I'm trying to create a MySQL query to update PAN no of all members. Using the query below I kee… Read more Mysql: #1292 - Truncated Incorrect Double Value: '...'

How To Change Clients' Site Dynamically?

So, going from the discussion here where I was soundly rebuked and for good reason. I want to give … Read more How To Change Clients' Site Dynamically?

A Complex Sql Query String Inner Join Common Denominator

This is a very very important sql query after which my whole website is based.. and its not working… Read more A Complex Sql Query String Inner Join Common Denominator

Sql Query Throwing Error

SELECT pmc.[month] AS 'Month', pmc.pd_name_of_pro… Read more Sql Query Throwing Error

Handle Special Characters In Pl/sql Procedures.?

I'm using oracle 10g plsql procedures for inserting and listing, but if we have any special cha… Read more Handle Special Characters In Pl/sql Procedures.?

Ms Access - Execute A Saved Query By Name In Vba

How do I execute a saved query in MS Access 2007 in VBA? I do not want to copy and paste the SQL in… Read more Ms Access - Execute A Saved Query By Name In Vba

Append Fmdb Sqlite Results To Swift Array

I'm trying to append results from a FMDB SQLite query to a Swift array. The error I'm gett… Read more Append Fmdb Sqlite Results To Swift Array

How Do You Auto-commit An Sql Server Transaction In Jpa?

Why do I need to use a transaction to persist an Entity? Is there something I can add to my persist… Read more How Do You Auto-commit An Sql Server Transaction In Jpa?

How To Use Strftime() Function In Sqlite For Extracting Year Where Datetime Is In A Different Format Than What Would Normally Work

While learning SQL in my course, I have used the function YEAR(Start_Time) AS Year Start_Time is a … Read more How To Use Strftime() Function In Sqlite For Extracting Year Where Datetime Is In A Different Format Than What Would Normally Work

How To Merge Two Mysql Databases Of Same Structure

Here's my situation. I've got my current database (let's call it current_db) that is up… Read more How To Merge Two Mysql Databases Of Same Structure

Converting Hex To Float Sql

I am trying to find a way of converting HEX to a float in SQL Server. An example value is 0x42c8000… Read more Converting Hex To Float Sql

Android/sqlite - Bit Operation On Where Clause

I'd like to know if it's possible to do in Android something like this: public Cursor getFl… Read more Android/sqlite - Bit Operation On Where Clause

Join Three Tables With One Of Them Not Having A Primary Key

I have three tables that i would like to join up together. Domain table -domainid - Primary key Do… Read more Join Three Tables With One Of Them Not Having A Primary Key

What Percent Of The Time Does A User Login, Immediately Followed By Sending A Message?

I have never queried for such a thing before and not sure how possible it is. Let's say I have … Read more What Percent Of The Time Does A User Login, Immediately Followed By Sending A Message?

Query A Database Based On Result Of Query From Another Database

I am using SSIS in VS 2013. I need to get a list of IDs from 1 database, and with that list of IDs,… Read more Query A Database Based On Result Of Query From Another Database

Postgres - Having Group By Min Of Date Time And Status

I would like to retrieve car_id from the below table which have min (svc_date) with status=A . … Read more Postgres - Having Group By Min Of Date Time And Status

Updating A Table To Create Unique Ids In From A Substring In Postgresql

I have table1 with following columns and example of data: id, condition1, condition2, condition3, t… Read more Updating A Table To Create Unique Ids In From A Substring In Postgresql

Laravel Eloquent - Is There A Way To Add Hint Before Select?

With Laravel 5.7, PostgreSQL and pg_hint_plan, I want to write a SQL query like /*+ IndexScan(users… Read more Laravel Eloquent - Is There A Way To Add Hint Before Select?

Avoid Sql Injections On Query With Tablename

Possible Duplicate: Sanitize table/column name in Dynamic SQL in .NET? (Prevent SQL injection attac… Read more Avoid Sql Injections On Query With Tablename

Find Id Of Parent Where All Children Exactly Match

The Scenario Let's suppose we have a set of database tables that represent four key concepts: … Read more Find Id Of Parent Where All Children Exactly Match

Call To Undefined Function Sqlsrv_connect()

i wish to fire select query for login on user table . i am using php and ms msql server 2005 as bac… Read more Call To Undefined Function Sqlsrv_connect()

Importing New Database Table

Where I'm at there is a main system that runs on a big AIX mainframe. To facility reporting an… Read more Importing New Database Table

Doctrine Many-to-many Relations And Onflush Event

Little example about Books and Authors: DB structure: Entities (they were generated form database … Read more Doctrine Many-to-many Relations And Onflush Event

Multiple Inserted Row Ids

I am inserting multiple rows at once like: INSERT INTO person VALUES ('joe', 50), ('jon… Read more Multiple Inserted Row Ids

Sql To Delete The Duplicates In A Table

I have a table transaction which has duplicates. i want to keep the record that had minimum id and … Read more Sql To Delete The Duplicates In A Table

How Do I Grab Only The Latest Invoice Number

I have Invoice Numbers that are stored as nvarchar(25). Their Format is ‘####AA’ Where #### is the … Read more How Do I Grab Only The Latest Invoice Number

Mysql: How To Make Subquery And Count All Rows Where Id Is The Same In Two Tables

How to make a query which return values for specific ID's not for all. SELECT content.id, c… Read more Mysql: How To Make Subquery And Count All Rows Where Id Is The Same In Two Tables

Wordpress Order Posts By 2 Custom Fields At Once

I want to order the posts by 2 custom fields in the same call. How is this possible? This next code… Read more Wordpress Order Posts By 2 Custom Fields At Once

How Can I Print Details (table Name, Column Name, Data Type) Of Each Column/table In My Db2 Database?

In my previous question Mark suggested a good answer for displaying count on every table in my data… Read more How Can I Print Details (table Name, Column Name, Data Type) Of Each Column/table In My Db2 Database?

Even Easiest Join Gets Complicated In Nhibernate

Ok, So I have the following database schema And the relation is a one-to-many relation (one Album … Read more Even Easiest Join Gets Complicated In Nhibernate

Insert Character Into Sql String

I have an nvarchar column I need to insert a hyphen at fixed points within the string. The hyphen n… Read more Insert Character Into Sql String

Group By Column Alias

I want to group an sql statement by a column alias. In essense, I want the below to function as it … Read more Group By Column Alias

Sql Server 2005 - Optimizing Stored Procedures

I have 2 stored procedures (sp1 and sp2) in SQL Server 2005 with the same sql script (no diff at al… Read more Sql Server 2005 - Optimizing Stored Procedures

Changing The Datatype Of Table Column

A very simple MSSQL command is giving error. create table emp (empid char(6)); insert into emp val… Read more Changing The Datatype Of Table Column

Wildcards In Ssis Collection {not Include} Name Xlsx

I have a process built in SSIS that loops through Excel files and Import data only from those that … Read more Wildcards In Ssis Collection {not Include} Name Xlsx

Convert Mssql Query To Mysql Query

I have the following mssql query that I found on the net that is supposed to help me with a complex… Read more Convert Mssql Query To Mysql Query

Split String In Columns By Delimiter Using Sql Server

I need to split my one column value in column using delimiter, below is the table structure. create… Read more Split String In Columns By Delimiter Using Sql Server

Database Handling With 2 Processes

I have a an application that has 2 parts. A service which creates content. An application that use… Read more Database Handling With 2 Processes

Unix Timestamp Or Is0-8601 Date String In Sqlite

SQLite doesn't support DATE/DATETIME data type. Therefore datetime can be presented in database… Read more Unix Timestamp Or Is0-8601 Date String In Sqlite

How Do You Run A Single Query Through Mysql From The Command Line?

I'm looking to be able to run a single query on a remote server in a scripted task. For example… Read more How Do You Run A Single Query Through Mysql From The Command Line?

Is It Possible To Get The List Of Rows Grouped Together By A Column Name In Mysql?

In my database, I have a table called 'results' with four columns (name,device,passed,faile… Read more Is It Possible To Get The List Of Rows Grouped Together By A Column Name In Mysql?

Sql Server Compact Limitations -- Design Decision Or Work In Progress?

I'm using Sql Server Compact for automated integration tests of our web application, which runs… Read more Sql Server Compact Limitations -- Design Decision Or Work In Progress?

How To Include Below Subquery Into Store Proc

with cte as ( select trd_nbr,[date],sum(case when txn_typ='A' then abs(amount) else… Read more How To Include Below Subquery Into Store Proc

How To Send A Query Result In Csv Format?

I am working on ETL and I have this below sql code in my SQL Task in SSIS package. This is how i ha… Read more How To Send A Query Result In Csv Format?

Oracle 10g: Parsing 2 Columns Merging Duplicates

I'm having a table with 3 columns: DATE_A, DATE_B and ISSUE DATE_A and DATE_B can be filled in … Read more Oracle 10g: Parsing 2 Columns Merging Duplicates

Room Api - How To Retrieve Recently Inserted Generated Id Of The Entity?

I need to retrieve the generated id value of an entity which is recently inserted as the code sampl… Read more Room Api - How To Retrieve Recently Inserted Generated Id Of The Entity?

Skipped One Error Checking In If Else Statement

I have this error checking in my program using the if else statment. I got 2 things to check. They … Read more Skipped One Error Checking In If Else Statement

Update Column Value After Insert And Period Of Time

I have a table including status that default value is 0 when it inserted in the first time, I want … Read more Update Column Value After Insert And Period Of Time

Select Query's Order Not Working In Prepared Statement

I am created a prepared select query and it appears the query is not picking up the DESC or I have … Read more Select Query's Order Not Working In Prepared Statement

Set Multiple Row Delimiters In Flat File Connection

We can set a row delimiter for a Flat File Connection in SSIS.but the question is how to set multi… Read more Set Multiple Row Delimiters In Flat File Connection

Accessing Last Inserted Row In Mysql

On my db-server i am inserting data in a table having a auto increment field say 'id'. Now … Read more Accessing Last Inserted Row In Mysql

How To Connect Web Form With Sql Server Running On An Other Computer In Asp.net

i am creating an asp.net web application. i am using SQL server 2014 for database. i need configure… Read more How To Connect Web Form With Sql Server Running On An Other Computer In Asp.net

How Do I Update A Sqlite Row Entry By String?

I am a noob to android and I am trying to update a sqlite row entry by string as opposed to row num… Read more How Do I Update A Sqlite Row Entry By String?

Getting Data For Every Single Day In Sql

I currently have the following SQL statement MySQL Query: SELECT c.day, COUNT(*) FROM c… Read more Getting Data For Every Single Day In Sql

How To Make A Menu In Sqlplus Or Pl/sql?

I am making this program that will have a menu that gets the user's input and performs a certai… Read more How To Make A Menu In Sqlplus Or Pl/sql?

Analyzing Database Schema Takes Hours

Using a new SQL2005 database project in VS2010. I did import objects and settings, and built the pr… Read more Analyzing Database Schema Takes Hours

Performance Questions For Sql Cache Dependency

I'm working on a project where we are thinking of using SQLCacheDependency with SQL Server 2005… Read more Performance Questions For Sql Cache Dependency

Get Last N Records After Join In Sql?

I am creating a website for myself where I can create notes on any subjects. For creating a note I … Read more Get Last N Records After Join In Sql?

On Gridview Updated Get All Modified Cells In A Textbox + Non Edited?

I'm trying to add in a textbox all values modified in cells + the others who aren't edited:… Read more On Gridview Updated Get All Modified Cells In A Textbox + Non Edited?

How To Shrink Sqlite Database?

Once done storing all of my data into sqlite, it reach 14 MB already. That's why I'm afraid… Read more How To Shrink Sqlite Database?