Showing posts with label sql7. Show all posts
Showing posts with label sql7. Show all posts

Sunday, March 25, 2012

copy db sql7 ->2000 newbie question

Hi,
I have a backup copy of a database in sql 7. I am copying it over to sql
2000 and then restoring it. There are 3 views that show up in both the table
and view section in sql 2000 but they are only in the view section in sql 7.
(sql 7 running on windows 2000 server/sql 2000 on windows 2003 server.) why
is that happening?
Thanks for any help with this. much appreciated!
kak37
On Jun 13, 10:12 am, kak37 <k...@.discussions.microsoft.com> wrote:
> Hi,
> I have a backup copy of a database in sql 7. I am copying it over to sql
> 2000 and then restoring it. There are 3 views that show up in both the table
> and view section in sql 2000 but they are only in the view section in sql 7.
> (sql 7 running on windows 2000 server/sql 2000 on windows 2003 server.) why
> is that happening?
> Thanks for any help with this. much appreciated!
> --
> kak37
Try refresh at databse level (EM) and check again
sqlsql

copy db sql7 ->2000 newbie question

Hi,
I have a backup copy of a database in sql 7. I am copying it over to sql
2000 and then restoring it. There are 3 views that show up in both the table
and view section in sql 2000 but they are only in the view section in sql 7.
(sql 7 running on Windows 2000 server/sql 2000 on windows 2003 server.) why
is that happening?
Thanks for any help with this. much appreciated!
--
kak37On Jun 13, 10:12 am, kak37 <k...@.discussions.microsoft.com> wrote:
> Hi,
> I have a backup copy of a database in sql 7. I am copying it over to sql
> 2000 and then restoring it. There are 3 views that show up in both the tab
le
> and view section in sql 2000 but they are only in the view section in sql
7.
> (sql 7 running on Windows 2000 server/sql 2000 on windows 2003 server.) wh
y
> is that happening?
> Thanks for any help with this. much appreciated!
> --
> kak37
Try refresh at databse level (EM) and check again

copy db sql7 ->2000 newbie question

Hi,
I have a backup copy of a database in sql 7. I am copying it over to sql
2000 and then restoring it. There are 3 views that show up in both the table
and view section in sql 2000 but they are only in the view section in sql 7.
(sql 7 running on windows 2000 server/sql 2000 on windows 2003 server.) why
is that happening?
Thanks for any help with this. much appreciated!
--
kak37On Jun 13, 10:12 am, kak37 <k...@.discussions.microsoft.com> wrote:
> Hi,
> I have a backup copy of a database in sql 7. I am copying it over to sql
> 2000 and then restoring it. There are 3 views that show up in both the table
> and view section in sql 2000 but they are only in the view section in sql 7.
> (sql 7 running on windows 2000 server/sql 2000 on windows 2003 server.) why
> is that happening?
> Thanks for any help with this. much appreciated!
> --
> kak37
Try refresh at databse level (EM) and check again

Tuesday, February 14, 2012

Converting Sql7 to 2000 version

Can anyone tell where i can find any guide to prevent big error!! My problems
are date and string. When using datetime fields, before i used [yyyy-mm-dd]
format, now its no longer available!!! How cai i do?!!?! Must i covert all
stored procedure or code? Wich problems can i have with the new string limit?
Thanx all!!
Marko
Hi
Have you looked at CAST and CONVERT. Formatting a string as you want is is
still there.
How are you trying to use the data?
Regards
Mike
"Marko" wrote:

