Showing posts with label address. Show all posts
Showing posts with label address. Show all posts

Friday, March 9, 2012

Keeping Tables Sorted

we have a simple table

Key, Name, Address, City, State, Zip ............ect

I would like to keep this table sorted by Name, theirfore I won't have to sort my results with every querry.

I think I need to add something to my insert to tell my table - "Hay take Jones", open up the prober place and stick him in the proper spot.

Ex: We have Appleby and Robertson in our table now. My insert would tell SQL Server to take Jones, figure our where he belongs (alpha), and stick him in, resulting in.

Appleby
Jones
Robertson

This way I wont have to as the querry to sort stuff every time I reference this table, this will save lots and lots of overhead. and help keep my clients happy with quick(er) response.

thanks in advance -arthurCreate a clustered index for the table using the Name field:

1. In Enterprise Manger right-click the table and select All Tasks->Manage Indexes
2. Click "New..."
3. Select the Name field and give the index a name (e.g., Name). Check the box near the bottom marked "Clustered index". Click OK.

What this does is physically place the records in the table sorted according to the index. This isn't a free lunch however as the time taken to insert a new record will be a bit longer than it was before the index.|||THanks for the quick response, unfortantly, I don't have Enterprise manager (God I miss working for a big guy) Anyway .............., I do have something called SQL ExecMS, which dosn't do much more than allow me to view my table, but gives me a Sql interface, can you put the above into a SQL statement(s) (my forgetfullness of SQL is probably showing by now) Thanks again -arthur|||


CREATE CLUSTERED INDEX [SomeIndexName] ON [dbo].[TableName]([FieldName]) ON [PRIMARY]

Wednesday, March 7, 2012

Keep Together Function Not Working

These 3 posts all address same problem: Basically, have some data, either in
a group of text boxes or in a table and they are ending up on two pages of
the report, when they should only be on one.
Has anyone found a solution?
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=47aa22ae-f3a2-41bd-9b5b-a233914f7c7d&sloc=en-us
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=12c7fbc6-1aca-4e3a-9b2f-e15917fb7c22&sloc=en-us
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=76f3399b-06f1-4438-bd6a-d468578e6e20&sloc=en-usI HAVE FOUND A "DIRTY" WAY TO GET THE GROUPINGS WORKING.
THE TRICK IS TO CREATE NESTED GROUPING TABLES.
For example,
I have a query output with Agent name , client name and client details.
In order to keep them grouped, I create a table with one group, the Agent
(header, no details).
In that group, I create a table with one group, the Client (same as above).
And in that I group I create another table with the Client Details.
I only use details at the lower lever (the client details).
That works.
I don't like it because it makes the report complicated but it works.
"msflinx" wrote:
> These 3 posts all address same problem: Basically, have some data, either in
> a group of text boxes or in a table and they are ending up on two pages of
> the report, when they should only be on one.
> Has anyone found a solution?
> http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=47aa22ae-f3a2-41bd-9b5b-a233914f7c7d&sloc=en-us
> http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=12c7fbc6-1aca-4e3a-9b2f-e15917fb7c22&sloc=en-us
> http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=76f3399b-06f1-4438-bd6a-d468578e6e20&sloc=en-us
>|||Very interesting approach. Should work though and since most of my reports
are only three levels deep, I might try it.
Thanks for you assistance.
"Kyriakos" wrote:
> I HAVE FOUND A "DIRTY" WAY TO GET THE GROUPINGS WORKING.
> THE TRICK IS TO CREATE NESTED GROUPING TABLES.
> For example,
> I have a query output with Agent name , client name and client details.
> In order to keep them grouped, I create a table with one group, the Agent
> (header, no details).
> In that group, I create a table with one group, the Client (same as above).
> And in that I group I create another table with the Client Details.
> I only use details at the lower lever (the client details).
> That works.
> I don't like it because it makes the report complicated but it works.
> "msflinx" wrote:
> > These 3 posts all address same problem: Basically, have some data, either in
> > a group of text boxes or in a table and they are ending up on two pages of
> > the report, when they should only be on one.
> >
> > Has anyone found a solution?
> >
> > http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=47aa22ae-f3a2-41bd-9b5b-a233914f7c7d&sloc=en-us
> >
> > http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=12c7fbc6-1aca-4e3a-9b2f-e15917fb7c22&sloc=en-us
> >
> > http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=76f3399b-06f1-4438-bd6a-d468578e6e20&sloc=en-us
> >
> >