Showing posts with label reporting. Show all posts
Showing posts with label reporting. Show all posts

Thursday, March 29, 2012

create another query

hi , I new in sql reporting services.
I have a report with a query . now for every record it printed I need to create another query to another table and to some calc and print the value . how do I do this .

in other reporting program that I used before, they allow me to create multi body report. each body report allow me to defined a query .
thks

There are many options available in RS. You have the ability to have multiple datasets which can be used within the same report. You also have the ability to use sub-reports and linked reports. Could you be a little more specific with what you are trying to do?|||can you point me to example how to do multiple dataset in one report?

let me give example what I try to do with a report
AAA> mean result from default query
BBB> mean result from another query

-- header
Report Listing
--Body-
student ID : AAAAAAAAAAAAAAAA
student name : AAAAAAAAAAAAAA

Family
BBBBBBBBBB
BBBBBBBBBB
BBBBBBBBBB

Classs : AAAAAAAAAAA
group : AAAAAAAAAAAA
-footer-

thks
|||

http://msdn2.microsoft.com/en-us/library/ms156288.aspx

This might help.

Tuesday, March 27, 2012

create a table prior to bcping data

I need to do the following;
1. bcp out data from our reporting server
2. Move bcp file to our archival server
Sounds pretty straight forward.. but of course there is
more...
Since we are using this data for archival purposes, we
just want to store the bcp file. My concern is that there
are many schema changes to the source table and I wanted
to make sure that I had the correct schema needed to bcp
that file back into a table, say three years from now.
Is there a option in bcp or bulk copy that would create
the schema for you? Or can this be done via DTS?
Thanks in advance
Susan
Any help would be greatly appreciated.
Thanks
Susan
Hi,
You can "Generate a script " of all objects and keep it along with the BCP
OUT data.
How to Generate scripts:
1. In Enterprise manager
2. Connect to the SQL server
3. Select the database you need to generate the script
4. Right click All Tasks - "Select the Generate SQL Script" option
5. Click Show all
6. Go to Options Tab - in the Table options select Script INdexes, Triggers
and Primary keys.../
Click the save button and save the file to your hard disk in safe place.
Once you require create a ne database and Execute this script
and BCP IN the the data back.
Thanks
Hari
MCDBA
"Susan" <anonymous@.discussions.microsoft.com> wrote in message
news:1a40701c41db3$13400250$a501280a@.phx.gbl...
> I need to do the following;
> 1. bcp out data from our reporting server
> 2. Move bcp file to our archival server
> Sounds pretty straight forward.. but of course there is
> more...
> Since we are using this data for archival purposes, we
> just want to store the bcp file. My concern is that there
> are many schema changes to the source table and I wanted
> to make sure that I had the correct schema needed to bcp
> that file back into a table, say three years from now.
> Is there a option in bcp or bulk copy that would create
> the schema for you? Or can this be done via DTS?
> Thanks in advance
> Susan
>
>
> Any help would be greatly appreciated.
> Thanks
> Susan
>

create a table prior to bcping data

