Viewing 15 posts - 331 through 345 (of 429 total)
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.
June 21, 2005 at 10:20 am
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...
June 21, 2005 at 9:31 am
No Michael. If it does'n match any I would return no rows or a message no match
June 21, 2005 at 9:05 am
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...
June 21, 2005 at 9:04 am
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...
June 21, 2005 at 8:39 am
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...
June 21, 2005 at 8:29 am
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...
June 20, 2005 at 7:40 am
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,...
June 17, 2005 at 2:34 pm
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],...
June 17, 2005 at 11:51 am
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....
June 17, 2005 at 11:36 am
Sorry I was away. Like Mike mentioned once the people who gives pay-check wants me also to work. Now all answered.
June 16, 2005 at 2:43 pm
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...
June 16, 2005 at 10:35 am
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
June 16, 2005 at 10:13 am
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...
June 16, 2005 at 10:04 am
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' ].]...
June 16, 2005 at 9:57 am
Viewing 15 posts - 331 through 345 (of 429 total)