Viewing 15 posts - 76 through 90 (of 93 total)
Use master
select name,filename from sysdatabases
May 23, 2007 at 2:42 pm
Starnge..Its working fine in 2000 when i tried. can you try running the query again?
The code i tried is
Declare @NAMEX varchar(100)
Set @NAMEX = 'S'
Select @NAMEX = @NAMEX +...
May 23, 2007 at 1:17 pm
Which version of SQL you are using? I just tried your query now in SQL 2000 and working fine.
May 23, 2007 at 1:13 pm
Create a temp table with columns:
Category , Apple, banana , peas
Insert distinct categories in to the temp table.
then loop thru the original table to update temp table inside the loop.
eg:
If Diagnosis='Apple'
update...
May 18, 2007 at 3:19 pm
Here goes the script for you!!
--- I have created TestDuplicates table for testing the script...
create table TestDuplicates (Col1 int,Col2 varchar(100),Col3 int)
Insert into TestDuplicates values(1,'a',1)
Insert into TestDuplicates values(2,'b',2)
Insert into TestDuplicates values(2,'b',2)
Insert...
May 18, 2007 at 1:06 pm
Here goes the Full Script for you..
-- I have created TestInv for testing the script..you have to use the table you are refering in the question.
create table TestInv (itemcode int,itemname...
May 18, 2007 at 12:41 pm
You can use a cursor to select invoice no,itemcode with group by and having count of item invoiced >1. If the criteria satisfies the display like invoice no,itemcode,1 (You can...
May 18, 2007 at 12:12 pm
Create another table with same columns + 1 additional auto increment column.
Now after transfering the data in to the new table, you can get the max of identity column for...
May 18, 2007 at 11:58 am
Sorry David.. I was referring to the query you sent.
SELECT
Filename
FROM
(
SELECT LTRIM(RTRIM(SUBSTRING(DIRINFO,39,LEN(DIRINFO)-38))) FileName, DirInfo FROM Reports
WHERE ISDATE(SUBSTRING(DirInfo, 1, 10)) <> 0 AND SUBSTRING(DIRINFO,25,5)<>'<DIR>'
)
WHERE
SUBSTRING(DirInfo, 1, 10)< @dtDiff
May 11, 2007 at 12:22 pm
David,
Even the Second query you sent throwing the same error. Thanks a lot for your help. for now, I am going with work around as i said in my last...
May 11, 2007 at 10:14 am
David,
AS workaround i am changing the code to make it work as below. Now this is owrking in 2005.
But let me know if any other better...
May 11, 2007 at 9:55 am
David,
Data is the same in both the cases, i mean in 2000 and 2005. and when i compare with
"SUBSTRING(DirInfo, 1, 10)< @dtDiff" this is failing in 2005.
May 11, 2007 at 9:48 am
Hope the following works. I have Hard coded @CID as set @CID ='0001,0004' inside proc which can be removed in your original proc.
---------------------------------------
create
May 11, 2007 at 9:43 am
Ben, Thanks for the reply. i can use cursor to loop thru all DB's.But all i want the info in the format specified above. usage of temp tables is permitted....
May 9, 2007 at 11:41 am
Viewing 15 posts - 76 through 90 (of 93 total)