I need to do the following;
1. bcp out data from our reporting server
2. Move bcp file to our archival server
Sounds pretty straight forward.. but of course there is
more...
Since we are using this data for archival purposes, we
just want to store the bcp file. My concern is that there
are many schema changes to the source table and I wanted
to make sure that I had the correct schema needed to bcp
that file back into a table, say three years from now.
Is there a option in bcp or bulk copy that would create
the schema for you? Or can this be done via DTS?
Thanks in advance
Susan
Any help would be greatly appreciated.
Thanks
SusanHi,
You can "Generate a script " of all objects and keep it along with the BCP
OUT data.
How to Generate scripts:
1. In Enterprise manager
2. Connect to the SQL server
3. Select the database you need to generate the script
4. Right click All Tasks - "Select the Generate SQL Script" option
5. Click Show all
6. Go to Options Tab - in the Table options select Script INdexes, Triggers
and Primary keys.../
Click the save button and save the file to your hard disk in safe place.
Once you require create a ne database and Execute this script
and BCP IN the the data back.
Thanks
Hari
MCDBA
"Susan" <anonymous@.discussions.microsoft.com> wrote in message
news:1a40701c41db3$13400250$a501280a@.phx.gbl...
> I need to do the following;
> 1. bcp out data from our reporting server
> 2. Move bcp file to our archival server
> Sounds pretty straight forward.. but of course there is
> more...
> Since we are using this data for archival purposes, we
> just want to store the bcp file. My concern is that there
> are many schema changes to the source table and I wanted
> to make sure that I had the correct schema needed to bcp
> that file back into a table, say three years from now.
> Is there a option in bcp or bulk copy that would create
> the schema for you? Or can this be done via DTS?
> Thanks in advance
> Susan
>
>
> Any help would be greatly appreciated.
> Thanks
> Susan
>|||I've found a solution to my issue and wanted to let you
all know!!
I had also posted my question on the SQL Server Central
site and Mr. Mortensen was nice enough to provide a GENIUS
solution. He has a proc that will
1. Generate schema of the table in question
2. Update stats on table prior to BCPing
3. BCP's out the data into a readable text file
4. Verify row counts from the BCP and the actual table
(VERY NICE)
5. He also has a bat file that will run the schema and bcp
the data into the DB/table of your choice.
It was EXACTLY what I need and I want to thank him for his
help.
BTW - Why did Microsoft get rid of the backup 'table'
option? I used it quite a bit in 6.5 and there are MANY
time you only need to save one table and not the whole
database. I know there is dts and bcp, but nothing
compares to backing up and restoring a table. Other DBMS
provide this.. Just wondering.
Thanks
Susan
Here's the link in case your curious.
http://www.sqlservercentral.com/forums/shwmessage.aspx?
forumid=8&messageid=111276
>--Original Message--
>I need to do the following;
>1. bcp out data from our reporting server
>2. Move bcp file to our archival server
>Sounds pretty straight forward.. but of course there is
>more...
>Since we are using this data for archival purposes, we
>just want to store the bcp file. My concern is that there
>are many schema changes to the source table and I wanted
>to make sure that I had the correct schema needed to bcp
>that file back into a table, say three years from now.
>Is there a option in bcp or bulk copy that would create
>the schema for you? Or can this be done via DTS?
>Thanks in advance
>Susan
>
>
>Any help would be greatly appreciated.
>Thanks
>Susan
>.
>

create a table prior to bcping data

I need to do the following;
1. bcp out data from our reporting server
2. Move bcp file to our archival server
Sounds pretty straight forward.. but of course there is
more...
Since we are using this data for archival purposes, we
just want to store the bcp file. My concern is that there
are many schema changes to the source table and I wanted
to make sure that I had the correct schema needed to bcp
that file back into a table, say three years from now.
Is there a option in bcp or bulk copy that would create
the schema for you? Or can this be done via DTS?
Thanks in advance
Susan
Any help would be greatly appreciated.
Thanks
SusanHi,
You can "Generate a script " of all objects and keep it along with the BCP
OUT data.
How to Generate scripts:
1. In Enterprise manager
2. Connect to the SQL server
3. Select the database you need to generate the script
4. Right click All Tasks - "Select the Generate SQL Script" option
5. Click Show all
6. Go to Options Tab - in the Table options select Script INdexes, Triggers
and Primary keys.../
Click the save button and save the file to your hard disk in safe place.
Once you require create a ne database and Execute this script
and BCP IN the the data back.
Thanks
Hari
MCDBA
"Susan" <anonymous@.discussions.microsoft.com> wrote in message
news:1a40701c41db3$13400250$a501280a@.phx
.gbl...
> I need to do the following;
> 1. bcp out data from our reporting server
> 2. Move bcp file to our archival server
> Sounds pretty straight forward.. but of course there is
> more...
> Since we are using this data for archival purposes, we
> just want to store the bcp file. My concern is that there
> are many schema changes to the source table and I wanted
> to make sure that I had the correct schema needed to bcp
> that file back into a table, say three years from now.
> Is there a option in bcp or bulk copy that would create
> the schema for you? Or can this be done via DTS?
> Thanks in advance
> Susan
>
>
> Any help would be greatly appreciated.
> Thanks
> Susan
>

