SQL Server 2014 :: Find Names Of Customers Who Have Purchased Academic Books?

Nov 10, 2013

1. I need to find the names of the customers who have purchased academic books. (Coding required as Subquery NOT as Join)

2. Here, I need to show a list of authors who have written books and list the books they have written.

Sort the list by last name

(Coding required as Subquery)

View 4 Replies


ADVERTISEMENT

How To Find Out Number Of SQL Server Seats Purchased?

Jul 2, 2007

 How to find out number of SQL Server seats purchased?

View 2 Replies View Related

SQL Server 2014 :: How To Automate Reports And Send Them To Customers

May 9, 2014

I have been looking for solution to automate the reports. I have many customers and many reports.each customer has their own will to receive individual report on specific day to their given/subscribed email addresses. So I have customer and report name and weekday, weekly, monthly (different schedules) and list of customers where each report is sent to.

Is there any way to implement this automation using simple T-SQL?

I have been able to make report in Crystal report and through command like (use TSQL) to generate report output in any format, lets say, .pdf and based on customer list send them email on their scheduled day.

I do not want to do this all in Crystal Report, because there is already SSRS we have but my question is, Ids there any easy way that i pass a command line to my sql server report and that returns me output so that i can send email to my clients?

View 3 Replies View Related

Reporting Services :: SSRS 2005 - Generate QR Codes For All Customers In Customers Table?

Oct 6, 2011

I have a list of customers in my Customers table. What I am looking to do is to create QR codes for each customer in Reporting Services. I need to include the customer name, address, postcode, telephone number and contact name.

View 5 Replies View Related

Visual Studio.net Academic (2002) With Sql Server Express 2005?

Sep 17, 2006



Can Visual Studio.net Academic (2002) be used with Sql Server Express 2005?

View 4 Replies View Related

SQL Server 2014 :: Unable To Recognize Table Name Or Field Names

Jul 8, 2014

I have created a table name "tblPopulation" with fields 'Country', 'State' etc....

When i query it with table name as tblpopulation with fields 'country', 'state' then i get error as invalid object name.

View 9 Replies View Related

SQL Server Admin 2014 :: Difference In Alert Object Names

Mar 9, 2015

Same SQL Server DB engine (2012), connected with two different clients (2008 and 2012). When I check objects for performance condition alert, 2008 client shows the objects name with leading "SQL Server".But 2012 client displays just the object name and NOT prefixed with "SQL Server".we have automated alerts creation, so it fails depends on the client version.

View 0 Replies View Related

SQL Server 2014 :: Pivot Table With Column Names To Rows?

Aug 1, 2015

I have a table with following rows.

FY REVCODE Jul Jun
2015 BNQ 1054839 2000000
2015 FNB 89032 1000000
2015 RS 1067299 3000000

I am looking to convert it to

Month BNQ FNB RS
JUL 1054839 89032 1067299
JUN 2000000 1000000 3000000

I tried with the following and result is coming for one month i.e. JUL but not with the second Month i.e Jun

SELECT 'Jul1' AS MON, [BNQ], [FNB], [RS]
FROM
(SELECT REVENUECODE, SUM(ROUND(((Jul/31)*30),0)) AS JUL
FROM RM_USERBUDGETTBL
WHERE USERNAME='rahul' AND FY=2015
GROUP BY REVENUECODE, USERNAME
) AS SourceTable
PIVOT
(SUM(JUL) FOR REVENUECODE IN ([BNQ], [FNB], [RS])) AS PivotTable

Results:

MONTHBNQ FNB RS
Jul11054839 89032 1067299

View 4 Replies View Related

SQL Server 2012 :: Find Names Of Tables For A Particular User

Feb 18, 2015

how to find the names of the tables owned by the particular user in sql server and how to display the distinct object types owned by the particular user.

View 1 Replies View Related

SQL Server Admin 2014 :: Difference In Performance Counter Names In Dmv And Alert Creation Screen

Feb 13, 2015

SQL Server 2014 BI edition.

select * from sys.dm_os_performance_counters returns the object names prefixed with "SQLServer:" (e.g. SQLServer:Databases)

It was expected as in other editions also. Issue is that when we try to crate "SQLServer Performance Condition alert", object names in "Object" list comes without the prefix "SQLServer:" (e.g. Databases). Please see the attached snapshots.

View 4 Replies View Related

Problem: Find All Table Names In Db And Then Find

Jun 12, 2008

I have 3 database say
db1
db2
db3

I need to setup a script to read all the table names in the database above and then query the database to find the list of Stored Procedure using each table.(SQL Server)

View 5 Replies View Related

SQL Server 2014 :: How To Find 5th Working Day In A Month

Oct 29, 2013

I would like to know how to find fifth workingday* of a given month and year.

workingday - working day is just any day apart from saturday and sunday. no need to consider any other holidays.

ex: I would just give month number and year as input and i would like to know date and day of the fifth working day.

Input : 10/2013
Output : 7th October 2013, Monday.

View 4 Replies View Related

SQL Server 2014 :: Find Count For Two Tables And Put Into Other Table

