Forum Replies Created

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

  • RE: Temp Tables

    I agree with subhrajit46.

    If some other session is using the temp table, the temp table is not dropped when the session which created it was closed.

  • RE: several count in same column

    On SQL Sever 2005 you can use PIVOT operator whch is for such purposes.

    DECLARE @temp TABLE

    (

    RowNo int,

    Result char(1)

    )

    INSERT INTO @temp (RowNo, Result)

    SELECT 1, 'C' UNION ALL

    SELECT 2, 'A' UNION ALL

    SELECT...

  • RE: sum-partition over n out of 10 columns

    Hi, it is what you intended?

    select

    salesdate

    ,saleshour

    ,pens

    ,pencils

    ,ISNULL(sum ( CASE WHEN salesHour >= 0 AND salesHour < 12 THEN pens ELSE NULL END)...

  • RE: Bit wise in sql server

    alex2000 (12/15/2009)


    I have about 5 columns with 0,1,-1,-2

    I want recode these values to 0,1,space, space

    I am thinking the bit wise operation but unable to find a mask that recode 0...

  • RE: Output parameter question in stored procedure

    stricknyn (12/14/2009)


    Hi,

    Thanks for your response. Yeah this is what I do to get it working except I just throw values there like this:

    EXEC [dbo].[FinancialMembership] 'Test',2009, 0.0

    My question is more...

  • RE: Output parameter question in stored procedure

    you simply need to add the output parameter in the call, you must provide an output variable to which the outpu should be stored

    DECLARE @output decimal(5,2)

    EXEC [dbo].[FinancialMembership] 'Test',2009, @output OUTPUT

  • RE: Aggregation with every N number of records grouped

    you can use NTILE function with argument equals to CEILING of count of records in the table divided by number specifying number of records in the group.

    WITH NTileTable AS (

    SELECT

    NTile(CONVERT(int,...

  • RE: export data to Excel using OpenRowSet

    If the "Testing" is the name of the sheet in the excel file, you need to name it as "Testing$".

    The names of the sheets needs to be followed by $...

  • RE: Inner joining and removing characters.

    To remove any character or string from within another you can use the REPLACE function

    REPLACE(STREET_addr_l1, '.', '')

    so you will replace the dot by en ampty string and thus removing the...

  • RE: Inserts multiple times with a specific format

    Or you can try using a CROSS JOIN to multiply the inserts and threrefore you will have only one table scan instead of 3 table scans when using the union.

    DECLARE...

  • RE: time difference HELP!!

    I think, you want calculate a time difference between current and previous rows in a table witch is representing eg. some type of log.

    If this is what you intend, you...

  • RE: Import data to Sql 2005 from a remote PC

    tmacdonald (12/10/2009)


    Pavel Pawlowski (12/10/2009)


    If you are able to login to the SQL server machine under the account under which the instance is running, then try to login and try access...

  • RE: Import data to Sql 2005 from a remote PC

    If you are able to login to the SQL server machine under the account under which the instance is running, then try to login and try access the files on...

  • RE: Import data to Sql 2005 from a remote PC

    You have to run the SQL server instance under an account which has access and appropriate rights to the remote PC.

    If you will run it under such account, then...

  • RE: Allow other users to run SELECT while TRANSACTION is being run by one user

    Hi,

    depends on what data you want read and depends on the database settings etc. You should think about correct transaction isolation levels etc.

    But.. If you want you to read uncommitted...

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