Create a Table of Contents in Reporting Services

Hi,
I need to be able to create a Table of Contents for a Price List
Catalog in Reporting Services. Using the AdventureWorks example report
(Product Catalog.rdl), I need to be able to create something similar to
the following:
Table of Contents
Accessories
Bike Racks 2
Bike Stands 2
Bottles and Cages 3
Cleaners 4
Fenders 4
Helmets 5
Hydration Packs 5
Lights 6
Locks 7
Panniers 7
Pumps 8
Tires and Tubes 8
Bikes
Mountain Bikes 13
Road Bikes 15
Touring Bikes 19
Clothing
Bib-Shorts 22
Gloves 23
Jerseys 24
Shorts 25
etc.
It seems that Reporting Services would have something built into it to
do this since it is similar to the Document Mapping feature, but I have
not been able to locate it. Has anyone out there done this? Or have
any suggestions?
Thanks in advance,
Amy BoldenDoes these values all come from a data set? Then you could give you the
names of the items if you create a table against that dataset, and just show
the categories and subcategories. I'm not sure how you could do the page
numbers, though. In first case, I find that page numbers sometimes get
really mixed up when you save a report to PDF, because it behaves
differently in the browser than in the exported document. Also, I'm not sure
if you can pick up the page numbers that the report renders. You might be
able to do some tricks by counting items in each subcategory and dividing
them by a given number of rows, which would approximately give you the right
page numbers.
Do you have to have the page numbers? If not, you can use Jump to navigation
to jump from the table of contents to any of the items in your report /
catalogue.
Kaisa M. Lindahl Lervik
"Amy" <abolden@.lexington.com> wrote in message
news:1164643397.216130.159050@.j72g2000cwa.googlegroups.com...
> Hi,
> I need to be able to create a Table of Contents for a Price List
> Catalog in Reporting Services. Using the AdventureWorks example report
> (Product Catalog.rdl), I need to be able to create something similar to
> the following:
> Table of Contents
> Accessories
> Bike Racks 2
> Bike Stands 2
> Bottles and Cages 3
> Cleaners 4
> Fenders 4
> Helmets 5
> Hydration Packs 5
> Lights 6
> Locks 7
> Panniers 7
> Pumps 8
> Tires and Tubes 8
> Bikes
> Mountain Bikes 13
> Road Bikes 15
> Touring Bikes 19
> Clothing
> Bib-Shorts 22
> Gloves 23
> Jerseys 24
> Shorts 25
> etc.
> It seems that Reporting Services would have something built into it to
> do this since it is similar to the Document Mapping feature, but I have
> not been able to locate it. Has anyone out there done this? Or have
> any suggestions?
> Thanks in advance,
> Amy Bolden
>

Sunday, March 25, 2012

Create a sales report

I am using SQL 2000 reporting service. I need to create a sales report
described below.
1. Return the top 10 clients in terms of the sales in Month/Year such as
Sep. 2006.
2. Return the sales to these 10 clients in the past 11 months of the above
entered date such as from Aug. 2005 to Aug. 2006.
3. Line them up to compare the sales in 12 months.
It's very easy to return the top 10 clients. However, I really don't know
how to complete the second retrun. Since the result should be based on the
return of the first query and the result of the first query is dynamic. Is it
possible to have this done in SQL reporting service? I can't find any related
document. Please advice.
Thanks.the Employee Sales Report sample report for Adventureworks does something
very similar to this...The drill down, I think, is either a link or subreport.
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
I support the Professional Association for SQL Server ( PASS) and it''s
community of SQL Professionals.
"Jun" wrote:
> I am using SQL 2000 reporting service. I need to create a sales report
> described below.
> 1. Return the top 10 clients in terms of the sales in Month/Year such as
> Sep. 2006.
> 2. Return the sales to these 10 clients in the past 11 months of the above
> entered date such as from Aug. 2005 to Aug. 2006.
> 3. Line them up to compare the sales in 12 months.
> It's very easy to return the top 10 clients. However, I really don't know
> how to complete the second retrun. Since the result should be based on the
> return of the first query and the result of the first query is dynamic. Is it
> possible to have this done in SQL reporting service? I can't find any related
> document. Please advice.
> Thanks.

