Viewing 15 posts - 16 through 30 (of 32 total)
Rob, your join is not considering the page number. you should probably include the page in the join.
Michele, your final query pulls all the records of the matching page.. but...
April 26, 2005 at 10:08 pm
Slackr,
You may create a word matching function as below and use the count of words matching to join the tables.
alter function Matching_Words_Count(@s1 varchar(1000), @s2 varchar(1000))
Returns int
Begin
Declare @word varchar(50)
Declare @ctr...
April 26, 2005 at 8:20 pm
Here's a simpler one:
select distinct e1.emp_id
from #emp e1 INNER JOIN #emp e2
on e1.emp_id = e2.emp_id and datediff(d,e1.date,e2.date) between 0 and 4
Where e2.date>=e1.date
group by e1.emp_id,e1.date
having sum(Case e2.met When 1...
April 26, 2005 at 8:39 am
Am assuming that the column names will be the same in both the new and old tables. You can use the below query then:
Declare @updateSQL varchar(1000)
Set @updateSQL = 'Update Table1...
April 26, 2005 at 2:59 am
Hi, you cannot do it without the help of functions..
My answer:
create function return_friends (@id int )
returns varchar(100)
begin
declare @f varchar(100)
set @f=''
select @f= @f+friend+',' from TableFriends where id=@id
Return left(@f,len(@f)-1)
end
create...
April 23, 2005 at 9:11 pm
Hi guys,
sorry for the late response. many of you have expressed concern on the cartesian join (CROS JOIN).. my only intension was to achive the desired result. CROSS JOIN is...
April 21, 2005 at 8:19 pm
yes i do..
If I follow the steps below I can translate to chinese characters:
>Open excel
>Open the text file and when it prompts for encoding type to be applied for...
April 20, 2005 at 11:35 pm
Hi friend, tried that but the funny characters are not getting changed.
April 20, 2005 at 8:11 pm
Hi guys,
Try this one (simplified version):
select x.group1,x.group2,x.xref,sum(d.value1), sum(d.value2) from
(select distinct group1,group2,x.xref from @xref x,@data d) as X
LEFT OUTER JOIN @data d
on x.[group1] = d.[group1] and...
April 20, 2005 at 8:05 pm
Thanks friend.
Since the user will just copy the data from Excel and paste in the text area, each line will be separated by chr(13) or chr(10) and so i replace...
March 29, 2005 at 6:02 pm
thanks, but what am looking for is slightly different from the solutions you have given.
background:
my asp pg has a textarea, where in user will input a large amount of data...
March 29, 2005 at 4:01 am
Hi,
You can try this solution
Declare @longStr varchar(5000)
Set @longStr=''
Select @longStr=@longStr + col1+'~'+col1+'~'+col2+'~'+...+colN+'$'
From Orders
But this string may get truncated if your rowsize increases.
-Hari
January 30, 2005 at 8:53 pm
Hi Sam,
You can achieve the same by using the below query:
DECLARE @col_list varchar(1000)
Select @col_list = ''
Select @col_list =@col_list+ ([TABLE_NAME]+'.'+[COLUMN_NAME])+',' from INFORMATION_SCHEMA.COLUMNS
where table_name IN ('Table1','Table2')
Select @col_list = LEFT(@COL_LIST,LEN(@COL_LIST)-1)
print @col_list
Select @col_list...
January 27, 2005 at 3:29 am
Viewing 15 posts - 16 through 30 (of 32 total)