Forum Replies Created

Viewing 15 posts - 16 through 30 (of 217 total)

  • RE: Help with CASE statement in my query

    Those dates are billing dates...I need to find data between those dates to make sure they fall in that billing period...

    Thanks!

  • RE: Help with CASE statement in my query

    It is an ugly query...I know

    What I need to do is, for every year in the temp table, I need to add a filter to the query. For example, if...

  • RE: truncating text

    It's just a simple search, like one or 2 search terms...for example "race car", or "gasoline", "volcano", "space shuttle", etc....nothing fancy like using ANDs, ORs, etc...

    Thanks!

  • RE: ASC and DESC in dynamic ORDER BY clause

    I'm not sure if this would work...does this use ASC or DESC?

    Thanks!

  • RE: cursor performance

    Oh ok, I see, that makes sense

    Thanks for all the help!

  • RE: cursor performance

    Oh ok, so I should just replace the cursors with statements like Imu92 suggested above? How would that work when I need to insert a new variable value into...

  • RE: cursor performance

    Here is one block of code containing multiple cursors.

    /*Variable declarations*/

    DECLARE @newpatientID uniqueidentifier

    DECLARE @newfileID NVARCHAR(50)

    DECLARE @newLinkID NVARCHAR(50)

    DECLARE @fileID NVARCHAR(50)

    DECLARE @linkID NVARCHAR(50)

    DECLARE @tempprocedureID UNIQUEIDENTIFIER

    DECLARE @parentfileID NVARCHAR(50)

    DECLARE @childfileID NVARCHAR(50)

    DECLARE @orderID INT

    DECLARE...

  • RE: cursors and order by

    I think I misunderstood how cursors work...

    I figured if I used a SELECT statement and ORDER BY clause with the cursor to populate tmpTable, that the table would appear in...

  • RE: cursors and order by

    Using an order by clause on the newly populated table will not work because there is nothing unique about the data. That's why I was hoping the cursor...

  • RE: cursors and order by

    Yeah, I did that...and the order was not the same.

    I was under the impression that it would be...

    Thanks!

  • RE: cursors and order by

    But it didn't order the data according to my ORDER BY clause...that's why I'm confused.

    When I run the cursor, and then check the table, it is not in...

  • RE: cursors and order by

    Here is my table

    /****** Object: Table [dbo].[XMLmodelMap] Script Date: 12/15/2009 10:55:21 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    CREATE TABLE [dbo].[XMLmodelMap](

    [sessionID] [nvarchar](128) NOT NULL,

    [oldModelID] [uniqueidentifier] NOT NULL,

    [newModelID] [uniqueidentifier] NOT...

  • RE: cursors and order by

    Well if I do this query:

    SELECT machineID, machineType FROM machinema A

    LEFT JOIN modelma B ON B.startmachine = A.machineID

    WHERE A.modelID = @modelID

    ORDER BY startmachine DESC

    it is in the order I need....

  • RE: SELECT and REPLACE query

    Oh Im sorry, for oldIp I actually meant something like this:

    UPDATE myTable

    SET linkURL = REPLACE(linkURL, '192.49.42.39', '192.49.21.44')

  • RE: SELECT and REPLACE query

    Hi guys, thanks for the suggestions!

    Would something as simple as this work?

    UPDATE myTable

    SET linkURL = REPLACE(linkURL, 'oldIP', 'newIP')

    Thanks!

Viewing 15 posts - 16 through 30 (of 217 total)