My Filter
   28 tags on

My Filter

  • All Sites
  • Arqade

1 answer

SQL server indexing includes questions

I've been troubling shooting some bad SQL calls in my works applications. I've been reading up on indexes, tweaking and benchmarking things. Here's some of the rules I've gathered (let me know if this ...

1 answer

get different result using select * and select askid

That sounds wired,I find this occasionally when I try to optimize limit. askid is PK I try SELECT askid FROM ask limit 1000000,1; return 1001747 Then I try SELECT * FROM ask limit ...

1 answers | 2 mins ago by fairjm on Stack Overflow
1 answer

Select when group by contains more than one row with the same value?

I am trying to write a query that returns one row from table A whenever a column in joined table B contains multiple distinct values for a single matching row in table A. (A -> B is a 1 -> many ...

2 answers

How do I select entries through an intermediary table relationship?

This probably has a really obvious answer, but I am drawing a blank somehow. I have three tables, let's say they are called: People Addresses AddressDetails I am using Entity Framework (so ...

0 answers

msg 175, The isnull function requires 2 arguments(s)

After looking at similar issues I'm no wiser. What I have is a value returning that has two sets of numbers then a name i.e. (xxxx;xxxx;name). I'm trying to just return the name. The original code ...

0 answers

How to insert data in sql database and retrieve it and put into datagridview?

What I want to do is, after you insert data in sql database, datagridview will retrieve the added data from database and add it in its row. I'm new in codes in my dialog Add Form . I name it ...

2 answers

SQL Server 2012 - Can't use AlwaysOn HA. What other options do I have?

I have 2 SQL Server 2012 machines. One is production and the other will be for backup. I was looking at using the AoHA but it requires SQL Server 2012 Enterprise for server OS an AD domain I ...

2 answers | 32 mins ago by Valien on Database Administrators
1 answer

I am trying to display store which has been open at least two hours before current time


3 answers

Three column SQL PIVOT

How do I do a sql pivot of data that looks like this, USING the SQL PIVOT command ? id | field | value --------------------------------------- 1 | year | 2011 ...

3 answers | 52 mins ago by djangofan on Stack Overflow
1 answer

Cannot Delete FileStream Group from Sql Server 2008

We have migrated all our varbinary(max) column data to Azure Blob Storage and so we want to remove the old filestream columns that remain in our Sql 2008 database and the filestream filegroup but when ...

6 answers

MySQL error #2014 - Commands out of sync; you can't run this command now

I am using MySQL and I am defining a stored procedure like this: delimiter ;; Create procedure sp_test() select * from name_table; end When I try to execute that procedure I get this error: ...

0 answers

Mysql return the row position with sorting

the ff table: +-----------------------------+ + value| name |Asort + +-----------------------------+ + 111 | Alpha |a + + 161 | Beta |b + + 092 | Delta |c ...

1 answer

How to structure SELECT from VALUES on MS SQL Server 2000

I have an old application running against SQL Sever 2000. I am trying to use the following as part of a query. It runs well on more recent versions of SQL server, but not on 2000. The error is ...

1 answers | 1 hour ago by skyman on Stack Overflow
2 answers

Sql Query for the following output

I have two tables: Table_1: (Name, Street, City) Table_2: (Name, Teacher_Name) The column Name in Table_1 contains Student's Name as well as Teacher's name while in Table_2 column Name contains ...

2 answers | 1 hour ago by Solomon Minz on Stack Overflow
2 answers

Finding words with and without whitespaces in Rails and Postgresql

I'm trying to figure out a statement I can use in Ruby on Rails that does a SQL query to match a word that might or might not have any whitespaces with a similar word that also might or might not have ...

1 answer

delete duplicates if there is data

I need a sql so it removes the duplicates of the column job with #NA and not assigned data if there is data (for example, accountant) id name business job 1 mike warren mike sl ...

1 answers | 1 hour ago by Pablo Ijurco on Stack Overflow
1 answer

Not able to update MySQL table using Oracle: Unknown column in 'where clause' {42S22,NativeErr = 1054}

I have the following tables: MySQL table: jti_member_interact CREATE TABLE `jti_member_interact` ( `INT_MEMBER_ID` int(11) NOT NULL, `INT_ID` int(11) NOT NULL AUTO_INCREMENT, `INT_SOURCE` ...

2 answers

Entity relationship problem

I think my question is stupid but I just can't figure out how to solve it: I have 4 tables related like this (it's an example): Company: ID Name CNPJ Department: ID Name Code ID_Company ...

0 answers

Rails PostgreSQL migration giving error related to foreign keys

My issue: migrated from SQLITE3 today to POSTRESQL 9.4 on my Rails app. I've looked in StackOverflow, and also followed the instructions here: ...

1 answer

mysql error handling stored procedure doesn't catch error

NOTE: I also tried CONTINUE instead of EXIT with same results. I am running mysql 5.5 and am trying to create a stored procedure that sends a variable out based on if it supports full text. ...

0 answers

Unable to convert between java.lang.Integer and BINARY.- Spring

I have the following DTO that I use to persist new records to my database @Entity(name = "User") public class User { @Id @Column(name = "User_Id") private long userId; @Column(name = "User_Name") ...

2 answers

How to get pairs from sqlite

I am a database and I am just playing with sqlite3 for a group project. I have two tables that look something like this: Table 1: tv_show_id, tv_show_rating Table 2: tv_show_id, cast_id ...

2 answers | 2 hours ago by sanmo on Stack Overflow
2 answers

Access - Selecting unique rows with newest date

I have an access database table to track assignments between laptops and vehicles called Records, which shows ComputerName, the UnitNumber it's assigned to, and the date that assignment was recorded. ...

2 answers | 2 hours ago by Andelas on Stack Overflow
0 answers

SSIS - how to split rows (not columns)

I have a file with 100 rows and 20 columns, the first 2 rows are text and 98 others are numbers. There are no headers - I need to combine row1 and row2 to have the header. I want to split row 1 to ...

1 answer

selection from maxmind db

I Have a maxmind DB with 2 tables, geoIP and geoLOC then I have a list of some 10000 cities/towns and I want to get lat and lng of each city to display on a map I would avoid to use a 10000 loops to ...

1 answers | 2 hours ago by Joe on Stack Overflow
1 answer

Oracle 10g - Using max on date column that is both partition and index

I have a table that is both partitioned by and indexed on a DATE column d_dly_label. I'm trying to understand the impact of this on max(d_dly_label). Why does it produce different values for the ...

1 answers | 3 hours ago by logworthy on Stack Overflow
0 answers

Conectar PHP ao banco de dados MySQL do 'simulador' WampServer?

Estou começando a aprender PHP e SQL, estou usando o Wamp Server para simular o servidor e nele tenho o PHPMyAdmin.. Não fiz nenhuma configuração no PHPMyAdmin, por não saber mesmo. Quero saber como ...

1 answer

How to import .csv file to CartoDB using SQL?

How to import .csv file to CartoDB using SQL, the data given below : POINT | TOP_dm | BOTTOM_dm | X_RD | Y_RD 35AP7600 | 4418 | 4368 | 262053 | 467223 35AP7601 | ...

1 answers | 3 hours ago by mega_ern on Geographic Information Systems
1 answer

HQL to accept wildcard characters and display the matching records

My requirement is to accept a wild card in the textbox and show the matching records. Currently i'm working on a maintenance project and was not sure how to modify the existing code written in ...

1 answer

Rails Polymorphic Model for 1 Database Record

I am working on a rails app for a charity who takes crowd-funded donations for Families, Fundraisers, and for the charity itself. Right now donations are setup to belong to Families & Fundraisers ...

15 30 50 per page
1 2 3