Nu Of Customers

Feb 27, 2008

I want to calculate how many number of people have got loans. In my report, there is one column called customerName. I can use count(CustomerName). But sometimes cutomers name appears twise or thrise. count(customerName) does not give the write nu of customers. How do I write T-SQL expression to get the rite no of customer?

Thanks

View 5 Replies


ADVERTISEMENT

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

Total Number Of Customers

Apr 29, 2008

hi,
I have a person table with a field createdate and personid,

how can I display how many customers existed in the table by date.

eg.
1/4 200
2/4 250
3/4 256
4/4 280


regards,
amie

View 4 Replies View Related

Related Customers To Orders

Sep 26, 2007

I am trying to link my ORDERS table to my CUSTOMERS table.
The Primary key in the CUSTOMERS table is a UNIQUEIDENT.
The foreign key it is linking to is an INT.

When I run a query in ACCESS, it says type mismatch....

Any solutions?

View 1 Replies View Related

Help Grouping Customers In Table

Nov 8, 2007

I€™m trying to group records that are in two collections and assign a Master Id. For example:


Example Base Table:



Collection Number Customer Id
--------------------------- -----------------------
3000001 244517
3000001 244518
3000002 244517
3000002 255519
3000002 244518
3000003 255520
3000004 266660
€¦
€¦


Since Customer Id 244517 is in collection 3000001 and 3000002 I want to group all customers in both collection and assign one master id. For example:


Example Results:



Collection Number Customer Id Master Id
--------------------------- ----------------------- --------------------------
3000001 244517 1
3000001 244518 1
3000002 244517 1
3000002 255519 1
3000002 244518 1
3000003 255520 2
3000004 266660 3
€¦
€¦

I€™m not sure how to perform this, can anyone direct me?

View 5 Replies View Related

Assign Cluster # To Customers

Dec 31, 2007



I deployed a clustering project. As a result, I got 10 clusters. Is there an automatic way to create a table with the customer ID and the cluster # that each customer was assigned to?

Thanks!

Ezes

View 4 Replies View Related

Retrieve Only New Customers With Orders

Jan 22, 2007

I have a table with orders and customer info. I want to retrieve only customers with new orders only. These are the available fields: customer Id, Order Id, Order Date, and Order Subtotal. I need help with the "where" section of the query.

View 1 Replies View Related

Where Is The Tutorial File: Customers.xls?

May 18, 2006

In Lesson1 of SSIS Tutorial, section "Running the Wizard to Create the Basic Package", is stated

"Specify the data source. You will use the Excel workbook, Customers.xls, as the data source..."

I have both AdventureWorks databases installed on my box as well as a host of samples but I can't find that file. Any pointers much appreciated.

TIA,

barker

View 12 Replies View Related

Matching Top 5 Items To Customers In Another Table

Oct 4, 2000

Hi,
I'm trying to create a resultset with the top 100 customers for the year (based on this year's sales) and for each of these customers, to return 5 top items and their corresponding sales dollars, as well as percentage of total sales achieved by each item. What I'm struggling with is how to return specifically 5 sales items per customer. If I use a temp table or a correlated subquery, what is the exact syntax to use? Any advice will be appreciated. Thanks all :)

View 1 Replies View Related

Counting Customers That Are In Multiple Groups

Feb 19, 2013

I have a large table that tells me customers and mailings (~4 million rows). So for each customer, I see what mailing(s) they received. It is at the mailing level so if a customer received 2 mailings, their will be 2 records for that customer number, one for each mailing they received. There are 3 different mailings.I am trying to calculate the count of customers that received all 3, as well as those that received 1&2 only, 1&3 only, and 2&3 only. For example:

CustNo Mailing
Tim 1
Tim 3
Dan 1
Dan 3
Jane 1
Max 1
Max 2
Max 3
Lauren 2
Lauren 3

Results:

All 3 - 1
1&2 only - 0
1&3 only - 2
2&3 only - 1

