What am I doing wrong?
I tried this and now it is giving me one result but just the top one. The else statement is not picking it up.
ALTER procedure [dbo].[TestDDS]--'s0b'
@doc varchar(3)
as
DECLARE @ddsgroup varchar(3)
SELECT @ddsgroup = DDSGroup FROM NatDocFile2 where doc = @doc
if...
I don't know why I'm receiving different counts:
This query gives me a count of 16 records that are over 300
Select p.doc,
COUNT(distinct CASE WHEN Datediff(DAY, filedate, Getdate()) > 250 THEN clms END) AS [250],
COUNT(distinct CASE WHEN Datediff(DAY, filedate, Getdate()) > 300 THEN...
How can I add this to the case statement of the query or just to the query to check...
If fileddate <> filedate then use the min filedate and place in the title field the word 'concurr' for the one record.
I have this query doing it already but it does it for filedates matching.
Select...
Here's some table information
This query:
SELECT
doc,
COUNT(*) AS cnt
FROM
(
Select
doc
FROM testpend p
Group By
doc, clms ) AS T
GROUP BY
doc
Produces this:
doc cnt
S0L 3
S11 2
S23 2
This query:
select...
The way this stored procdure is set up it produces this:
doc cnt
S09 1
S09 2
S09 9
S09 51
S0B 1
S0B 4
S0B 16
S0B 57
How do I change it to give me results as this?
Doc 250 300 350 400
S09 1 2 9 51
S0B 1 4...
My export to excel works fine but now I'm trying to remove the hyperlink when it exports to excel. Here's the info:
Protected Sub BtnExportExcel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
Response.Clear()
Response.Buffer = True...
If you are in session(DMXXX) I want you to have access to the row with links of 230, 243, 247. This person is in district 230 and oversees offices 243 and 247 so when you come on this page I want the person to have links. I have a querystring with dist so this one would come over as dist="230"...
How do I find out the count of the underlined items. For instance which row and cell.
State TotPend PendnFO PendnDDS
MD 80 256 782
Area1 102 148 256
456 22 16 25
876 15 29 32
Is the underline row 3 and cell 1? I'm...
How do I join these two queries into one query?
SELECT t.fo, ISNULL(COUNT(distinct t.cos), 0)AS pendinfo1
FROM t16pendall t
WHERE (mft_POSN1_CD in('b','d') or (MFT_POSN1_CD='a' and aged_alien_rsw='y'))
and t.cos not in (select cos from t16pendmvt)
GROUP BY t.fo
union...
How can I not allow the form to go through if the user selects "other" from the DDL and not enter in something in the textbox to describe other:
How did you hear about us:
<asp:RadioButtonList ID="RadionButtonList1" runat="server">
<asp:ListItem>Newpaper...
I have security on my page and want to use sessions to grant access.
On the index.aspx.vb page I have
Session("FO") =Data1.OfficeCode (my validation to get the FO)
Session("Pos") = Data1.FnCode (my validation to get the Pos)
Region FO >300 DDS >300 FO & DDS 250 - 300
PHI 626...
Could someone help me make this data
Sort rpt apr pcnt apr icnt may pcnt may icnt
1 2 22.6 182866 23.4 152619
A 2 27.2 182866 23.4 65336
B 2 20.5 76509 27.4 69989
C 2 13.5 38917 13.5 34850
D...
I want to count the distinct cos.
This works just want to know if there is a way to put distinct and count together?
SELECT distinct m.cos, t.fo, Isnull(COUNT(m.cos), 0) AS penddds300
FROM t16pendmvt m JOIN t16pendall t ON m.cossn = t.cos
WHERE ( mvt_typ = 'R' ) AND (mvt_loc LIKE...
How do I write this?
if max(juris_mvt_seq_num) and org_id in the t2juristest table not like 'p%' then use the org_id1 in the t2dibtest2 table where
max(dib_mvt_seq_num) to determine the location.
I got this to get the max(juris_mvt_seq_num) from the t2juristest table:
select...
In my table (T16) I have a column called FLG_CDT char(8) so the date in that column appears as 20100930
I want to change the date to appear as 9/30/2010 12:00:00 AM
I've added a Data Flow Derived column
In the Derived Column I selected replace FLG_CDT
What do I put in the Expression field...
We are not going to use our DTS 2000 packages anymore so now I need to connect to the DB2 Files (that are in the DTS 2000 Package) from connection manager in SSIS 2005.
I opened the DTS package in SQL 2005 which is called T16Pend. I opened the DTS 2000 Package Designer and clicked on the arrow...
In this table, if Clm and cos have the same numbers and Title = T16 and the other is T2 I want their titles to be called Concurr (this table is what I want the stored procedure to create)
Doc Clm Cos FileDate Rcpt Title
S66 454442 454442 06/03/2010 06/11/2010 Concurr...
Hi could someone explain to me this sub query. The first select station is what I don't really understand why set it up this way?
Select n.doc, ISNULL(PendinDDS,0) as PendinDDS
from Nation n
Left Join
(Select t.Doc, ISNULL(Count(T.cossn), )) AS PendinDDS
From (select max(SeqNum) as SeqNum...
How could I write a stored procedure to get the percentages from dynamic columns and insert all of that into a new table? This table would grow once a month so Dec would be added next and so on. I would want to have all of the percentages for each month listed. So that column could be called...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.