Jun 18, 2015

I have two table in two different database. I have to found count for both table and put into other table.

example : Database --> A , table is T1
Database --> B , table is T2

I want count of both table and put into T3 table in database A or B .

View 7 Replies View Related

SQL Server 2014 :: Powershell Script To Find Windows Server Reboot Date

Oct 16, 2015

I am searching for a Powershell script which picks Windows Server names from SQL server table(eg: Instance.DB.tbServerList) & writes last reboot date to SQL server table(can be same or different table).

View 6 Replies View Related

SQL Server Admin 2014 :: Find Report Server Database Name?

May 8, 2015

Is there any way to find Report server database name using T-SQL?

I have SQL server report server instance and authentication credentials.

I can use sys.databases but in case of user had changed ReportDb name at the time of configuration this approach will not work then How I can find?

View 2 Replies View Related

SQL Server Admin 2014 :: Find All The Inactive Windows Logins?

Jan 30, 2014

How to query in SQL to retrieve all the disabled Windows Users which are available as records(only) in the SQL Server ?

View 9 Replies View Related

SQL Server 2014 :: Find Duplicate Rows Like Same Entries More Than One Time?

Sep 11, 2014

i have a table like below

create table staff_attendance
(
attendance_id int,
attendace_date datetime,
staff_id int,
working_year int,
hours int
)

values like

1 2014-06-30 00:00:00.0ST10121
2 2014-06-30 00:00:00.0ST10122
3 2014-06-30 00:00:00.0ST10122 ----same entry like previous one
4 2014-07-01 00:00:00.0ST10121
5 2014-07-01 00:00:00.0ST10122
6 2014-07-02 00:00:00.0ST10121
7 2014-07-02 00:00:00.0ST10122
8 2014-06-30 00:00:00.0ST10221
9 2014-06-30 00:00:00.0ST10222
10 2014-07-01 00:00:00.0ST1022 1
11 2014-07-01 00:00:00.0ST102 22
12 2014-07-02 00:00:00.0ST102 21
13 2014-07-02 00:00:00.0ST102 22

I Need to find the duplicate rows like same entries which is having more than 1 rows.... how do i find?

View 3 Replies View Related

SQL Server 2014 :: Find Multiple Entries In Two Fields One Table?

Sep 12, 2014

I am trying to find books which have the same title and publisher name as at least two other books and need to also show the book ref (ISBN number). I have the below script so far:

SELECT isbn, title, publishername
FROM book
WHERE title in (SELECT title
FROM book
GROUP BY title
HAVING count(title)>2 or count(publishername)>2)
order by title;

This is a snap shot of the output:

ISBN Title Publishername
0-1311804-3-6 C Prentice Hall
* 0-0788132-1-2 C OSBORNE MCGRAW-HILL
* 0-0788153-8-X C OSBORNE MCGRAW-HILL
* 0-9435183-3-4 C Database Development MIS
* 1-5582806-2-6 C Database Development MIS

[Code] ....

What I should be seeing is only the ones I have put an * next to. What am I missing from the scrip?

View 3 Replies View Related

SQL Server 2014 :: Find Double Records Within DateTime Range

Apr 13, 2015

I have a query question.

Consider a table with the following structure:
RecordID (PK - int) - RecordDate (DateTime)

I need to find all records that fall within a 7 day period slot based on the first RecordDate of a specific slot.

Example, consider the following records:
RecordID - RecordDate

1 - 2015-04-01 14:00
2 - 2015-04-03 15:00
3 - 2015-04-03 16:05
4 - 2015-04-03 19:23
5 - 2015-04-06 09:15
6 - 2015-04-06 11:30
7 - 2015-04-07 12:00
8 - 2015-04-09 15:15

The result of the query I'd like should look something like this

1
2
5
7
8

So basically I'd like to leave record 3 and 4 out because they fall within 24 hours of record 2 and I'd like to leave record 6 out because it falls within 24 hours of record 5.I'd tried working with a CTE and set a dateadd(d, 1, recorddate), join it on itself and use a between From / To filter on the join but that didn't work. I don't think NTILE will work with this?

View 9 Replies View Related

SQL Server 2014 :: Find Equal And Opposite Rows In A Table

May 25, 2015

How to find the equal and opposite rows in a table.

E.g.:

book position
A 500
B -500
C -500

The output should return the rows having equal and opposite positions.

O/P:
A 500
B -500

I have tried self join on a table but in vain.Do we need to cursors for these row level handling?

View 6 Replies View Related

SQL Server Admin 2014 :: Stored Procedure - Find The Cause For Blocking

Sep 23, 2015

I was trying to create stored proc