Create a PDF file directly to disk?

Hello all,

I use Reporting Services and an aspx page to create a PDF file. I need to save the file directly to a disk file with a name, without asking the user if he want to open or to save it. I'm using the folowing command:

Response.WriteFile("http://" & System.Environment.MachineName & "/ReportServer?%2fReportsApp%2fRptFSUnicoR&rs%3aCommand=Render&rs%3aFormat=PDF&MyID=" & IDFun,True)

Any idea how I do that?

Regards

HttpResponse.WriteFile requires either an absolute or virtual path to a sever-local filesystem location. So, referencing the URL of the report server won't work.

Also, I don't think you'll be able to bypass any browser's download prompt dialog without employing some sort of trusted control to do the HTTP request and file saving for you behind the scenes. SoftArtisans XFile is one such product that can do this.

-Chris

|||

Hi Chris,

Thank you for your answer. I'm afraid I will have to think in another solution.

As Report is generated from Reporting Services I thought I could have another parameter to force the "save" at the time I render the Report.

Best regards

sql

Thursday, March 22, 2012

Create a Letter

hi there,
Anybody know how to create a letter using Sql Reporting. My report
format is given below please advice which tool item i should use and
how to justify the letter body.
where xxx is from database
Dear Mr xxxx
xxxx is pleased to confirm the receipt of the sub amt for the xxx
project. the details of which are as follows
sub for : xxx
all : xxx
two sentence here
please advice how can i do this...
thnxJust drag a list control expand till you get a decent size of the letter and
place various text box's inside, each will be placed as per your letter eg.
some has fixed text and couple of variable textbox eg. Name of the person.
in the properties of the listbox create group and give a page break. in your
case the group will be set on emp name.. so it prints in different page for
each emp.
Amarnath
"Murali" wrote:
> hi there,
> Anybody know how to create a letter using Sql Reporting. My report
> format is given below please advice which tool item i should use and
> how to justify the letter body.
> where xxx is from database
> Dear Mr xxxx
> xxxx is pleased to confirm the receipt of the sub amt for the xxx
> project. the details of which are as follows
> sub for : xxx
> all : xxx
> two sentence here
>
> please advice how can i do this...
> thnx
>

Create a grants rights script fails during configuration

I am in the reporting services configuration tool. When I am on database setup I get Create a Grants Scripts Right with a red X. Everything else passes. I am using sql server credentials and the user is sa on the database server. Any help would be appreciated.

Joni,

Validate that sa user is in the security/users on your "ReportServer" database and also give to access to the RSExec Role for reporting services. When I encounter this issue by user Id did not have RSExec Role after adding it then I was able to configure my services correctly.

Ham

sql

Create a dataset with .Net code and render report from it. Possible?

Hi

I wonder if it is possible to create a dataset in code and then feed it to a Reporting Svcs (RS) report and have it rendered on the data from this dataset.

My collegues does this with Crystal and it would break my heart if I cant do this with (RS)...

I have tried to find a solution but so far, no luck.

Anyone have any ideas?

/F

If you use the reportviewer control in local mode you can do what you say. If you want this sent straight to hard copy that also can be achieved. I'm not sure if that meets your requirement.

Monday, March 19, 2012

Crashes all over!

Since downloading the released(?) version of SQL and Visual Studio 2005, my Visual Studio environment crashes quite often when doing Reporting Services work(and this was a clean install after a hard drive format). ASP.Net and other VS tasks work fine - it seems to be just Reprting Services that is buggy. Here are the instances in which it crashes:
- The most frustrating is when I'm trying to design a report based on stored procedures with parameters, if the parameters aren't wired up correctly and you hit preview report, Visual Studio crashes. This probably happened 20-30 times yesterday - so much that I've had to revert to a machine with Beta 2 to get some work done.
- When entering the Query Editor during the report wizard, if you click the design veiw button a couple of times too quickly, it crashes.

Also, when I start the new report wizard, I can't base a report on a Stored Procedure, only text is available (the dropdown is greyed out).

