Showing posts with label contains. Show all posts
Showing posts with label contains. Show all posts

Wednesday, March 7, 2012

Changing Page Orientation for Sub Reports

We have a "Master" report that contains several sub-reports. Some of these
sub-reports we need to print in landscape orientation. We have been unable
to figure out how to set the page orientation for sub-reports. We also
looked to see if we could create "sections" (like MS Word) where we could
configure page breaks and page orientation.
Can anyone point us in the right direction?
Thanks,
ChrisUnfortunately, this is not supported in the current release. Other than some
sort of wrapper that chains together multiple reports, I can't think of how
you would do this.
--
Brian Welcker
Group Program Manager
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Christopher Walls" <msnews@.travantsolutions.com> wrote in message
news:OtQ6K1meEHA.3984@.TK2MSFTNGP10.phx.gbl...
> We have a "Master" report that contains several sub-reports. Some of
> these
> sub-reports we need to print in landscape orientation. We have been unable
> to figure out how to set the page orientation for sub-reports. We also
> looked to see if we could create "sections" (like MS Word) where we could
> configure page breaks and page orientation.
> Can anyone point us in the right direction?
> Thanks,
> Chris
>

Friday, February 24, 2012

Changing machine name & IP number on SQL Server 7.

Hi all!

We run a NT4 server machine running SQL 7 which contains some vital data on older databases. This machine was PDC for a long time, untill we got a new win2k server, which got the same machine name and IP number as the old NT4 machine which isn't yet connected to the AD. This new server does SQL 2000.

Since it's still important for us to have access to the SQL 7 data which cannot be used on SQL2000 server, I want to put the NT4 machine in the Win2k domain, but when I change the server's name and IP adress into something free (machine name and IP number are both taken over by new server) the SQL 7 server won't start anymore.

Is there anyone out there that knows how to solve this problem?

Thanks!!!! A LOT! :D :DI think you can run SQL 7 on the same machine as SQL 2000 and they won't bump into eachother.

blindman|||You can have SQL 2000 and one of the previous versions on the same machine. See if you want to do this. If not, see if the following article resolves your issues.

http://www.databasejournal.com/features/mssql/print.php/10894_2194711_3

All the best

changing loop

hi,

i have a table #emails containing one coloumn called email. this is a list the contains emails.

i need to run a query that creats emails list like the following:

a@.xxx.com;b@.yyy.com, etc'

I am using the following code:

