Forum Replies Created

Viewing 15 posts - 5,206 through 5,220 (of 10,144 total)

  • RE: Count Rows within a Query

    CassieF (2/11/2013)


    ho hum..

    SQL Server 2000 - 8.00.2039 (intel x86)

    Heh no worries. Try this;

    SELECT

    MarketName,

    COUNT(*)

    FROM (

    SELECT --top 100 percent

    f.FormName,

    m.MarketName

    FROM Form f

    INNER JOIN FormMarkets_Link l

    ON f.FormID =...

  • RE: Count Rows within a Query

    CassieF (2/11/2013)


    oohh phooey, i am on a higher version than that.. 2008R2

    It works fine on 2008R2, that's what I tested the script on. Are you sure that the server you...

  • RE: Count Rows within a Query

    CassieF (2/11/2013)


    thank you, i just tried to execute that and it gave me an incorr syntax error near keyword Over..:doze:

    it also didnt pink out the first [count] so i...

  • RE: Change value of column in last row when doing insert

    sku370870 (2/10/2013)


    DECLARE @LastOne bit = 0

    CREATE TABLE #tblTasks

    (

    TaskID int,

    ...

  • RE: move record

    Ed Wagner (2/11/2013)


    Is this what you're looking for?

    insert into different_table(computername, auditid, auditdate)

    select computername, auditid, auditdate

    from original_table a1

    where auditdate =...

  • RE: Comparing figures based on relative date

    Paul Munter (2/11/2013)


    Thanks for the advice, I was hoping to store it to avoid the computations being done by an application. I like to have as much stored as possible...

  • RE: Count Rows within a Query

    You can have whatever headings you want:

    SELECT [Count] = 1, [Market name] = 'Borough Market'

    What's important is the column content. Can you explain further? Is it something like this?

    SELECT...

  • RE: Comparing figures based on relative date

    Paul Munter (2/11/2013)


    I'd like to be able to write a cursor of similar code which does this dynamically for me based on a data set that I have. So I...

  • RE: Comparing figures based on relative date

    Paul Munter (2/11/2013)


    Exactly like that Chris, yes.

    Cool, it was a lucky guess. Now what do you want to do with it?

  • RE: Comparing figures based on relative date

    Something like this?

    DROP TABLE #mytable

    CREATE TABLE #mytable

    (P_KEY INT IDENTITY(1,1) PRIMARY KEY CLUSTERED,

    LAST_DAY_OF_MONTH DATETIME,...

  • RE: Comparing figures based on relative date

    Hi Paul

    You have rows in your table which have a datetime column. You want to pick some rows which have a "recent" date, from the table. On the same output...

  • RE: Cumulative SUM by HOUR for specific DATE range

    Jason-299789 (2/11/2013)


    Chris,

    I've never seen the recursive CTE method before, and looks like a viable option to the quirky update to a point.

    Hi Jason, it's been subjected to a significant...

  • RE: Cumulative SUM by HOUR for specific DATE range

    lilywhites (2/11/2013)


    ive got over 500 queues and 15 extra data columns to compute also....would those links scale up??

    ive got this running in under 20 seconds....ill look into those other methods

    many...

  • RE: move record

    huy1002 (2/10/2013)


    Master table

    ComputerName. AuditId. AuditDate.

    A. 111. 1/1/13

    A. 222. 2/1/13

    A. 000. 2/1/13

    B. 111. 1/1/13

    C. 000. 1/1/13

    C. 111. 2/1/13

    AuditId equals to zero telling no vulnerability found on that day scan.

    I need...

  • RE: Cumulative SUM by HOUR for specific DATE range

    Jason-299789 (2/11/2013)


    You might wnat to revisit the code, I would suggest reading this article http://www.sqlservercentral.com/articles/T-SQL/61539/ and then look at a turning this into a Quirky update for the Running total,...

Viewing 15 posts - 5,206 through 5,220 (of 10,144 total)