All this is happening on multiple machines with the new build (9.00.1399.06).

Is anyone else having this problem? Did I get the wrong download? Is there some type of fix for this?

Thanks for any help.

Trent...if the parameters aren't wired up correctly and you hit preview report, Visual Studio crashes.

Please enter a bug at http://lab.msdn.microsoft.com/ProductFeedback.

When entering the Query Editor during the report wizard, if you click the design veiw button a couple of times too quickly, it crashes.

This is a known issue. It will be fixed in SP1.

...when I start the new report wizard, I can't base a report on a Stored Procedure, only text is available (the dropdown is greyed out).

This is intentional. The query designer in the Wizard can only be used to create text queries.

Sunday, March 11, 2012

CR 8.5, dual monitor printing issues, delphi

Hi Guys,

We develop software in Delphi and Crystal Report 8.5 is used as reporting tool. Delphi's crystal component is used for coding.

I have a situation with a potential client. They have toshiba tecra m2 laptop which has GEForce FX 5200 video card which is dual monitor card. The OS is XP with SP2. When I click preview it is fetching data from the database and after that it hangs for ever neither displays view window or print. If the Harware accelaration is changed to 0 and Enable write combining is checked for this hardware properties the reports can be viewed and printed. But the client said these hardware properties are required for other applications on the machine.

Could any one help me resolving the issue? Is there any one have similar kind of problem?

Thanks in advance.

-KtuserThis behaviors can occur because of the 'Hardware acceleration' setting in Microsoft Windows. Reducing hardware acceleration on your computer will resolve these behaviors.

To access the 'Hardware acceleration' setting in Microsoft Windows, click Start > Settings > Control Panel > System > Display > Settings > Advanced > Troubleshooting.

There are typically six possible settings for 'Hardware acceleration': from 'None' to 'Full'. Reduce this value one setting at a time until the above behaviors are resolved.

The behavior of 'Enable write combining' has not been tested so not sure about it. Try the following along with the 'Enable write combining' checked and unchecked.

Friday, February 24, 2012

Couple of questions over SSRS over SSAS

I've created a sales analysis cube using SQL Server 2005 and want to do some reporting using SSRS. My problems are as follow:

1. How can I change the report parameter from a Date type into a member of the Date dimension? I need to do this because it's easier for business user to select the date and I can set a sensible default to it.

2. How can I create a hourly sales analysis report for all branches? If I add a chart into SSRS, I will get all shop data summing up right now into a single chart. Instead, I would like to have a chart for each branch. My business user will not accept to manually select different branch and generate the required chart.

3. How can I add a percentage to the corresponding value? My business user may want to view the sales performance during 1:00pm ~ 2:00pm comparing to the whole day. Moreover, they may also want to compare the sales on Monday to the sales for the whole week in percentage sense.

Thanks for any advise.

Regards,
AlexI've solved the third question. In order to do this, I need to add a new column to the matrix. After that, I put the following into expression of the new cell to calculate the percentage.

=Count(Fields!Sales_Count.Value)/Count(Fields!Sales_Count.Value, "matrix1_Day")

matrix1_Day is the column group name that I found out by right click and select the "Edit Group".

This solution is available in the book Microsoft SQL Server 2005 Reporting Services by McGrawHill pp.327-331.

Hope this can help someone later on.

Regards,
Alex

Couple of Questions about RS2005

