Viewing 15 posts - 26,371 through 26,385 (of 26,487 total)
The only stupid question is the question not asked.
Try this and see if it gives you what you are looking for:
SELECT -- TOP 1
startdate,
starttime,
page,
pageid
FROM
dbo.Page_History pgh1
WHERE
...
September 22, 2006 at 12:54 pm
The problem is the nature af dynamic sql. You need to add the set identity insert on in the same dynamic sql that does the insert:
CREATE PROCEDURE cspAPP_CreateInvSnapShotTable
@dt_Date Datetime
AS
declare ...
September 22, 2006 at 12:40 pm
Try this:
select @cmd = 'use ' + @dbname + '; declare @uid int, @cmd varchar(500), @name sysname ' +
'if exists (select * from dbo.sysusers where sid = suser_sid('''...
September 21, 2006 at 4:38 pm
Sorry, missed the begin further inside the code. I am reformatting your code to see what else may be going on.
September 21, 2006 at 4:26 pm
Not really sure, but have you tried leaving off the the concatenation of 'END' from your dynamic sql?
September 21, 2006 at 4:25 pm
Change your GROUP BY to this: GROUP BY dept_no WITH ROLLUP
It just won't say total under deptX
September 20, 2006 at 12:53 pm
Without knowing the structure of your tables or the data contained, a little difficult to help come up with the solution you are looking for, however, I hope the following...
September 20, 2006 at 12:17 pm
As you do not update anything on the other server inside the transaction, can you pull the information you need from the other server outside the transaction, then do the...
September 20, 2006 at 11:56 am
Two questions need to be answered first before I can try to offer some help. First, are you attempting to update any data on the other server where your view...
September 20, 2006 at 10:35 am
I turned to dynamic sql, but I got a possible solution. There may be other ways to do this, but I will leave that to the SQLServerCentral community to find...
September 19, 2006 at 9:24 am
This is where your knowledge of the data is important. Are all the possible registers known in advance, or are each of them an unknown until there is an entry...
September 19, 2006 at 8:26 am
Here is one way, but it requires you know the data to setup the query:
declare @testtbl table (
Material varchar(10),
Client varchar(10),
Files smallint
)
insert into @testtbl values('Paper','Alex',123)
insert into @testtbl values('Paper','Gilbert',322)
insert...
September 18, 2006 at 2:35 pm
Yes, each differential backup gets stored to its own file. These files are backed up to tape nightly. My transaction log backups get appended to the same file for each...
September 18, 2006 at 2:06 pm
Opps. Forgot a few changes to the second query. Here is a corrected version of the second one:
SELECT
cm.CustomerCode,
cm.CustomerName,
dca.Street1,
dca.Street2,
dca.City,
dca.State,
dca.Country,
...
September 18, 2006 at 12:53 pm
If the query above doesn't work, here is another one to try:
SELECT
cm.CustomerCode,
cm.CustomerName,
ca.StreetAddress1,
ca.StreetAddress2,
ct.CityName as City,
st.LongName as State,
cn.LongName as Country,
ca.Zipcode,
ca.Phone1 as Phone,
ca.Fax,
...
September 18, 2006 at 12:40 pm
Viewing 15 posts - 26,371 through 26,385 (of 26,487 total)