Viewing 15 posts - 1 through 15 (of 16 total)
mmm I was thinking too hard...u're absolutely right...
I thought there is a specific key syntax for slicing the data, like 'union' ....
thank you very much for your answer
January 9, 2007 at 2:27 am
thanks guys for all your response...
In some case, the requirements need to view data like that, I mean to view data where contains a key word.
Such as, I want to...
November 9, 2006 at 6:49 pm
thanks for ur response....
so, union is better than "where condition using OR operator" ?
November 7, 2006 at 11:29 pm
try to read transaction locking in BOL...
I think the best is to use "set transaction isolation level read committed" in your query
March 28, 2006 at 7:14 pm
suppose you want to delete file test.txt in directory c:\tes.txt, so just copy this code :
exec master..xp_cmdshell 'del C:\tes.txt'
xp_cmdshell --> this command is used to do any operation data like...
March 28, 2006 at 7:01 pm
try this ....
declare @name sysname
set @name = 'yourUserDB'
select * from dbo.sysobjects
where uid = (select uid from master.dbo.sysusers
where name like @name)
cheers......
alexia
March 22, 2006 at 7:17 pm
The easiest ways is to query from Query Analyzer, with first connect to the server you want to query data.
The other ways, is to add linked server in your master...
March 22, 2006 at 7:04 pm
try this one :
declare @colA varchar(50),@colB varchar(50),@colC varchar(50)
select @colA=colA,@colB=colB,@colC=colC from tblX
where id = '1' -- this is the one that you want to get the data from
update tblX
set...
March 16, 2006 at 2:59 am
you should make the parameter input like this from the application code : '''101''','''103''','''105'''
then, create a stored procedure to update using "IN" clause..
create procedure procA (@inputParameter varchar(255))
as
begin
March 16, 2006 at 2:53 am
thanks guys...for all your inputs...
I think I prefer "distinct" to remove duplicate records...but when I need to count or do some aggregate...
March 14, 2006 at 6:28 pm
You should use stored procedure
for example:
create procedure getData
(@dateBegin datetime,@dateEnd datetime)
as
begin
select name,address,birthdaydate from tblX
where birthdaydate between @dateBegin and @dateEnd
end
execute getData '1980-01-01','1981-01-01')
March 10, 2006 at 12:52 am
You could use this SP
This SP is paging 20 rows per page...if you want to change how many rows in one page, just change the number '20' in this SP...
March 2, 2006 at 6:36 pm
Try this :
USE NorthWind
CREATE PROC GetRegions_XML
@empdata text
AS
begin
DECLARE @hDoc int
DECLARE @tbl TABLE(state VARCHAR(20))
exec sp_xml_preparedocument @hDoc OUTPUT, @empdata
INSERT @tbl
SELECT StateName
FROM OPENXML(@hDoc, 'root/States')
WITH (StateName VARCHAR(20))
EXEC sp_xml_removedocument @hDoc
SELECT...
February 21, 2006 at 11:31 pm
maybe you could try like this in your SP or query:
create table #temp(@field1 int,@field2 varchar(10))
insert into #temp
select a,b from tableFrom
select * from #a
then, when you're not using the...
February 21, 2006 at 8:33 pm
Viewing 15 posts - 1 through 15 (of 16 total)