My Filter
   28 tags on

My Filter

  • All Sites
  • Arqade

0 answers

SSIS Package not running failing on CMD

Good Day, i am trying to run a package but no matter what i try it is not working it fails with the following message Executed as user: NT AUTHORITY\LOCAL SERVICE. Microsoft (R) SQL Server ...

0 answers

How to insert & retrieve data from mysql table for a specific user

Am not sure if the title is correct i tried my best. Im a PHP/MySQL beginner and I really need some help I have a small script that am using for sending sms, i recently added a phonebook The ...

0 answers

VBA Min criteria to a query

i have the above query which is working as instructed. taking the min values from different rows of the table. if you please help how i will make my query to output the specific row that matches both …

0 answers

SQL Stored Proc With One To Many Relationship Return Only Most Recent Record

I've been having a terrible time with this. I created a Stored Proc to return a corresponding record, but one of the tables has multiple print jobs so it returns multiple records. I only want the …

1 min ago by Stacy on Stack Overflow stackoverflow.com
0 answers

Issue with multiple subqueries

I need to do a subquery within a subquery. I know how find out the OverallCharge and minimum, maximum and average overallcharge required. SELECT MIN(OverallCharge) AS MinOverallCharge, ...

3 answers

how to restore differential back daily basis on sql server DB

