My Filter
   32 tags on

My Filter

  • All Sites

0 answers

Intersects query crashes SQL Server service

I'm at a bit of a loss on an intersects query that I'm sending via EF6. It works great against my test and production databases, but I recently set up a new box and restored my production database ...

2 answers

DataGridView and SQL uery name

i have function that gets all the data from database (also the field names) and show it in DataGridView. the problem is that the DataGrid show also the field name. How can i edit the columns name? I ...

2 answers | 17 secs ago by M. rit on Stack Overflow
2 answers

SQL query to pull ONLY data which contains range of records

I need your help to write query with select statement to pull only claim IDs which contains code from this range: 99213, 99214, 99215, 99217. So my results should be claim ID 1 (all lines) and claim ...

2 answers | 58 secs ago by user6287796 on Stack Overflow
1 answer

Firebird Query- Return first row each group

In a firebird database with a table "Sales", I need to select the first sale of all customers. See below a sample that show the table and desired result of query. ...

0 answers mvc 4 - the data reader has more than one field

I'm using ASP.NET MVC 4 and Entity Framework code-first to call a stored procedure to get one row from a database table. My procedure code: Drop Procedure SP_Category_DetailByID Create Procedure ...

2 answers

MS Access UPSERT (Update/Insert) SQL

I know this question must have been asked a million times but I have yet to find a "NON-VBA" solution to this in MS Access 2007 SQL. I am using 2 Tables TBLDestination and TBLSource. I have to update ...

4 answers

php function to execute sql doesn't return anything

I am making a webshop and need to retrieve the price of an item I've been reading and searching for a few weeks now without any luck, anybody here with an answer? -> little explanation: Every item ...

4 answers | 5 mins ago by Sam Apostel on Stack Overflow
0 answers

How can I get the source port being used by a sql connection object?

I have an application that connects to a SQL Server to run some queries. It connects to port 1433, but the source port can be anything in a large range. Is there a way to capture what source port is ...

4 answers

Upserting in MS-access

I need to write an SQL query for MS-Access 2000 so that a row is updated if it exists, but inserted if it does not. (I believe this is called an "upsert") i.e. If row exists... UPDATE Table1 SET ...

4 answers | 7 mins ago by Urbycoz on Stack Overflow
0 answers

Cannot Connect to Public Facing SQL Server from 1 Site Only

Yes it is a public facing SQL Server. I can connect to it from multiple locations and PCs without issue. I have 1 location that can't. All other sites are running without issue all day. I have ...

2 answers

SQL: How to replace values in a union of conflicting types

I have a single table in Postgres (with PostGIS) in which I have a few thousand rows, each with the name(text), code(text), city(text) and geom(geometry) of a statistical area unit (like a county). ...

0 answers

Soma direto no PHP

Boa tarde, Amigos quero uma ajuda de voces para poder solucionar um problema aqui, tenho um sistema de controle de serviços. gostaria de emitir um relatorio de serviços e somar esses valores mas nao ...

2 answers

MySQL in NodeJS is not working for multiple statements in INSERT INTO

I have de follow code. let addressQuery = 'INSERT INTO addresses(postalCode, street, city, state) VALUES(?, ?, ?, ?);'; let addressValue = [client.postalCode.replace(/\-/gi, ''), client.address, ...

2 answers

pivot in sql server with a twist

I'm working on call center data to provide agent performance metrics. One of the table captures agent status in the following manner. This table captures agent status throughout the day in total ...

2 answers | 9 mins ago by Santosh Rao on Stack Overflow
0 answers

Need help in resolving SQL SEVER Full Backup issue

I have 10 databases on my SQL server and we do an automatic Full Backup everyday @ 00.00 now the issue is There are two databases out of the 10 which should not be backed up as these databases are ...

0 answers

AspNet Identity ApplicationUser with different fields for roles

I have a ASP.NET MVC application which uses ASP.NET Identity. I have 3 roles for my application: Student Author Admin Those 3 have different fields to persist, so Student role could have X number ...

5 answers

Oracle PL/SQL string compare issue

1).Hello, I have the following Oracle PL/SQL codes that may be rusty from you guys perspective: DECLARE str1 varchar2(4000); str2 varchar2(4000); BEGIN str1:=''; str2:='sdd'; ...

