Assuming your Resource Table name is Resources and the PK of it is ResID,another column is "Name"; the Query is:
SELECT BuildCats.Name AS Category, Buildings.Name AS Name,RR.Name as [Round Resource Name],PR.Name as [Prod Resource Name]
FROM Buildings
INNER JOIN BuildCats ON...
If I understand rightly you want your result of query as
colums ThreadID, ThreadName and ConcatedMsg. But by no query you can do this. So if you only want ThreadID and ThreadName then following query will do it,
select ThreadID, TheadName from Threads where ThreadID in(select ThreadID from...
see books online for details.
sp_addlinkedserver (T-SQL)
Creates a linked server, which allows access to distributed, heterogeneous queries against OLE DB data sources. After creating a linked server with sp_addlinkedserver, this server can then execute distributed queries. If the linked server...
Here someway to solve this.
DECLARE @stime smalldatetime --office start date time
DECLARE @etime smalldatetime --office end time
DECLARE @timeh smalldatetime --variable
DECLARE @inc int --office increment
DECLARE @today smalldatetime --today
DECLARE @maxcol int --maximum headers
declare...
To configure a mail profile
Logon to the Microsoft® Windows NT® server specifying the name and password used to start SQL Server services for that server.
Create and configure or copy an existing mail profile by clicking on the Mail icon in Control Panel. Select the appropriate mail service...
what you have to do is using a dianamic sql.
its simple.
e.g. we have a table t1 with whatever columns it has.
declare @strSql varchar(1000)--whatever size you feel suitable
declare @tName varchar(100)
set @tName='d1' --here I assign it you may pass it as parameter to a sp where you do this...
I need to know the datatype of your field. I guess it is char datatype. If you use char data but want to enter variable length data the remaining space is filled by space. So if u sure ur data will be variable char then u should use varchar.
My assumption may be wrong. In that case excuse me.
see details in SQL server Books online about the following stored procedure
xp_findnextmsg
xp_readmail
i)by first proc u can find the id of undread msg.
ii)then u have to pass the id to the second proc.
thus you can find the subject.
iii) just test the subject and do whatever action
iv)do all...
You cannot use stored procedure in this way. If u had function then u could. SQL server 2000 introduces functions.
But I think, if I know what u actually want to do I can give u a suggestion. I mean actually what should be the return value of SP.
your have to make a string and then execute it.
say u declare:
varchar @strSql(200)--length is as you think should be
set @strSql='Create Table ' + @ServerLocationString +'(field1 varchar(100))'
execute(@strSql)
N.B. thus u can execute any dynamic SQL
In two way you get the solutions from wherever you called the stored procedure.
In any case you have to pass the starting row no say S and the no of rows N and you are trying to retrieve data from Table X. (You should have a ID field must; i.e. a PK)
Way 1: if your starting record is 1 then...
In two way you get the solutions from wherever you called the stored procedure.
In any case you have to pass the starting row no say S and the no of rows N and you are trying to retrieve data from Table X. (You should have a ID field must; i.e. a PK)
Way 1: if your starting record is 1 then...
This following is just cut and paste from SQL Server Books Online. So if you have that you can search by cross-tab to find this. Any way, only difference with Access and SQL server is: in SQL server number of columns have to be fixed but in Access it is dynamic.
Hope it will help you...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.