I have tried doing some funky table joining and EXISTS, but the query runs and runs because of how much data it has to sift through. Here is the code I am using to find Mailing 1&2 only customers, but I am not even sure it is getting me the right numbers. There are 2 different types of customers as well which is why I have custtype in there.

Code:
select a.custtype,count(distinct a.custno)
from myTable a
inner join (select distinct custno from mytable where [mailing]=2) b
on a.custno=b.custno
where a.[mailing]=1
and not exists(select * from myTable c where a.custno=c.custno and c.[mailing]=3)
group by a.custtype

View 14 Replies View Related

How To Service Data For Multiple Customers

Jul 23, 2005

Hello All,I do not know if this is the proper group to ask my question. Please dodirect me to the proper place.I have a database server and would like to store data for multiplegroups of customers. The data is not shared amongst the groups but areshared only amongst individuals composing a group.One solution would be to lump all data from all groups into a singleinstance of the database server accompanied with a tag that wouldidentify to which group each piece of information belongs.Is there a better method to achieve what I want to do. Would mysolution present any difficulties in the future in terms of performance,maintenance, scalability.Are there other solutions that may be available to address my needs.Any suggestions would be greatly appreciated.Thanks

View 3 Replies View Related

DB Engine :: Email Notifications To Customers

Jul 17, 2015

I need to develop a process by which customers are notified that their 1) order was received and 2) order was shipped.

We are running Sql Server 2008 and all customers and data are located here on various servers.  It is in a Windows 7 environment. 

Has ever utilized Sql Server Database Mail for this purpose?  Is it feasible?

View 6 Replies View Related

Transact SQL :: Repeating Customers Within A Timeframe

Oct 14, 2015

I'm trying to write a query which would bring back customers who are returning within a certain timeframe after their initial contact. Query 1 would be something like:

Select CustomerID, OrderID, StartDate, EndDate
FROM tblOrders

I would then like to bring back a recordset which showed any follow up orders within a timescale. Query 2:

Select CustomerID, OrderID, StartDate, EndDate
where EndDate is less than 6 months after Query1.EndDate
Joined by Query1.CustomerID = Query2.CustomerID

I haven't got as far as writing the T-SQL yet. I'm trying to think of a way to do it.

View 6 Replies View Related

Sql Statement To Select Customers Contributing Top 60% Of Sales

Oct 18, 2006

I have an Access 2000 database which lists customers by name, and howmuch (in dollars) they have purchased of various products. How do Iwrite a SQL statement to select customers who make up the top 60% oftotal sales dollars? I need to have a list of customers returned.The list of customers that get returned will be used to select otherdata from the same database. (I mention this in case there are multipleways of getting the customer list).Thank you for any advice.

View 2 Replies View Related

All I Wanted Was To Submit Customers Info To My Emailbox

Jan 28, 2008

I have created an order form for my business. I placed a submit button at the bottom. I wanted all the clients information to go into my emailbox. Someone told me about MS SQL Server. I got excited and downloaded the 2005 Express version with all the trimmings. Now I am more confused than I was before. Someone please explain to me what I should do first. Redo the form with the studio then work with the server? I think I may have deleted something important from the server trying to figure it out. Help!!!!!!!!!!

View 7 Replies View Related

SQL Server Integration Tutorial- Lesson1 -Customers.xls

Apr 26, 2006

Hi, I'm fairley new to SQL Server 2005. I've started to work with the tutorials to get a grip of it all... but when I'm running the wizard to create a packade I cannot find the folder Samples in the 90-folder... and the file Customers.xls is nowhere to find in any of the folders in MS SQL Server 2005 folder...

I downloaded and ran BOL from april2006 and also SP1 for SQL Server 2005...

Where can I find the right material to run the tutorials?

regards maggi

View 2 Replies View Related

Power Pivot :: Create Top N Customers Filter

Oct 19, 2015

I am trying to write a RANKX Function as a calculated field instead of a measure, so I can used rank as a report filter but it is not working.I have customers that I can rank by sum of sales amount and then bucket their ranks within categories such as Top 10, 50, 100. The goal is then to use this Top Customers list as a filter on the Power BI report.So far I have the following as a calculated column. 