> Can anyone tell where i can find any guide to prevent big error!! My problems
> are date and string. When using datetime fields, before i used [yyyy-mm-dd]
> format, now its no longer available!!! How cai i do?!!?! Must i covert all
> stored procedure or code? Wich problems can i have with the new string limit?
> Thanx all!!
> Marko
|||Thanx, but all my Stored Procedure i use CONVERT to obtain 120th format,
yyyy-mm-dd.
With 2000 version this is not good, and i must correct all the procedure
with yyyymmdd: is it correct?
This is a problem for me because i must to correct many procedures and then
i must tu correct all the procedure call from ado Connection; for example
cn.execute ("MyProc 'yyyy-mm-dd'") must become cn.execute ("MyProc
'yyyymmdd'")
Can you help me?
Again , Thanx !!
Mark
"Mike Epprecht (SQL MVP)" wrote:
[vbcol=seagreen]
> Hi
> Have you looked at CAST and CONVERT. Formatting a string as you want is is
> still there.
> How are you trying to use the data?
> Regards
> Mike
> "Marko" wrote:

Converting Sql7 to 2000 version

Can anyone tell where i can find any guide to prevent big error!! My problem
s
are date and string. When using datetime fields, before i used [yyyy-mm-
dd]
format, now its no longer available!!! How cai i do'!!?! Must i covert all
stored procedure or code? Wich problems can i have with the new string limit
?
Thanx all!!
MarkoHi
Have you looked at CAST and CONVERT. Formatting a string as you want is is
still there.
How are you trying to use the data?
Regards
Mike
"Marko" wrote:

> Can anyone tell where i can find any guide to prevent big error!! My probl
ems
> are date and string. When using datetime fields, before i used [yyyy-m
m-dd]
> format, now its no longer available!!! How cai i do'!!?! Must i covert a
ll
> stored procedure or code? Wich problems can i have with the new string lim
it?
> Thanx all!!
> Marko|||Thanx, but all my Stored Procedure i use CONVERT to obtain 120th format,
yyyy-mm-dd.
With 2000 version this is not good, and i must correct all the procedure
with yyyymmdd: is it correct'
This is a problem for me because i must to correct many procedures and then
i must tu correct all the procedure call from ado Connection; for example
cn.execute ("MyProc 'yyyy-mm-dd'") must become cn.execute ("MyProc
'yyyymmdd'")
Can you help me?
Again , Thanx !!
Mark
"Mike Epprecht (SQL MVP)" wrote:
[vbcol=seagreen]
> Hi
> Have you looked at CAST and CONVERT. Formatting a string as you want is is
> still there.
> How are you trying to use the data?
> Regards
> Mike
> "Marko" wrote:
>

Converting Sql7 to 2000 version

Can anyone tell where i can find any guide to prevent big error!! My problems
are date and string. When using datetime fields, before i used [yyyy-mm-dd]
format, now its no longer available!!! How cai i do'!!?! Must i covert all
stored procedure or code? Wich problems can i have with the new string limit?
Thanx all!!
MarkoHi
Have you looked at CAST and CONVERT. Formatting a string as you want is is
still there.
How are you trying to use the data?
Regards
Mike
"Marko" wrote:
> Can anyone tell where i can find any guide to prevent big error!! My problems
> are date and string. When using datetime fields, before i used [yyyy-mm-dd]
> format, now its no longer available!!! How cai i do'!!?! Must i covert all
> stored procedure or code? Wich problems can i have with the new string limit?
> Thanx all!!
> Marko|||Thanx, but all my Stored Procedure i use CONVERT to obtain 120th format,
yyyy-mm-dd.
With 2000 version this is not good, and i must correct all the procedure
with yyyymmdd: is it correct'
This is a problem for me because i must to correct many procedures and then
i must tu correct all the procedure call from ado Connection; for example
cn.execute ("MyProc 'yyyy-mm-dd'") must become cn.execute ("MyProc
'yyyymmdd'")
Can you help me?
Again , Thanx !!
Mark
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> Have you looked at CAST and CONVERT. Formatting a string as you want is is
> still there.
> How are you trying to use the data?
> Regards
> Mike
> "Marko" wrote:
> > Can anyone tell where i can find any guide to prevent big error!! My problems
> > are date and string. When using datetime fields, before i used [yyyy-mm-dd]
> > format, now its no longer available!!! How cai i do'!!?! Must i covert all
> > stored procedure or code? Wich problems can i have with the new string limit?
> > Thanx all!!
> > Marko

Sunday, February 12, 2012

Converting Rows to Columns in SQL7

I do a:
SELECT * FROM xxx

And Get:
Date Place Sum
A M 1
A O 3
A P 2
B O 5
B M 4
B P 2

And I want it to look like:

Date M O P
A 1 3 2
B 4 5 2

Can you think of an EASY way to do this?
I can do it with a cursor that constructs a SQL statement, which I EXEC, but the 8000 character limit may prove to be a limiting factor.
sp_execsql is somewhat messy for the nature of this issue.
Any input is appreciated.

Thanks in advance."Brad Joss" <bradjoss@.hotmail.com> wrote in message news:<bgq7p7$m03$1@.news01.intel.com>...
> I do a:
> SELECT * FROM xxx
> And Get:
> Date Place Sum
> A M 1
> A O 3
> A P 2
> B O 5
> B M 4
> B P 2
> And I want it to look like:
> Date M O P
> A 1 3 2
> B 4 5 2
> Can you think of an EASY way to do this?
> I can do it with a cursor that constructs a SQL statement, which I EXEC,
> but the 8000 character limit may prove to be a limiting factor.
> sp execsql is somewhat messy for the nature of this issue.
> Any input is appreciated.
> Thanks in advance.
> --

Assuming that (Date, Place) is a unique combination, then this should work:

select
Date,
sum(case when Place = 'M' then Sum else NULL end) as 'M',
sum(case when Place = 'O' then Sum else NULL end) as 'O',
sum(case when Place = 'P' then Sum else NULL end) as 'P'
from
xxx
group by
Date

Simon|||i tried something but couldnt do anything about it. only if you send
me the solution you have it will help me(though with the limiting
factor)

Else i think at any point of time the 8000 character limit will be a
factor that will not allow you to do this always......
RVG

"Brad Joss" <bradjoss@.hotmail.com> wrote in message news:<bgq7p7$m03$1@.news01.intel.com>...
> I do a:
> SELECT * FROM xxx
> And Get:
> Date Place Sum
> A M 1
> A O 3
> A P 2
> B O 5
> B M 4
> B P 2
> And I want it to look like:
> Date M O P
> A 1 3 2
> B 4 5 2
> Can you think of an EASY way to do this?
> I can do it with a cursor that constructs a SQL statement, which I EXEC,
> but the 8000 character limit may prove to be a limiting factor.
> sp execsql is somewhat messy for the nature of this issue.
> Any input is appreciated.
> Thanks in advance.
> --