[code="create procedure dbo.sp_table1
@idint
as
begin
updatetable1
setisarchived = 1,

[Code] ....

But the query was continuously blocking the query below

updatetable1
setisarchived = 1,
modtime = getdate()
whereid = @id
andisarchived = 0

I was not sure, why the create procedure statement is blocking the update statement.

View 1 Replies View Related

SQL Server Admin 2014 :: How To Find Memory Usage By Index

Oct 4, 2015

I want to create a lot of index for my database for performance.

But I need find memory usage by indexes.

How to find memory usage by index in sql server?

View 1 Replies View Related

SQL Server 2014 :: Find Table In A Linked Server?

Feb 2, 2015

I have multiple linked servers and trying to find if a table (approximate table name) exists in one of the linked servers.

I have a code to find it in local DB....how can I modify to include all linked servers as well:

ALTER PROCEDURE [dbo].[FindTable]
@TableName VARCHAR(256)
AS
DECLARE @DBName VARCHAR(256)
DECLARE @varSQL VARCHAR(512)

[code]....

View 3 Replies View Related

SQL Server Admin 2014 :: Where To Find Availability Group Fail Over Occurrences

Nov 14, 2014

Where can I find dates and times to when an availability group was moved outside of the SQL error log?

View 1 Replies View Related

SQL Server Admin 2014 :: How To Find Used Space In Memory Optimized Filegroup

Jun 11, 2015

How do i find Total allocated space and used space of a memory optimized filegroup?

use memory_optimized_db
Go
select (SUM(size)*8.0)/1024.0 as Space,
FILEGROUP_NAME ( data_space_id ) , type_desc from sys.database_files
group by data_space_id,type_desc;

above query gives "current used size of the container " of memory optimized file group but doesn't give Total space detail.

View 0 Replies View Related

SQL Server 2014 :: Find Common Link Between Two Tables In Database Without Key Constraints

Jul 16, 2015

Any tool, script, procedure, or otherwise that will solve this problem?

CREATE TABLE [Table 1] (
Id varchar,
TableTwoId varchar,
OtherData varchar )

CREATE TABLE [Table 2] (
Id varchar,
MoreData varchar )

What is the link between these two tables?

I have databases that have zero keys defined, no foreign key constraints, no unique value constraints. I cannot assume that an Identity column is the Id. The end game is be able to output that [Table 1].[TableTwoId] = [Table 2].[Id] but cannot assume that all linkage in the database will be as simple as saying "if the field name contains a table name + Id then it is the Id in that table."

Currently have written a script that will cycle through all columns and start identifying keys in singular tables based on the distinctness of the values in each column (i.e. Column1 is 99% distinct so is the unique value). It will also combine columns if the linkage is the combination of one or more columns from Table 1 = the same number of columns in Table 2. This takes a long time, and it somewhat unreliable as IDENTITY columns may seem to relate to one another when they don't.

View 7 Replies View Related

SQL Server Admin 2014 :: Replication Could Not Find Or Execute Stored Procedures

Jul 20, 2015

Replication-Replication Distribution Subsystem: agent PRODDATA6 failed. Could not find stored procedure 'sp_MSdel_dboActiveTask_msrepl_ccs'.

Replication-Replication Transaction-Log Reader Subsystem: agent PRODDATA6. The process could not execute 'sp_replcmds' on 'PRODDATA6'.

Replication-Replication Distribution Subsystem: agent PRODDATA6. Could not find stored procedure 'sp_MSupd_dboActiveTask'.

Looks like these sp's got deleted?

View 1 Replies View Related

SQL Server 2014 :: Find Out Last Executed Date For Any Stored Procedure In Database

Oct 6, 2015

Is it possible to find out the last executed date for any stored proc in the database using system tables or writing any other query.

View 2 Replies View Related

SQL Server Admin 2014 :: Script To Find Nested Views In A Database

Oct 7, 2015

Any easy way to find if there are any nested views existing in the database?...using SQL server 2014...

View 1 Replies View Related

SQL Server 2014 :: Find Views Which Has More Than 16 Columns For Unique Index / Constraint

Oct 27, 2015

We are on SQL 2014...we have a bunch of views in a database where we are trying to find the views which have more than 16 columns max for unique index/constraint...this is needed so we can convert them to indexed views...

View 1 Replies View Related

SQL Server 2014 :: Can't Find Data Flow Task In SSDT 2012

Nov 5, 2015

I Can't find the Data Flow Task in SSDT 2012.

Has it been replaced by another task or do I need to do something to make it visible?

Edit: It popped up under my favorite tasks.

[URL]

View 2 Replies View Related

SQL Server 2012 :: Results To Show Differences In Items Purchased Versus Sold?

Jun 3, 2014

I am looking for a way to show how I can have a result set that shows a record with one item and the number of records where it was purchased or sold. Below is my sample data.

Use tempdb
go
create table #ItemLedgerEntry
(
ENTRYNO INT NOT NULL
, ITEMNO VARCHAR (50) NOT NULL
, POSTINGDATE DATETIME NOT NULL
, ENTRYTYPE INT NOT NULL

[code]....

I know something like this will give me results but I'd like to run one query.

select itemno, count(*) from #ItemLedgerEntry where entrytype = 0
group by itemno
order by count(*) desc

View 5 Replies View Related

To Find Parameter Names

Sep 8, 2007


To find parameter names
In ASP.Net 2.0, how can I get what parameters defined in an rdl report file? I know the report name and the report is deployed to a server.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved