Viewing 15 posts - 61 through 75 (of 1,081 total)
If my script doesn't work then one of the columns you are referencing is not in the table that it should be.
As requested above could you post the DDL please
EDIT:
Could...
June 17, 2009 at 6:21 am
i is the alias for your table it makes the code neater than rewriting the whole name of the table.
Sorry it's bad alias but you can change it if you...
June 17, 2009 at 6:17 am
try this:
UPDATE isd
SET [rstatus*] = i.[rstatus*]
FROM dbo_ISD_Lease isd
LEFT JOIN [dbo_Remedy Import] i ON isd.spconcat = i.rconcat
WHERE isd.[rstatus*] != i.[rstatus*]
edit:
YOU MIGHT WANT TO PUT AN INNER JOIN THERE
June 17, 2009 at 5:51 am
Funny you say that.
Very often, using an IN or an EXISTS will out perform a JOIN (NOT ALWAYS).
It's just something that needs to be tested and retried I guess.
The CTE...
June 17, 2009 at 5:43 am
That will happen only if there is a manual insert in the Identity column. For example, if i'm working in mumbai today and in Pune tmr, the identity value will...
June 17, 2009 at 5:40 am
HEre is an example of what I mean:
create table employee
(empno int,
name varchar(100),
Office varchar(100))
create table Posting
(
ser int,
empno int,
office varchar(100),
startdate datetime
)
Insert into employee
select 1,'pradeep','mumbai'
union
select 2,'kumar','pune'
union
select 3, 'singh','bangalore'
insert into posting
select 1,1,'delhi',...
June 17, 2009 at 5:32 am
My other concern is that using the MAX on the "Identity" of the postings table is prob not a good idea as this does not mean 100% that you gonna...
June 17, 2009 at 5:27 am
Not sure that it is redundant because if he wants to know the office where the actually employee comes from rather than the office where the post was made, then...
June 17, 2009 at 5:24 am
Why is there an Office field in both tables?
Did you want the office from the employee or from the posting returned?
June 17, 2009 at 5:18 am
Have a look at the following on BOL.
GROUP BY AND MAX
and then the left join or inner depending on if you want to show empno with no postiings
June 17, 2009 at 4:53 am
works for me
CREATE TABLE Table_Text
(Col1 TEXT)
INSERT INTO Table_Text
SELECT 'http://www.blabla.com/tx/chrts/nln_lstngs/cnrg_ntrm-eng.html'
select
patindex('http://www.blabla.com/tx/chrts/nln_lstngs/cnrg_ntrm-eng.html', col1), col1
from Table_Text
where col1 LIKE '%http://www.blabla.com/tx/chrts/nln_lstngs/cnrg_ntrm-eng.html%'
EDIT:
However if your text is something like this
'http://www.blabla.com/tx/chrts/nln_lstngs/cnrg_ntrm-eng.html And there is the URL'
Then...
June 16, 2009 at 10:17 am
can't you use the ".Write" method of a text column in an update statement to update/replace text?
EDIT: sorry that method is for nVARCHAR(MAX)
June 16, 2009 at 9:58 am
sqluser (6/12/2009)
Hi,test the date
DECLARE @test-2 int
SET @test-2 = 1000.00000
SELECT STR(@Test,5,2)
what happened?
ARUN SAS
you need to change the length 7 instead of 5.[/quote]
I don't think that...
June 12, 2009 at 6:18 am
The reason the test code is always coming out as 10 is cause the variable is declared as an INT.
The reason your origianl query didn't work was because of syntax,...
June 12, 2009 at 5:28 am
Viewing 15 posts - 61 through 75 (of 1,081 total)