Hi all,
Something strange is going on: When I do a select * from table some of the
data appears to be in the wrong field. However, when I look at the table
contents in the EM, they are all correct. When I do select statement in the
QA based on criteria, the correct rows are not returned.
Any one know what this is all about?
Thanks for your guidance,
SeanWhat version of SQL Server / Query Analyzer? Have you applied the latest
(SQL Server) service pack to the server and client?
How is Query Analyzer set to display data (grid or text)?
By "wrong field" I assume that you mean it appears that the data that is
displayed appears to be in the wrong <ahem> "field" because it appears in
the wrong area of the [text] display of the results. Do you store <carriage
return> and <line feed> (char(13) char(10)) within your data? If so perhaps
those characters along with results in text mode are causing the display to
look incorrect.
Keith
"sean sobey" <Sobey@.yahoo.com> wrote in message
news:%23iVjrebSFHA.508@.TK2MSFTNGP12.phx.gbl...
> Hi all,
> Something strange is going on: When I do a select * from table some of
> the
> data appears to be in the wrong field. However, when I look at the table
> contents in the EM, they are all correct. When I do select statement in
> the
> QA based on criteria, the correct rows are not returned.
> Any one know what this is all about?
> Thanks for your guidance,
> Sean
>|||How can we reproduce the problem?
AMB
"sean sobey" wrote:
> Hi all,
> Something strange is going on: When I do a select * from table some of th
e
> data appears to be in the wrong field. However, when I look at the table
> contents in the EM, they are all correct. When I do select statement in t
he
> QA based on criteria, the correct rows are not returned.
> Any one know what this is all about?
> Thanks for your guidance,
> Sean
>
>|||Hi, Sean
See:
http://groups-beta.google.com/group...ea781f3bc49bf23
Razvan
Showing posts with label thedata. Show all posts
Showing posts with label thedata. Show all posts
Thursday, March 22, 2012
Monday, March 19, 2012
Data processing
Hello,
I am wondering where to do certain processing of data, I receive data
of about 5000 rows in the sql server (2005 Beta) Now after I got the
data I need to go trough the records and if that record matches some
criteria than I add a new record in an other table, than the next
records criteria are affected by the last record added in the other
table. Anyway it is not something I think I can do whitout some
programming logic.
Now my question is, where should I do this? Do I create a client
program and let that do it or should I create the same functionality in
the sql server? I understood I can now use c# there. Also will that be
supported by SQL Server Express 2005?
Any help is appriciated.
-MarkYou could use a cursor to do linear operations (row by row)...
declare yourcur cursor for
select ...
from ...
open yourcur
declare @.col1 ...
fetch next from yourcur into @.col1
while @.@.fetch_status = 0
begin
insert ...
fetch next from yourcur into @.col1
end
deallocate yourcur
I hope that gives you an idea, have a gander at books online for more
detailed information and examples.
But it will let you control on a row by row basis what the insert does, you
can have complex logic in the while loop.
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
<internet.spam.mail@.gmail.com> wrote in message
news:1129721426.240935.263200@.g49g2000cwa.googlegroups.com...
> Hello,
> I am wondering where to do certain processing of data, I receive data
> of about 5000 rows in the sql server (2005 Beta) Now after I got the
> data I need to go trough the records and if that record matches some
> criteria than I add a new record in an other table, than the next
> records criteria are affected by the last record added in the other
> table. Anyway it is not something I think I can do whitout some
> programming logic.
> Now my question is, where should I do this? Do I create a client
> program and let that do it or should I create the same functionality in
> the sql server? I understood I can now use c# there. Also will that be
> supported by SQL Server Express 2005?
> Any help is appriciated.
> -Mark
>|||Best do it in the back end: two ways of doing this
1) Use Triggers to cascade updates
2)use sproc to update table by enabling a job at defined frequencies
--
Regards
R.D
--Knowledge gets doubled when shared
"internet.spam.mail@.gmail.com" wrote:
> Hello,
> I am wondering where to do certain processing of data, I receive data
> of about 5000 rows in the sql server (2005 Beta) Now after I got the
> data I need to go trough the records and if that record matches some
> criteria than I add a new record in an other table, than the next
> records criteria are affected by the last record added in the other
> table. Anyway it is not something I think I can do whitout some
> programming logic.
> Now my question is, where should I do this? Do I create a client
> program and let that do it or should I create the same functionality in
> the sql server? I understood I can now use c# there. Also will that be
> supported by SQL Server Express 2005?
> Any help is appriciated.
> -Mark
>|||Tony,
Would I be able to do tha using c#? since sql server 2005 supposed to
use that, than it can be faster, because I thought using your way is
really not that efficient.
R.D.
So when a new record is added to the first table excetute some stuff to
add or alter an record in the second database? Does that also work with
sql server express (the new msde)?
,
Thanks will look into both approcess.
-Mark
I am wondering where to do certain processing of data, I receive data
of about 5000 rows in the sql server (2005 Beta) Now after I got the
data I need to go trough the records and if that record matches some
criteria than I add a new record in an other table, than the next
records criteria are affected by the last record added in the other
table. Anyway it is not something I think I can do whitout some
programming logic.
Now my question is, where should I do this? Do I create a client
program and let that do it or should I create the same functionality in
the sql server? I understood I can now use c# there. Also will that be
supported by SQL Server Express 2005?
Any help is appriciated.
-MarkYou could use a cursor to do linear operations (row by row)...
declare yourcur cursor for
select ...
from ...
open yourcur
declare @.col1 ...
fetch next from yourcur into @.col1
while @.@.fetch_status = 0
begin
insert ...
fetch next from yourcur into @.col1
end
deallocate yourcur
I hope that gives you an idea, have a gander at books online for more
detailed information and examples.
But it will let you control on a row by row basis what the insert does, you
can have complex logic in the while loop.
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
<internet.spam.mail@.gmail.com> wrote in message
news:1129721426.240935.263200@.g49g2000cwa.googlegroups.com...
> Hello,
> I am wondering where to do certain processing of data, I receive data
> of about 5000 rows in the sql server (2005 Beta) Now after I got the
> data I need to go trough the records and if that record matches some
> criteria than I add a new record in an other table, than the next
> records criteria are affected by the last record added in the other
> table. Anyway it is not something I think I can do whitout some
> programming logic.
> Now my question is, where should I do this? Do I create a client
> program and let that do it or should I create the same functionality in
> the sql server? I understood I can now use c# there. Also will that be
> supported by SQL Server Express 2005?
> Any help is appriciated.
> -Mark
>|||Best do it in the back end: two ways of doing this
1) Use Triggers to cascade updates
2)use sproc to update table by enabling a job at defined frequencies
--
Regards
R.D
--Knowledge gets doubled when shared
"internet.spam.mail@.gmail.com" wrote:
> Hello,
> I am wondering where to do certain processing of data, I receive data
> of about 5000 rows in the sql server (2005 Beta) Now after I got the
> data I need to go trough the records and if that record matches some
> criteria than I add a new record in an other table, than the next
> records criteria are affected by the last record added in the other
> table. Anyway it is not something I think I can do whitout some
> programming logic.
> Now my question is, where should I do this? Do I create a client
> program and let that do it or should I create the same functionality in
> the sql server? I understood I can now use c# there. Also will that be
> supported by SQL Server Express 2005?
> Any help is appriciated.
> -Mark
>|||Tony,
Would I be able to do tha using c#? since sql server 2005 supposed to
use that, than it can be faster, because I thought using your way is
really not that efficient.
R.D.
So when a new record is added to the first table excetute some stuff to
add or alter an record in the second database? Does that also work with
sql server express (the new msde)?
,
Thanks will look into both approcess.
-Mark
Subscribe to:
Posts (Atom)