while exists(select 1 from #emails)
begin
select top 1 @.email=email
from #emails

set @.emails = @.emails + @.email + ';'

delete from #emails
where email=@.email

end

the thing is that when I create this list I get a high CPU usage.

Can someone help by suggesting a different way of creating this list and by that acheiving 'normal' CPU usage?

thx,

tomer

possible alternatives

--SQL SERVER 2005
DECLARE @.str varchar(4000)
SET @.str = (SELECT d.name + ','
FROM HumanResources.Department d
ORDER BY d.name
FOR XML PATH(''))
SET @.str = SUBSTRING(@.str,1,LEN(@.str)-1)
SELECT @.str

--SQL SERVER 2000
DECLARE @.name varchar(50)
DECLARE @.str varchar(4000)
SET @.str = ''
DECLARE Build CURSOR
LOCAL
FORWARD_ONLY
FOR
SELECT d.name
FROM HumanResources.Department d
ORDER BY d.name
OPEN Build
FETCH NEXT FROM Build INTO @.name
WHILE @.@.FETCH_STATUS = 0
BEGIN
SET @.str = @.str + @.name + ','
FETCH NEXT FROM Build INTO @.name
END
CLOSE Build
DEALLOCATE Build
SET @.str = SUBSTRING(@.str,1,LEN(@.str)-1)
SELECT @.str

|||

...forgot this...eternity is a long time

DECLARE @.count int

SET @.count = (SELECT COUNT(*) FROM #emails)

while @.count > 0

begin

select top 1 @.email=email

from #emails

set @.emails = @.emails + @.email + ';'

delete from #emails

where email=@.email

SET @.count = @.count - 1

end

Changing job while running....PLEASE HELP!

I have a job that contains 2 steps. Right now the job is setup to quit with
success for both steps, and the job is currently running. I would like to
have to job go on to step 2 after step 1 is complete. Is it possible to
change the job to go to next step after step 1 is complete, or is it too late
once the job has already been started?
Thanks!!!!The actual work itself only lasts as long as it takes to do the work. If I
schedule a job to run every hour it only runs once an hour, not all the
time. So yes you can change it and the next time it runs it will be as you
changed it.
--
Andrew J. Kelly SQL MVP
"Andy" <Andy@.discussions.microsoft.com> wrote in message
news:A4638A8F-8520-4E2B-8BF6-519F16509F2B@.microsoft.com...
>I have a job that contains 2 steps. Right now the job is setup to quit
>with
> success for both steps, and the job is currently running. I would like to
> have to job go on to step 2 after step 1 is complete. Is it possible to
> change the job to go to next step after step 1 is complete, or is it too
> late
> once the job has already been started?
> Thanks!!!!|||Once the job is running you cannot change it. You can, however, alter the
job to just run the second step and manually run it once the first step is
done if you're concern is to run the second step even if the first step fails.
--
burt_king@.yahoo.com
"Andy" wrote:
> I have a job that contains 2 steps. Right now the job is setup to quit with
> success for both steps, and the job is currently running. I would like to
> have to job go on to step 2 after step 1 is complete. Is it possible to
> change the job to go to next step after step 1 is complete, or is it too late
> once the job has already been started?
> Thanks!!!!

Changing job while running....PLEASE HELP!

I have a job that contains 2 steps. Right now the job is setup to quit with
success for both steps, and the job is currently running. I would like to
have to job go on to step 2 after step 1 is complete. Is it possible to
change the job to go to next step after step 1 is complete, or is it too late
once the job has already been started?
Thanks!!!!
The actual work itself only lasts as long as it takes to do the work. If I
schedule a job to run every hour it only runs once an hour, not all the
time. So yes you can change it and the next time it runs it will be as you
changed it.
Andrew J. Kelly SQL MVP
"Andy" <Andy@.discussions.microsoft.com> wrote in message
news:A4638A8F-8520-4E2B-8BF6-519F16509F2B@.microsoft.com...
>I have a job that contains 2 steps. Right now the job is setup to quit
>with
> success for both steps, and the job is currently running. I would like to
> have to job go on to step 2 after step 1 is complete. Is it possible to
> change the job to go to next step after step 1 is complete, or is it too
> late
> once the job has already been started?
> Thanks!!!!
|||Once the job is running you cannot change it. You can, however, alter the
job to just run the second step and manually run it once the first step is
done if you're concern is to run the second step even if the first step fails.
burt_king@.yahoo.com
"Andy" wrote:

> I have a job that contains 2 steps. Right now the job is setup to quit with
> success for both steps, and the job is currently running. I would like to
> have to job go on to step 2 after step 1 is complete. Is it possible to
> change the job to go to next step after step 1 is complete, or is it too late
> once the job has already been started?
> Thanks!!!!

Changing job while running....PLEASE HELP!

I have a job that contains 2 steps. Right now the job is setup to quit with
success for both steps, and the job is currently running. I would like to
have to job go on to step 2 after step 1 is complete. Is it possible to
change the job to go to next step after step 1 is complete, or is it too lat
e
once the job has already been started?
Thanks!!!!The actual work itself only lasts as long as it takes to do the work. If I
schedule a job to run every hour it only runs once an hour, not all the
time. So yes you can change it and the next time it runs it will be as you
changed it.
Andrew J. Kelly SQL MVP
"Andy" <Andy@.discussions.microsoft.com> wrote in message
news:A4638A8F-8520-4E2B-8BF6-519F16509F2B@.microsoft.com...
>I have a job that contains 2 steps. Right now the job is setup to quit
>with
> success for both steps, and the job is currently running. I would like to
> have to job go on to step 2 after step 1 is complete. Is it possible to
> change the job to go to next step after step 1 is complete, or is it too
> late
> once the job has already been started?
> Thanks!!!!|||Once the job is running you cannot change it. You can, however, alter the
job to just run the second step and manually run it once the first step is
done if you're concern is to run the second step even if the first step fail
s.
--
burt_king@.yahoo.com
"Andy" wrote:

> I have a job that contains 2 steps. Right now the job is setup to quit wi
th
> success for both steps, and the job is currently running. I would like to
> have to job go on to step 2 after step 1 is complete. Is it possible to
> change the job to go to next step after step 1 is complete, or is it too l
ate
> once the job has already been started?
> Thanks!!!!

Sunday, February 12, 2012

Changing Datatypes

Hi All,

I have a database that contains 25 tables. In these tables the character data was stored as nvarchar datatype. Since i am not using any unicode data and the space occupied by nvarchar is more , i want to change the datatype from nvarchar to varchar. I cannot do one by one since there are 25 tables and each table has atleast 10 columns of datatype nvarchar.

How can i change the datatype from nvarchar to varchar in all the tables. Should i use any cursors or is there any other way. I am newbie to SQL server i dont know how to use cursors.

Can u please guide me the steps to be followed to convert to varchar datatype.

Thank you.Hi All,

I have a database that contains 25 tables. In these tables the character data was stored as nvarchar datatype. Since i am not using any unicode data and the space occupied by nvarchar is more , i want to change the datatype from nvarchar to varchar. I cannot do one by one since there are 25 tables and each table has atleast 10 columns of datatype nvarchar.

How can i change the datatype from nvarchar to varchar in all the tables. Should i use any cursors or is there any other way. I am newbie to SQL server i dont know how to use cursors.

Can u please guide me the steps to be followed to convert to varchar datatype.

Thank you.|||Hi All,

I have a database that contains 25 tables. In these tables the character data was stored as nvarchar datatype. Since i am not using any unicode data and the space occupied by nvarchar is more , i want to change the datatype from nvarchar to varchar. I cannot do one by one since there are 25 tables and each table has atleast 10 columns of datatype nvarchar.

How can i change the datatype from nvarchar to varchar in all the tables. Should i use any cursors or is there any other way. I am newbie to SQL server i dont know how to use cursors.

Can u please guide me the steps to be followed to convert to varchar datatype.

Thank you.

------------------------

Reply|||Create a cursor that goes through all the tables in the databases, looking at the table structure, and altering as necessary.|||

Quote:

Originally Posted by sandyboy

Should i use any cursors or is there any other way. I am newbie to SQL server i dont know how to use cursors.


You are saying to be a newbie to SQL server and dont know how to use cursors. and again u want to write cursors.

U should know the fundaments first of all .

And please don;t post the same question repeatedly.

Please follow the posting guidelines before posting.

consider it as first warning to you.