Forum Replies Created

Viewing 11 posts - 1 through 11 (of 11 total)

  • RE: Help with stored procedure

    Your parameter names seem to be different when you build your dynamic SQL.

    @paymentID and @PaymentID are not the same.

  • RE: Joining Tables without PK's

    thegreatsamarth (7/21/2008)


    Either re-design ur Database or jst add Identity columns in each of ur table, so tht u can easily put joins between them.

    I am curious as to how just...

  • RE: Given an employee table( with columns Emp_ID,Emp_Name,Emp_Salary), how would you find out the fifth highest salary?

    GSquared (7/21/2008)


    It depends.

    What if there are ties? Do you want the fifth record, even if there are five ties for highest?

    I think the OP wants to know the fifth...

  • RE: SSIS too slow to insert rows into DB2

    Information you provided in your post is too little for anybody to come up with any meaningful suggestion.

    Having said that, look at the db configuration on DB2 side, check...

  • RE: Deleting Millions of Records

    For large volume of data deletion, I always unload the data to be kept, truncate the table and load the data back. You can reduce your overall time for the...

  • RE: remove spaces more than double

    Try creating a function like the following:

    create function [dbo].[removeMultiSpace] (@cString varchar(300) )

    returns varchar(300)

    as

    BEGIN

    declare @k smallint, @left varchar(300), @right varchar(300)

    select @cString = ltrim(rtrim(@cString))

    ...

  • RE: error getting data from excel

    It has nothin to do with SQL 2005.

    Do the following:

    Open you Excel file

    Goto File -> Properties

    Click on the "Contents" tab

    If you don't see "Sheet1" under Named Ranges, your query...

  • RE: Query on Active/Inactive history table

    Assumption:

    You have an Account_Master table (and may be some other table(s) you need for the report) as follows

    account_id int,

    account_name varchar(100),

    ..

    etc..

    And you want to run a query for the report...

  • RE: Importing from depricated DBs

    Disclaimer:

    I have not worked with Foxpro DB. However, if you can open the dBase files in MS ACCESS, then this solution might work.

    You can put all your dBase files in...

  • RE: Calculating a Percentage

    I would try something like this

    SELECT ClassId, race

    , CASE WHEN SUM(Total) > 0 THEN (SUM(Absent) * 100.00)/SUM(Total) ELSE 0.00 END) as PercentAbsent

    FROM (

    SELECT a.ClassId, s.race,

    ...

  • RE: help with data type and default value

    I would not recommend storing formatted data in the database. If the data elements you are storing are of integer types, you can create a View that right justifies the...

Viewing 11 posts - 1 through 11 (of 11 total)