Forum Replies Created

Viewing 15 posts - 241 through 255 (of 1,156 total)

  • RE: Inconsistent Row Order?

    something like this.

    SELECT Shapefile_Cand.oid AS coid, Shapefile.oid AS nextcoid, Shapefile.ux, Shapefile.uy,

    dbo.VectorDistance(@x, @y, Shapefile.x1, Shapefile.y1, Shapefile.x2, Shapefile.y2, Shapefile.vx, Shapefile.vy) AS distance

    FROM Shapefile_Cand

    INNER JOIN...

  • RE: Inconsistent Row Order?

    You could add the row_number function to your @coids.nodes. Then you can order by coids.rowNumber asc, in the outer query.

  • RE: X Highest Price........

    Misspelled word above.

    **clarifying

  • RE: X Highest Price........

    So very true. Dense_Rank fits the OP needs much better than rank in this particular scenario. Thanks for posting the samples and clarying your position. 🙂

  • RE: What are differnt reasons by which server be shut down

    IT guy trips over the power cord?

    🙂

    Funny, but true... 🙂

  • RE: What are differnt reasons by which server be shut down

    How and why the server goes down (in what cases). I mean if we have run out of space in disk , any others reason and suggestions are welcome... ...

  • RE: SQL Service Account

    touche friend. I just didnt want the OP to make the change and leave it like that.

  • RE: SQL Service Account

    Check the rights on the machine for the new account.

    Might need to give it more rights. Quick check is to add it to the local admin group on the...

  • RE: SQL Service Account

    You should be weary of ever changing any service account through any means other than SQL Configuration Manager, this includes the Windows services menu. SQL Configuration Manager does a...

  • RE: to know where the database is?

    I actually read the post wrong. You code above gives you the dbid for a database name. Not vice-versa.

    You should use SELECT DB_Name(MyDbId), which Adam Bean already posted.

  • RE: to know where the database is?

    SELECT DB_ID('MyDbName')

  • RE: Creating matrix via TSQL

    You can use cross apply to join the tables together. See below.

    declare @t TABLE(

    id int identity(1,1),

    col1 varchar(10)

    )

    insert into @t (col1)

    select 'test1' union all

    select 'test2' union all

    select 'test3'

    select *

    from @t...

  • RE: X Highest Price........

    Using ROW_NUMBER in this case makes the query more complicated than it needs to be because Row_Number does not incorporate ties. You should use the rank function. This...

  • RE: Weird results from SQL.

    Perfectly said RBarryYoung 🙂

  • RE: Help

    If you stored procedure executes fine in SSMS, there is no reason it will not do so in SSRS. You need to make sure your SSRS dataset is pointing...

Viewing 15 posts - 241 through 255 (of 1,156 total)