My client was using Reporting Services 2000, but is currently leaning toward
Crystal Reports XI. The reason being is that most of their data is filtered
through DLLs providing business logic. In RS2000, the only way to use the
DLLs as a data source was to write an extension and essentially hard code
the calls to methods and parameters inside the extenstion. Their complaint
was that every time they had to add something they had to recompile the
extension, send it to the server admins, wait for installation and so on.
With CRXI, all they had to do was point to the DLL as a data source and they
were prompted for the method to use as well as paramters and so on. Is
something like what CRXI (and CRX for that matter) provides in RS2005? Can
they use a DLL for a Datasource without writing a wrapper every time?
On a second question, another client of mine is using SQL RS2000 with
Oracle providing the data for the reports and VS 2003 as the application.
We are late in the developement of the application but are considering
upgrading to RS 2005. I have been unable to give them several reasons why
upgrading to RS 2005 would benefit them, since i can only see a few
drawbacks. One drawback is that they would have to use a seperate IDE to
create the reports (the VS2005 like IDE). One thing they liked was the
ability to run ad-hoc reports and use an embedded viewer instead of a web
browser (we currently have IE embedded in the app to display reports). I am
under the impression that the Report Viewer component will only work with
VS2005 (.NET 2.0). Is this correct? Is there any way to use the component
with VS 2003 and .NET 1.1? We can't upgrade the app to 2005 anytime real
soon. Also, a list of benefits to RS 2005 would be greatly appreciated.
Thanks,
Rob Edwards
For the first question, I don't see why you need to hard code the method calls. for the query language for their data extension, they can use a syntax like:

class.method (parameter1, parameter2)

They can parse the call, load their assembly, use reflection to grab the class definition and execute the method (look at Type.GetMethod) using the parameters. The extension never needs to change, just the business object.

For the second question, the ReportViewer controls don't work with VS 2003. You can, however, use VS 2003 to publish to RS 2005. You won't get any of the new report design features (multi-value parameters, end user sort, etc.) until you move to VS 2005.

Friday, February 17, 2012

counting multiple values from the same column and grouping by a another column

This is a report I'm trying to build in SQL Reporting Services. I can do it in a hacky way adding two data sets and showing two tables, but I'm sure there is a better way.

TheTable
Order# Customer Status

STATUS has valid values of PROCESSED and INPROGRESS

The query I'm trying to build is Count of Processed and INProgress orders for a given Customer.

I can get them one at a time with something like this in two different datasets and showing two tables, but how do I achieve the same in one query?

Select Customer, Count (*) As Status1
FROM TheTable
Where (Status = N'Shipped')
Group By Customeryou can write a stored proc and use output parameters to return the values..and in your stored proc have multiple sql stmts to get the diff counts..

hth|||This might work for you, there is probably a better way, this can become very expensive with the 2 sub queries if there is a lot of data

 SELECT Customer,
(
SELECT COUNT(*)
FROM TheTable
WHERE Status = N'Shipped'
) AS Shipped,
(
SELECT COUNT(*)
FROM TheTable
WHERE Status = N'SomeOtherStatus'
) AS SomeOtherStatus
FROM TheTable
ORDER BY Customer

Tuesday, February 14, 2012

Counter column in the result of SELECT statement

Hi,
I need to have an extra column in my SELECT's result that counts from 1 to
the end of result.
I think I can do it in reporting softwares such as crystal report, but I
want to do this in query analyzer with the SELECT statement, something like
this:
Counter CustomerID Country
--
1 ALFKI Germany
2 ANATR Mexico
3 ANTON Mexico
4 AROUT UK
5 BERGS Sweden
...
Thanks,
AminSee if this helps:
http://support.microsoft.com/defaul...B;EN-US;q186133
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Amin Sobati" <amins@.morva.net> wrote in message
news:%23x4ocTDOEHA.3016@.tk2msftngp13.phx.gbl...
Hi,
I need to have an extra column in my SELECT's result that counts from 1 to
the end of result.
I think I can do it in reporting softwares such as crystal report, but I
want to do this in query analyzer with the SELECT statement, something like
this:
Counter CustomerID Country
--
1 ALFKI Germany
2 ANATR Mexico
3 ANTON Mexico
4 AROUT UK
5 BERGS Sweden
...
Thanks,
Amin|||Nice article! Thanks!
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:#SkADeDOEHA.2876@.TK2MSFTNGP09.phx.gbl...
> See if this helps:
> http://support.microsoft.com/defaul...B;EN-US;q186133
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
> "Amin Sobati" <amins@.morva.net> wrote in message
> news:%23x4ocTDOEHA.3016@.tk2msftngp13.phx.gbl...
> Hi,
> I need to have an extra column in my SELECT's result that counts from 1 to
> the end of result.
> I think I can do it in reporting softwares such as crystal report, but I
> want to do this in query analyzer with the SELECT statement, something
like
> this:
> Counter CustomerID Country
> --
> 1 ALFKI Germany
> 2 ANATR Mexico
> 3 ANTON Mexico
> 4 AROUT UK
> 5 BERGS Sweden
> ...
>
> Thanks,
> Amin
>
>