5 answers | 16 mins ago by C.c on Stack Overflow
3 answers

How to accomplish evaluating record results in SQL without the use of a cursor

I would first just like it known I have spent days looking for this answer before asking I know you guys are awesome and your time is valuable. On to my problem. I have a very large query pulling ...

1 answer

SQL Group By a substring in a field

I have a cities table in which I have citynames like "Los Angeles (California)". I tried to extract all the values contained between parantheses with a request, but I couldn't manage to do it well...

1 answers | 18 mins ago by Yellow Bird on Stack Overflow
5 answers

SQL: Multiple IF's examining the same varible

Let's say we have two variables in a SQL statement. @myVar1 VARCHAR(100) = 'I ate an apple for lunch' @myVar2 INT Now, I want the following logic: IF @myVar1 like '%apple%' THEN @myVar2 = 1 IF ...

0 answers

getting the file from upload control - jsp

I am doing upload of CSV file like this and try to access this file in the jsp like below. I am getting error 'the system can not find file specified'. please correct my code. I am trying to ...

1 answer

SQL group/pivot making separate returns for different items

Below this paragraph are the results I currently get. DateAndTime TagName Val 12/22/2015 CR_CH20 12 12/22/2015 CR_CIP 29 12/22/2015 CR_DCREAM 14 12/22/2015 CR_IDLE ...

1 answers | 22 mins ago by Robert on Stack Overflow
4 answers

How do I store Point datatype in SQL Server?

How do I best store a Point data type in my SQL Server database? I was thinking of just making it nvarchar, then inserting a point-string like: 100,246 then just splitting the string when I read the ...

3 answers

MSSQL - How to work around WHERE IN limit of 128 values

I am writing a query like this SELECT * FROM table WHERE id IN (thousands of ids) but this won't work because the limit of values for the WHERE IN is 128 on our ...

3 answers | 24 mins ago by Derek on Stack Overflow
0 answers

Como usar store procedure com Doctrine

Como uso stored procedure com Doctrine ? Devo usar o createNativeQuery ?

5 answers

How to find what is locking my tables

I have a SQL table that all of a sudden cannot return data unless I include "with (nolock)" on the end, which indicates some kind of lock left on my table. I've experimented a bit with dm_tran_locks ...

3 answers

PL/SQL Developer: joining VARCHAR2 to NUMBER?

Here's where I am: TABLE1.ITM_CD is VARCHAR2 datatype TABLE2.ITM_CD is NUMBER datatype Executing left join TABLE2 on TABLE1.ITM_CD = TABLE2.ITM_CD yields ORA-01722: invalid number error Executing ...

3 answers | 28 mins ago by Trevor D on Stack Overflow
1 answer

How to run a sql query inside a while of another sql query?

Hi my code as follow:- $sql="SELECT student_id,DA1,DA2,DA3,DA4,DA5,DA6,HA1,HA2,HA3,HA4,HA5,HA6 from table"; $results = $result->query($sql); while($row = $results->fetch_assoc()) { $id = ...

7 answers

T-SQL : Is string a Palindrome?

I am a beginner in T-SQL. I want to decided whether an input string is a palindrome, with output =0 if it is not , output =1 if it is. I am still figuring out the syntax. I am not even getting an ...

1 answer

LINQ, select ID from Table where it does not match ID in another table

The title says most of what I wish to do. I have two tables "orders" and "Customers". the orders table contains the customerID of every customer who has placed an order and the customers table ...

1 answers | 31 mins ago by Kevin on Stack Overflow
15 30 50 per page
1 2 3