Quantcast
Channel: Questions in topic: "distinct"
Browsing all 38 articles
Browse latest View live
↧

Case or If/Then Statement

I need to build a temp table and as it is being built I'm running into problems identifying uniqueness. I have a list of customers with the PK would be Acct and Mstr_Acct ACCT # Master ACCT Grouping 1...

View Article


Basics question - Needs results to show distinct clients

V basic question I would like to ask: I have a list of clients with contract information in my 2008 express database. I am importing this information into map point but at the moment my results show...

View Article


Get 1 row out of "almost" duplicate rows

Key datecolumn chkcol 112 2011-06-09 13:44:21:963 A 112 2011-06-09 13:44:21:963 B 114 2011-06-10 11:23:11:212 A 115 2011-06-09 09:12:32:576 A 116 2011-06-09 02:14:11:111 A 117 2011-06-03 12:32:29:218 C...

View Article

Select Distinct Record

Dear Guru, How do I write a script in order to get the latest record belonging to a same customer (if record is more than 1 or equal 1) as there are additional condition on the **status** and **time**....

View Article

Distinct sums of case statements

This has stumped me. Not sure how to get a distinct sum inside a case statement. Here's a sample of my data in the two fields (I'm actually doing this for a year but just 2 months here for easier...

View Article


stored procedure select data if change in column

I have a stored procedure that does a select statement from my table and displays data about the database growth.The stored procedure is part of a scheduled job that runs every night. For example it...

View Article

count several thing

I am new to Sql, please help me I have Table with underwriting requests, its about 100 columns, but to simplify: Underwriting_Team(dubai or texas) | Pending_since (dd/mm/yyyy) | Prospect_or_not (0or 1)...

View Article

count distinct number from only one source

I have a orders table which has order number and where the order is generated from. The order number field has duplicate records and the source field can be from multiple files. I want to count...

View Article


How to return mismatched rows from two tables?

I have created two tables in the same database as below which gives the row count of tables across all databases before and after an DB restore operation. CREATE TABLE before_restore ( db_name...

View Article


Union not returning desired results

Three tables, TblA has Name data, TblB Amounts and TblC dates. I need names that have: dates for specific criteria and the date (if any) and those with an amount for a specific criteria and the amount...

View Article

Not getting Distinct column as max date.

Can you see what is wrong with this query. or how to get only one Lookupid list I get multiple same lookup id in output. select V_CONSTITUENT.LOOKUPID , V_CONSTITUENT.NAME as ConstituentName ,...

View Article

Distinct count of values which are displayed in two columns in SSAS

Hi, How is it possible to get distinct count of two columns in fact table, meaning how many different appearances are in both columns. Please note I DO NOT mean distinct count on the concatenated...

View Article

Case or If/Then Statement

I need to build a temp table and as it is being built I'm running into problems identifying uniqueness. I have a list of customers with the PK would be Acct and Mstr_Acct ACCT # Master ACCT Grouping 1...

View Article


Basics question - Needs results to show distinct clients

V basic question I would like to ask: I have a list of clients with contract information in my 2008 express database. I am importing this information into map point but at the moment my results show...

View Article

Get 1 row out of "almost" duplicate rows

Key datecolumn chkcol 112 2011-06-09 13:44:21:963 A 112 2011-06-09 13:44:21:963 B 114 2011-06-10 11:23:11:212 A 115 2011-06-09 09:12:32:576 A 116 2011-06-09 02:14:11:111 A 117 2011-06-03 12:32:29:218 C...

View Article


SQL Union Operator

Hi, Here is the example query. Query1: Select supp_addr_addid 'billtoaddid' from supp_addr_address(nolock), supp_bu_suplmain (nolock) where supp_addr_supcode = supp_bu_supcode and supp_addr_supcode =...

View Article

Select Distinct Record

Dear Guru, How do I write a script in order to get the latest record belonging to a same customer (if record is more than 1 or equal 1) as there are additional condition on the **status** and **time**....

View Article


Distinct sums of case statements

This has stumped me. Not sure how to get a distinct sum inside a case statement. Here's a sample of my data in the two fields (I'm actually doing this for a year but just 2 months here for easier...

View Article

stored procedure select data if change in column

I have a stored procedure that does a select statement from my table and displays data about the database growth.The stored procedure is part of a scheduled job that runs every night. For example it...

View Article

count several thing

I am new to Sql, please help me I have Table with underwriting requests, its about 100 columns, but to simplify: Underwriting_Team(dubai or texas) | Pending_since (dd/mm/yyyy) | Prospect_or_not (0or 1)...

View Article
Browsing all 38 articles
Browse latest View live