Forum Replies Created

Viewing 15 posts - 331 through 345 (of 429 total)

  • RE: Matching Values

    I would be happy to make if it takes only 3 Loops in Client side. I cannot think of that logic. Can you help on this.

  • RE: Matching Values

    Remi that we have to handle our selves.

    Try to find a match with only one value if not then with combinations of 2 then combinations of 3 ... When we...

  • RE: Matching Values

    No Michael. If it does'n match any I would return no rows or a message no match

  • RE: Matching Values

    Remi I told the requester for 20 we will have 999, 999, 999, 999, 999, 999, 99 combinations. I just made this and displayed how long it takes to go...

  • RE: Matching Values

    noeld

    I thought  of that. But I thought if I can get a logic to get combinations of ID's(After getting the values into a table variable with IDENTITY col) then I can use IN...

  • RE: Matching Values

    It is not prefixed number of values. It can be any number of values. As I mentioned It will be 20 or more.

    Added

    If there is a solution for...

  • RE: Query Help .NET

    Query will fail unless all columns listed in select are not in group by. You wouldn't be getting anything but an error

    SELECT Company.CompanyID, Company.CompanyName, Product.ModelName, Product.ProductImage, Product.ProductDescription

    FROM Company INNER JOIN

    Product...

  • RE: Max of date from multiple columns

    4th or 5th column can be easily added

    SELECT TOP 1 myVersion, MAX(myDate) FROM

    (

    SELECT myVersion, LastDateA myDate FROM @MyTable -- WHERE CRITERIA

    UNION

    SELECT myVersion, LastDateB FROM @MyTable -- WHERE CRITERIA

    UNION

    SELECT myVersion,...

  • RE: Increment Column

    DECLARE @Table_1 TABLE

    (

    CODE  VARCHAR(10),

    [DESCRIPTION] VARCHAR(100)

    )

    INSERT INTO @Table_1 VALUES('03354718', 'FIRST_DESCRIPTION')

    INSERT INTO @Table_1 VALUES('54654654', 'SECOND_DESCRIPTION')

    INSERT INTO @Table_1 VALUES('62173620', 'THIRD_DESCRIPTION')

    INSERT INTO @Table_1 VALUES('62173622', 'FOURTH_DESCRIPTION')

    INSERT INTO @Table_1 VALUES('62173624', 'FIFTH_DESCRIPTION')

    INSERT INTO @Table_1 VALUES('62173626', 'SEVENTH_DESCRIPTION')

    SELECT A.CODE, MIN(A.[DESCRIPTION]) [DESCRIPTION],...

  • RE: Remove Column

    You must be carefull on select * from TableName is used in the stored procedures. If you have DB Aritison it can search for any string in the meta data....

  • RE: getting column names for table using query

    Sorry I was away. Like Mike mentioned once the people who gives pay-check wants me also to work. Now all answered.

  • RE: getting column names for table using query

    Grids will be easy to cut and paste. One problem is you will not get column names as headings. Easy way is make TAB delimitted you get data and headings...

  • RE: Merging Tables

    Check the results before you insert

    INSERT INTO Database1.dbo.Account (Cols) Values

    SELECT * FROM

    (

    SELECT COALESCE(DB1.Account, DB2.Account + 'OLD') Account,

     DB2.account_num,

     DB2.RestOftheColumns

    FROM

     Database2.dbo.Account DB2

    LEFT OUTER JOIN

     Database1.dbo.Account DB1

    ON

     DB2.account = DB21.account AND

     DB2.account_num = DB21.account_num) Results

  • RE: getting column names for table using query

    Sridhar if that is your sole reason use Query Analyser.

    Use Tools=>Options=>results and Make results TAB delimited. Make Results Target to text.

    Then Execute

    SELECT * FROM TableName WHERE 1 = 2.

    Copy...

  • RE: Unusal Rounding when importing data from csv with OpenRowset

    Open rowset is used to get data from a datasource. If I understood correct you have a csv file. So just use

    BULK INSERT [ [ 'database_name'.] [ 'owner' ].]...

Viewing 15 posts - 331 through 345 (of 429 total)