=RANKX(CustomerTable,SUMX('CustomerTable',[Sales]))

View 2 Replies View Related

Select Customers Who Havnt Made Orders

Sep 14, 2006

Using the northwind database, how do I select the cutomerID of customers who havnt placed an order.

is it something like this?

select Customers.CustomerID
FROM Customers INNER JOIN Orders ON Customers.CustomerID <> Orders.CustomerID

and how can I display the customers who HAVE made orders alongside customers who havnt made orders.

Thanks in advance.

View 6 Replies View Related

Application Will Not Allow Edit Of Existing Data On Certain Customers

Jul 14, 2015

I am using a business management software application that uses SQL Server 2012 for data storage.  The application is one that stores data about the customer, and then displays as requested. On certain customers, once saved, no save of future edits will work.  Once the save button is clicked, there is a momentary hula hoop, followed by nothing. You have to cancel to get out, and then going back you see that the data was not saved. This only happens on certain customers (however, once the problem develops for a certain customer, it is consistent) and newly created customers seem to work fine.  I am thinking that the software app is fine since the save process would be the same each time the button was clicked, so I am thinking its a database problem.

View 10 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

SQL Server 2012 :: Calculate Customers Age And Value By Month And Year?

Sep 22, 2014

What's the best way to calculate a customers age and value by month and year?

I need to be able to calculate customer value by month and year, and then to calculate their age at each month in time. I've found a way of grouping sales by month and year that includes age for a particular contact like this:

select fh.contact_number
, concat(year(fh.transaction_date), '-', month(fh.transaction_date)) as transaction_month_year
, cast(fh.transaction_date as date) as transaction_date
, sum(fh.amount) as ttl_amount_in_month

[Code] .....

It seems to work, but any better way to achieve this?

View 1 Replies View Related

SQL Server 2008 :: Generate Invoice Document For Customers?

Sep 25, 2015

i need to generate documents for customers to sign automatically as sales staff enter their data into SQL. These are invoice style documents. I currently have word templates of the invoice documentation, i just need to be able to add the clients names, address etc into the relevant spaces for them to print off and sign.

I am good with TSQL and writing Stored Procs etc and can easily get the data ready - i just need to find a way to populate the templates in the right places and then save a copy for emailing.

View 9 Replies View Related

Transact SQL :: Retrieve Customers Invoiced Twice Or More In Previous Month

Oct 29, 2015

I am trying to pick up the customers invoiced twice or more within a month. In the case below Pepsi Cola and Jack Daniel were invoiced twice in October. The query need to pickup the previous month, se being in October I need to pick up the invoice of September.

create table #forum (Customer varchar(20),Invoiced date)
insert into #forum values ('Pepsi Cola','2015-09-01') ,('Pepsi Cola','2015-09-06') ,
('Pepsi Cola','2015-10-01') ,('Pepsi Cola','2015-10-02') ,('Pepsi Cola','2015-11-01') ,
('Ferrarelle','2015-09-01') ,('Ferrarelle','2015-10-01') ,('Ferrarelle','2015-11-16') ,('Ferrarelle','2015-11-01') ,
('Jack Daniel','2015-09-01') ,('Jack Daniel','2015-09-04') ,('Jack Daniel','2015-09-06') ,('Jack Daniel','2015-09-30') ,
('Jack Daniel','2015-10-01') ,('Jack Daniel','2015-10-18') ,('Jack Daniel','2015-11-01') ,
('Bud','2015-09-01') ,('Bud','2015-10-01') ,('Bud','2015-11-01')
select * from #forum

View 5 Replies View Related

SQL 2005 Upgrade Options For SBS 2003 Premium Customers

Jan 26, 2007

All,

If this questions is misplaced please forgive me.

I have a customer who has a Win SBS 2003 Premium installation with a Win 2003 Standard member server running SQL 2000 housing a Practice Management App.