Im working with SQL Server DB, what i need is that i have a DB1 and clients site communicate with this DB,Reporting module of the application is also using the same DB (i-e That shows different ...

6 answers

What is the correct/ fastest way to update/insert a record in sql (Firebird/MySql)

I need some SQL to update a record in a database if it exists and insert it when it does not, looking around there looks to be several solutions for this, but I don't know what are the correct/ ...

6 answers | 5 mins ago by Re0sless on Stack Overflow stackoverflow.com
0 answers

MySQL could not get correctly parameter values in PROCEDURE

In this simple PROCEDURE, I want to execute INSERT method if @user_id is NULL or pass NULL. but below sql command for INSERT is not working correctly: Mysql ERROR: The following query has failed: …

2 answers

Different outputs for each condition.get together group by all values - single mysql query

Here how my tables look like: CREATE TABLE my_table(id INT,project_id VARCHAR(6),order_id VARCHAR(6),user_id VARCHAR(6),owner_id VARCHAR(6)); INSERT INTO my_table VALUES (1, 211541, 8614, ...

2 answers

How to avoid the SORT operation in SQL query that contains ORDER_BY condition?

I am optimising a PostgreSQL query which involves three tables and a ORDER_BY condition. It seems that PostgreSQL prefer to arrange a SORT operation to perform the ORDER_BY condition, rather than ...

1 answer

Entry verification?

I'm not even sure how to title this question. I'm still quite the newbie with databases. Here's my situation. I have an intersection table, intersect(foo_id, bar_id) foo(foo_id, alpha_fk) ...

1 answers | 9 mins ago by ResidentBiscuit on Stack Overflow stackoverflow.com
0 answers

Oracle SQL (no listagg) need to combine multiple rows into a single column

I am query multiple tables and need to combine all the values from a table called "NOTES" for a given ID. Here is what I have: SELECT e.HR_NUMBER, s.SALES_ID, s.SALES_ID_TYPE, m.REGION_ID, ...

0 answers

How to add month to a date based on value from another columns

I have a PlannedDate and PeriodLength column. I want to have a new column PlannedMonth. The PlannedMonth should have the result set based on PlannedDate and PeriodLength. So, the PlannedMonth I want …

3 answers

Launch Visual Studio 2012 Shell (Integrated) and run SSIS package using Windows Scheduler

I am working on a project that creates a reporting database by loading data from an AS400 into SQL Server 2012 Express (just FYI - I do not have sql agent or sql profiler). I downloaded sql server ...

2 answers

SQL to pull locations within NE/SW bounds

I'm trying to get an SQL query to pull events that are within the bounds of a city, dynamically. I have a list of towns/cities, with Google Geocoding I can get the North East and South West bounds of …

2 answers | 12 mins ago by lukeseager on Stack Overflow stackoverflow.com
1 answer

How to get current tenant when using Appartment gem in multi-tenancy Rails 4

How can I find out which tenant (schema) is the current one when Apartment was initialized according to request

0 answers

optimize php code that uses youtube api to get youtuber video 'uploadstatus' using curl library in codeigniter

My app primarily uses youtube videos, and now my task is to eliminate youtube videos that do not play ,i.e, private or deleted by user etc... so i wrote a script as follow: function badvideos() { …

2 answers

How to use a parent query value in select statement of subquery

I have an aggregate query and a subquery and I want to use one of the values from the 'parent' query in a formula in the select statement for the subquery ... Something like this, where I want to ...

2 answers | 16 mins ago by DrTim on Stack Overflow stackoverflow.com
2 answers

change select statement value using sql

I have some SQL below which is programmatically generated: INSERT INTO TABLE (COMID, NAME, DATE) SELECT DISTINCT 'COM001', 'John', '01-Jan-4501 00:00:00' How can i amend this so that if it finds …

0 answers

Oracle data modeler logical design unique constraint

How can I define column to be unique when creating logical model? It's because I want to create relationship 1:N and both columns are not primary key. I tried to define surrogate keys when defining …

0 answers

Integrate MS Dynamics AX with Play Framework

In my company we use MS Dynamics AX 2009. This is the ERP of the company. We have around 100 users. The servers of MS Dynamics AX are in the headquarters company. We are developping a new website ...

0 answers

Can we create Index in Table valued function

Can we create Index on column in Table valued functions table in SQL server 2008. My function is getting result slow,when i look into execution plan ,it was under the table scan,hence i need to ...

1 answer

Postgres unique combination constraint across tables

I have three tables - file ( file_id int primary key filename text not null etc... ) product ( product_id int primary key etc.... ) product_attachment ( product_id references product …

1 answer

Get distinct values via hibernate

I want to get distinct values by a parameter: @Transactional public List<data> getAllFromColumn(String identifier) { List<data> resultList = em.createQuery("SELECT DISTINCT p.market …

1 answers | 21 mins ago by Vivien on Stack Overflow stackoverflow.com
0 answers

How do dirty reads at both the transaction and table level provide increased performance?

I ran the following code past our architect as I thought there may have been a tautology between the isolation level and table hint: SET NOCOUNT ON SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED …

1 answer

Is there a way to store array like data in a column in SQL Server?

I have a table that holds Test Questions. Each row of the table contains details of a question for a test for a particular user. The user is presented with 3-5 possible answers and I would like to …

1 answers | 22 mins ago by Samantha J on Stack Overflow stackoverflow.com
0 answers

Can I use the output clause in the Update command to generate 2 rows

I can use OUTPUT to generate the before and after row values when doing an update to a table. And I can put these values into a table. But they go into the table in 1 single row. I need the before …

1 answer

Generate SQL Statements for database test

I want to do coverage testing for a custom database, checking whether the database provides the correct answer to several sql queries. Therefor I need lots of sql queries to cover most of the possible …

2 answers

Best way to delete duplicate rows in an intersection table based on foreign key column

I'm looking for a way to delete dupicate rows from an intersection table based on a foreign key from one of the tables from the opposite ends of the intersection table. For the sake of clarity, I'll …

2 answers | 24 mins ago by The Complex One on Stack Overflow stackoverflow.com
1 answer

Get last link between two tables in a table link which save action using SQL

I have 2 tables : persons and musics. I have a N to N connection between them. So I need an intermediate table between them. I also want to save the evolution of the connection between them, so I ...

1 answers | 24 mins ago by Eliott Roynette on Stack Overflow stackoverflow.com
15 30 50 per page
1 2 3