Counter column in the result of SELECT statement

Hi,
I need to have an extra column in my SELECT's result that counts from 1 to
the end of result.
I think I can do it in reporting softwares such as crystal report, but I
want to do this in query analyzer with the SELECT statement, something like
this:
Counter CustomerID Country
1 ALFKI Germany
2 ANATR Mexico
3 ANTON Mexico
4 AROUT UK
5 BERGS Sweden
...
Thanks,
Amin
See if this helps:
http://support.microsoft.com/default...;EN-US;q186133
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Amin Sobati" <amins@.morva.net> wrote in message
news:%23x4ocTDOEHA.3016@.tk2msftngp13.phx.gbl...
Hi,
I need to have an extra column in my SELECT's result that counts from 1 to
the end of result.
I think I can do it in reporting softwares such as crystal report, but I
want to do this in query analyzer with the SELECT statement, something like
this:
Counter CustomerID Country
1 ALFKI Germany
2 ANATR Mexico
3 ANTON Mexico
4 AROUT UK
5 BERGS Sweden
...
Thanks,
Amin
|||Nice article! Thanks!
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:#SkADeDOEHA.2876@.TK2MSFTNGP09.phx.gbl...
> See if this helps:
> http://support.microsoft.com/default...;EN-US;q186133
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
> "Amin Sobati" <amins@.morva.net> wrote in message
> news:%23x4ocTDOEHA.3016@.tk2msftngp13.phx.gbl...
> Hi,
> I need to have an extra column in my SELECT's result that counts from 1 to
> the end of result.
> I think I can do it in reporting softwares such as crystal report, but I
> want to do this in query analyzer with the SELECT statement, something
like
> this:
> Counter CustomerID Country
> --
> 1 ALFKI Germany
> 2 ANATR Mexico
> 3 ANTON Mexico
> 4 AROUT UK
> 5 BERGS Sweden
> ...
>
> Thanks,
> Amin
>
>

Counter column in the result of SELECT statement

Hi,
I need to have an extra column in my SELECT's result that counts from 1 to
the end of result.
I think I can do it in reporting softwares such as crystal report, but I
want to do this in query analyzer with the SELECT statement, something like
this:
Counter CustomerID Country
--
1 ALFKI Germany
2 ANATR Mexico
3 ANTON Mexico
4 AROUT UK
5 BERGS Sweden
...
Thanks,
AminSee if this helps:
http://support.microsoft.com/default.aspx?scid=KB;EN-US;q186133
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Amin Sobati" <amins@.morva.net> wrote in message
news:%23x4ocTDOEHA.3016@.tk2msftngp13.phx.gbl...
Hi,
I need to have an extra column in my SELECT's result that counts from 1 to
the end of result.
I think I can do it in reporting softwares such as crystal report, but I
want to do this in query analyzer with the SELECT statement, something like
this:
Counter CustomerID Country
--
1 ALFKI Germany
2 ANATR Mexico
3 ANTON Mexico
4 AROUT UK
5 BERGS Sweden
...
Thanks,
Amin|||Nice article! Thanks!
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:#SkADeDOEHA.2876@.TK2MSFTNGP09.phx.gbl...
> See if this helps:
> http://support.microsoft.com/default.aspx?scid=KB;EN-US;q186133
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
> "Amin Sobati" <amins@.morva.net> wrote in message
> news:%23x4ocTDOEHA.3016@.tk2msftngp13.phx.gbl...
> Hi,
> I need to have an extra column in my SELECT's result that counts from 1 to
> the end of result.
> I think I can do it in reporting softwares such as crystal report, but I
> want to do this in query analyzer with the SELECT statement, something
like
> this:
> Counter CustomerID Country
> --
> 1 ALFKI Germany
> 2 ANATR Mexico
> 3 ANTON Mexico
> 4 AROUT UK
> 5 BERGS Sweden
> ...
>
> Thanks,
> Amin
>
>