sql server programming:
I'm curious, can you give a simple example of exactly what SELECT LIST... gives as a result. steve www.beyondsql.blogspot.com [quoted text, click to view] <webcliff@gmail.com> wrote in message news:1191876640.631844.316360@o80g2000hse.googlegroups.com... > Hello everybody, thanks for help. > > Here is what I really tring to do: > I need to export some tables and records, and import it back. To make > sure the export and import is successful, firstly I select everything > to txt files, then clear the db, then import, then select everything > to txt files again, then compare two sets of txt files to see if there > are any differences. > > I am using SQL server 2005 express, I am not sure if I can get free > SQL Management Studio or Query Analyzer. > Write a utility from C# side (what I am using) might solve this > problem, just don't know I need to do it, I have some experience with > Empress DB, I can use "SELECT LIST from atable" to get what I want. > > Thanks again. > > > > On Oct 8, 4:10 pm, "Liz" <l...@tiredofspam.com> wrote: >> <webcl...@gmail.com> wrote in message >> >> news:1191872084.614031.245180@o80g2000hse.googlegroups.com... >> >> > Hello, >> >> > As a MS SQL newbee, I may be asking stupid questions. >> >> > By default, when I run select * from atable, here is the format I get: >> >> run it from where? SQL Management Studio? Query Analyzer? in either of >> those cases, you can press Ctrl-D to display your results in a grid and >> Ctrl-T to display results in text, this latter being apparently being >> what >> you've been doing ... there are also icons in the UI to change this >> option >> ... >> >> > column1 column2 >> > --------------------------- >> > value11 value12 >> > value21 value22 >> >> > If the columns and the rows are too many, it is not easy to know a >> > value belongs to which column. >> >> > What I'd like to have is a list format looks like this: >> >> > column1:value11 >> > column2:value12 >> > column1:value21 >> > column2:value22 >> >> > The name of the columns shouldn't be embedded in the select statement >> > because it's changing. >> >> > Thanks for any help, >> >> > webcliff > >
[quoted text, click to view] <webcliff@gmail.com> wrote in message news:1191872084.614031.245180@o80g2000hse.googlegroups.com... > Hello, > > As a MS SQL newbee, I may be asking stupid questions. > > By default, when I run select * from atable, here is the format I get:
run it from where? SQL Management Studio? Query Analyzer? in either of those cases, you can press Ctrl-D to display your results in a grid and Ctrl-T to display results in text, this latter being apparently being what you've been doing ... there are also icons in the UI to change this option .... [quoted text, click to view] > column1 column2 > --------------------------- > value11 value12 > value21 value22 > > If the columns and the rows are too many, it is not easy to know a > value belongs to which column. > > What I'd like to have is a list format looks like this: > > column1:value11 > column2:value12 > column1:value21 > column2:value22 > > The name of the columns shouldn't be embedded in the select statement > because it's changing. > > Thanks for any help, > > webcliff >
Looks like a job for XML... [quoted text, click to view] <webcliff@gmail.com> wrote in message news:1191876640.631844.316360@o80g2000hse.googlegroups.com... > Hello everybody, thanks for help. > > Here is what I really tring to do: > I need to export some tables and records, and import it back. To make > sure the export and import is successful, firstly I select everything > to txt files, then clear the db, then import, then select everything > to txt files again, then compare two sets of txt files to see if there > are any differences. > > I am using SQL server 2005 express, I am not sure if I can get free > SQL Management Studio or Query Analyzer. > Write a utility from C# side (what I am using) might solve this > problem, just don't know I need to do it, I have some experience with > Empress DB, I can use "SELECT LIST from atable" to get what I want. > > Thanks again. > > > > On Oct 8, 4:10 pm, "Liz" <l...@tiredofspam.com> wrote: >> <webcl...@gmail.com> wrote in message >> >> news:1191872084.614031.245180@o80g2000hse.googlegroups.com... >> >> > Hello, >> >> > As a MS SQL newbee, I may be asking stupid questions. >> >> > By default, when I run select * from atable, here is the format I get: >> >> run it from where? SQL Management Studio? Query Analyzer? in either of >> those cases, you can press Ctrl-D to display your results in a grid and >> Ctrl-T to display results in text, this latter being apparently being >> what >> you've been doing ... there are also icons in the UI to change this >> option >> ... >> >> > column1 column2 >> > --------------------------- >> > value11 value12 >> > value21 value22 >> >> > If the columns and the rows are too many, it is not easy to know a >> > value belongs to which column. >> >> > What I'd like to have is a list format looks like this: >> >> > column1:value11 >> > column2:value12 >> > column1:value21 >> > column2:value22 >> >> > The name of the columns shouldn't be embedded in the select statement >> > because it's changing. >> >> > Thanks for any help, >> >> > webcliff > >
[quoted text, click to view] <webcliff@gmail.com> wrote in message news:1191876640.631844.316360@o80g2000hse.googlegroups.com... > Hello everybody, thanks for help. > > Here is what I really tring to do: > I need to export some tables and records, and import it back. To make > sure the export and import is successful, firstly I select everything > to txt files, then clear the db, then import, then select everything > to txt files again, then compare two sets of txt files to see if there > are any differences. > > I am using SQL server 2005 express, I am not sure if I can get free > SQL Management Studio or Query Analyzer. > Write a utility from C# side (what I am using) might solve this > problem, just don't know I need to do it, I have some experience with > Empress DB, I can use "SELECT LIST from atable" to get what I want.
There is a free GUI admin tool for SQL Express: http://www.microsoft.com/downloads/details.aspx?familyid=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796&displaylang=en .... but I don't know anything about it; there are also quite a few free and cheap ones to be had on the 'net if you can't write your own or do not have the budget for something like the Redgate tools; for one, see http://www.simego.com ... pretty good stuff ... but no data compare but something is wrong here ... you should not be needing to do all of this import/export to validate the operations ... L
Hello, As a MS SQL newbee, I may be asking stupid questions. By default, when I run select * from atable, here is the format I get: column1 column2 --------------------------- value11 value12 value21 value22 If the columns and the rows are too many, it is not easy to know a value belongs to which column. What I'd like to have is a list format looks like this: column1:value11 column2:value12 column1:value21 column2:value22 The name of the columns shouldn't be embedded in the select statement because it's changing. Thanks for any help, webcliff
[quoted text, click to view] <webcliff@gmail.com> wrote in message news:1191872084.614031.245180@o80g2000hse.googlegroups.com... > Hello, > > As a MS SQL newbee, I may be asking stupid questions. > > By default, when I run select * from atable, here is the format I get: > > column1 column2 > --------------------------- > value11 value12 > value21 value22 > > If the columns and the rows are too many, it is not easy to know a > value belongs to which column. > > What I'd like to have is a list format looks like this: > > column1:value11 > column2:value12 > column1:value21 > column2:value22 > > The name of the columns shouldn't be embedded in the select statement > because it's changing. > > Thanks for any help, > > webcliff >
This isn't really a SQL question because SQL Server doesn't control the way data is displayed on the screen or on the page. Use your development language, client application or reporting tool. -- David Portas
Hello everybody, thanks for help. Here is what I really tring to do: I need to export some tables and records, and import it back. To make sure the export and import is successful, firstly I select everything to txt files, then clear the db, then import, then select everything to txt files again, then compare two sets of txt files to see if there are any differences. I am using SQL server 2005 express, I am not sure if I can get free SQL Management Studio or Query Analyzer. Write a utility from C# side (what I am using) might solve this problem, just don't know I need to do it, I have some experience with Empress DB, I can use "SELECT LIST from atable" to get what I want. Thanks again. [quoted text, click to view] On Oct 8, 4:10 pm, "Liz" <l...@tiredofspam.com> wrote: > <webcl...@gmail.com> wrote in message > > news:1191872084.614031.245180@o80g2000hse.googlegroups.com... > > > Hello, > > > As a MS SQL newbee, I may be asking stupid questions. > > > By default, when I run select * from atable, here is the format I get: > > run it from where? SQL Management Studio? Query Analyzer? in either of > those cases, you can press Ctrl-D to display your results in a grid and > Ctrl-T to display results in text, this latter being apparently being what > you've been doing ... there are also icons in the UI to change this option > ... > > > column1 column2 > > --------------------------- > > value11 value12 > > value21 value22 > > > If the columns and the rows are too many, it is not easy to know a > > value belongs to which column. > > > What I'd like to have is a list format looks like this: > > > column1:value11 > > column2:value12 > > column1:value21 > > column2:value22 > > > The name of the columns shouldn't be embedded in the select statement > > because it's changing. > > > Thanks for any help, > > > webcliff
Are you talking about when using the SQL Server Management Studio? You can change to grid output, either click the icon above the query window or use the shortcut Ctrl+D, then the headers stay fixed. -- Joe Fawcett (MVP - XML) http://joe.fawcett.name [quoted text, click to view] <webcliff@gmail.com> wrote in message news:1191872084.614031.245180@o80g2000hse.googlegroups.com... > Hello, > > As a MS SQL newbee, I may be asking stupid questions. > > By default, when I run select * from atable, here is the format I get: > > column1 column2 > --------------------------- > value11 value12 > value21 value22 > > If the columns and the rows are too many, it is not easy to know a > value belongs to which column. > > What I'd like to have is a list format looks like this: > > column1:value11 > column2:value12 > column1:value21 > column2:value22 > > The name of the columns shouldn't be embedded in the select statement > because it's changing. > > Thanks for any help, > > webcliff >
[quoted text, click to view] <webcliff@gmail.com> wrote in message news:1191876640.631844.316360@o80g2000hse.googlegroups.com... > Hello everybody, thanks for help. > > Here is what I really tring to do: > I need to export some tables and records, and import it back. To make > sure the export and import is successful, firstly I select everything > to txt files, then clear the db, then import, then select everything > to txt files again, then compare two sets of txt files to see if there > are any differences. > > I am using SQL server 2005 express, I am not sure if I can get free > SQL Management Studio or Query Analyzer. > Write a utility from C# side (what I am using) might solve this > problem, just don't know I need to do it, I have some experience with > Empress DB, I can use "SELECT LIST from atable" to get what I want. > > Thanks again. >
That's a painful way to compare two data sets. Why not write a query to compare them? Or use a tool like: http://www.red-gate.com/products/SQL_Data_Compare/index.htm -- David Portas
[quoted text, click to view] On Oct 8, 6:05 pm, "Steve Dassin" <st...@nospamrac4sql.net> wrote: > I'm curious, can you give a simple example of exactly what SELECT LIST... > gives as a result. >
Here you go: 7* select * from ROSPatient where oid="2200948185.1806.3368352283.56" list; oid: 2200948185.1806.3368352283.56 createTime: 1190914048 updateTime: 1190914288 name: bbb^bbb id: bbb otherId: otherName: mrl: birthDate: 19901010 birthTime: age: 016Y sex: F ethnicity: admDiagDesc: comments: history: discharge: 0 protection: 0 The exact syntax is actually like "select * from atable list"
[quoted text, click to view] On Oct 8, 6:49 pm, "Liz" <l...@tiredofspam.com> wrote: > <webcl...@gmail.com> wrote in message > > news:1191876640.631844.316360@o80g2000hse.googlegroups.com... > > > Hello everybody, thanks for help. > > > Here is what I really tring to do: > > I need to export some tables and records, and import it back. To make > > sure the export and import is successful, firstly I select everything > > to txt files, then clear the db, then import, then select everything > > to txt files again, then compare two sets of txt files to see if there > > are any differences. > > > I am using SQL server 2005 express, I am not sure if I can get free > > SQL Management Studio or Query Analyzer. > > Write a utility from C# side (what I am using) might solve this > > problem, just don't know I need to do it, I have some experience with > > Empress DB, I can use "SELECT LIST from atable" to get what I want. > > There is a free GUI admin tool for SQL Express: http://www.microsoft.com/downloads/details.aspx?familyid=C243A5AE-4BD... > > ... but I don't know anything about it; there are also quite a few free and > cheap ones to be had on the 'net if you can't write your own or do not have > the budget for something like the Redgate tools; for one, see http://www.simego.com... pretty good stuff ... but no data compare > > but something is wrong here ... you should not be needing to do all of this > import/export to validate the operations ... > > L well, let me provide more details, the system I am working on is a patient images management system, patient informations could be removed, and then imported back for reviewing. When removed, the patient information (images) are saved to DICOM (a medical standard format) files, these files are used when importing back to the system. During the DB->DICOM->DB transmission, some information (db columns) are lost because it is generally not a good idea to dump all db columns to a DICOM file, only a certain part of db columns are saved to DICOM files. My work is the import part, I basically need to make sure the imported patient information is correct, since there are quite a few things could be done to the imported data, I don't see any easy way to validate the imported data (also considering versioning), we have been talking about using auto test to do the validation. The txt files comparison is used during the import developing, I don't know if there are any other better ways to compare the original db data and the imported db data, maybe I can try keep the original db, import to a different db, then compare tables in two DBs? It is certainly not something I am pround of, unfortunately I probably have to stand for it for a while.
Don't see what you're looking for? Try a search.
|