The new release of the Practice Management App only runs on SQL 2005.

My question is what are my options for obtaining SQL 2005 in the most cost effective way? The SBS Premium install was not a candidate for the 'free' upgrade to R2. Is there an 'upgrade' release of SQL 2005 for existing SBS Premium customers?

Any information would be greatly appreciated.

Thanks!

Ray

View 1 Replies View Related

SSIS Tutorials: Lesson 1 - Missing Customers.xls File

Nov 28, 2006

I can not seem to locate this file any where on my computer let alone in the specified directory. With out this file, it would be very difficult if not impossible to go through rest of the SSIS tutorials. Could I ftp this file from some locations so I could get started on the tutorials.

I would very much appreciate any help.

Thanks

View 2 Replies View Related

How Are MS Customers Bridging The Parameter Gap When Calling Sqlclr Sps From External Ado Apps?

Sep 14, 2007

we've seen the ease of calling sqlclr stored procedures whose parameters are known sql data types but are wondering what we're in for when we wish to pass .net objects to a sqlclr stored proc. We're confident that the sp's external assembly itself would build if instructed to "receive" .net objects etc, but can't envision how/if the sp's signature would generate nor can we imagine how such an sp would be called. We're not even sure we can envision how another sqlclr object (eg a trigger) would pass .net objects to the sp. Are we faced with using user defined data types if we need to pass .net objects to such sp's?

View 8 Replies View Related

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 View Related

Simple Customers ~ Orders Table Handling Question SQL Express 2005

Dec 13, 2007



I want to refer in a table quotes to customers and itemes from another table.

here is my table list in database:
"Customers"
"PriceList"

I want to create another table which through it I can create qoutes for customers suing a collection of items in PriceList table.

for example I want to be able to create something like this:

Title:
my quote example
QuoteID:
46543
Items (retrieved from PriceList table):
370
474
456
belongsTo (a relation to CustomerID in Cstomers table):
6234876
Discount, Date, WrittenBy, etc.



how many tables do I have to use for it, and what queries I have to write, and do I have to create any special relationships?

regards

View 9 Replies View Related

How To Build A Own Silent Setup Of MS-SQL-Server 2005 Express For Installation On Customers PC ...

Feb 21, 2008

Hi,

I want to build a silent setup/installation of MS-SQL-Server-Express 2005 for installation on customers computers.
I want to integrate it in my own setup/installation routine of my application.
How can I do that?
Where can I get Infos or tutorials? Perhaps here ?

Sorry for my bad english

Regards Tron

View 7 Replies View Related

Need Help W/ Postback To 'Customers' Table On Form Using Select Query From 'Parameters' Table

Dec 20, 2007

I have set up a 'Parameters' table that solely stores all pre-assigned selection values for a webform. I customized a stored query to Select the values from the Parameters table. I set up the webform. The result is that the form1.apsx automatically populates each DropDownList task with the pre-assigned values from the 'Parameters' table (for example, the stored values in the 'Parameters' table 'Home', 'Business', and 'Other'  populate the drop down list for 'Type').
The programming to move the selected data from form1.aspx to a new table in the SQL database perplexes me. If possible, I would like to use the form1.aspx to Postback (or Insert) the "selected" data to a *new* column in a *new* table (such as writing the data to the 'CustomerType' column in the 'Customers' table; I clearly do not want to write back to the 'Parameters' table). Any help to get over this hurdle would be deeply appreciated.

View 1 Replies View Related

Multiple Customers (with Multiple Sql Instances) On 1 Reporting Server

Dec 3, 2007



Hi,

I think this is a question for the specialists among us.

Can I use one general reporting server (installed on instance MAINREPORTING)
for multiple customers who all have their own sql instance (CUST1, CUST2, CUST3, ..)
I would use UserAuthenciation on the reportserver url to display the specific reports customers can use.


Is this possible, and what do i have to take care off concerning installation and/or configuration (especially on
the reporting side) ?

Greetings
Vinnie

View 3 Replies View Related







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