Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





How To Enter More Number Of Rows In A Table Having More Number Of Columns At A Time


Hi

I want to enter rows into a table having more number of columns
 
For example : I have one employee table having columns (name ,address,salary etc )
                     then, how can i enter 100 employees data at a time ?

Suppose i am having my data in .txt file (or ) in .xls

( SQL Server 2005)




View Complete Forum Thread with Replies

Related Forum Messages:
Dataset Into A Table Or Matrix With Fixed Number Of Columns, Variable Rows
Hi

   I have a dataset with 2 columns, a rownumber and a servername - eg

 

rownumber servername

1                  server1

2                  server2

....

15               server15

 

   I want to display the servernames in a report so that you get 3 columns - eg

 

server1 | server2 | server3

server4 | server5 | server6

...

server13 | server14 | server15

 

   I have tried using multiple tables and lists and filtering the data on each one but this then makes formating very hard - i either end up with a huge gap between columns or the columns overlap

 

   I have also tried using a matrix control  but cant find a way to do this.

 

   Does anybody know an easy way to do this? The data comes from sql 2005 so i can use a pivot clause on the dataset if somebody knows a way to do it this way. The reporting service is also RS2005

 

Thanks

 

Anthony

 

View Replies !
Limitations In Term Of Number Of Tasks And Number Of Columns
Hi,

I am currently designing a SSIS package to integrate data into a data warehouse fact table. This fact table has about 70 columns among which 17 are foreign keys for dimension tables.

To insert data in that table, I have to make several transformations and lookups. Given the fact that the lookups I have to make are a little complicated, I have about 70 tasks in my Data Flow.
I know it's a lot, but I can't find a way to make it simpler. It seems I really need all these tasks.
 
Now, the problem is that every new action I try to make on the package takes a lot of time. At design time, everything is very slow. My processor is eavily loaded each time I change a single setting in one of the tasks, and executing the package in debug mode takes for ages. If I take a look at the size of my package file on disk, it's more than 3MB.

Hence my question : Are there any limitations in terms of number of columns or number of tasks that can be processed within a Data Flow ?

If not, then do you have any idea why it's so slow ?

Thanks in advance for any answer.

View Replies !
Counting Occurrence Of A Value && How To Format For Fixed Number Of Rows && Columns
Hi,

I need to count and display the number of records which have GradeTitle="SHO". I'm only starting to use BI development studio and all attempts at using the built in aggregate functions have failed.

Also, the report I wish to create has a fixed number of columns and a fixed number of rows as the info being displayed is really only counting values in the DB. I tried using Table but multiple rows were created.

I'd appreciate if anyone could point me in the right direction, as searching this forum turned out to be pretty fruitless for me.

Thanks in advance,
John

View Replies !
Number Of Columns In Table
How can I determine the number of columns in a table?

View Replies !
Number Of Rows In A Table
HI!
1.select count(*) from sales
2.select rows from sysindexes where id=object_id('sales') and indid<2

both queries return number of rows.
can anyone tell me which one is better?

View Replies !
Help With Percision?? If You Enter A Number In The Trillions Such 9,999,999,999,999 .net Or Sql Management Studio Cannot Display
can you please explian this chart:

 

The operand expressions are denoted as expression e1, with precision p1 and scale s1, and expression e2, with precision p2 and scale s2. The precision and scale for any expression that is not decimal is the precision and scale defined for the data type of the expression.





Operation
Result precision
Result scale *



e1 + e2


max(s1, s2) + max(p1-s1, p2-s2) + 1


max(s1, s2)



e1 - e2


max(s1, s2) + max(p1-s1, p2-s2) + 1


max(s1, s2)



e1 * e2


p1 + p2 + 1


s1 + s2



e1 / e2


p1 - s1 + s2 + max(6, s1 + p2 + 1)


max(6, s1 + p2 + 1)



e1 { UNION | EXCEPT | INTERSECT } e2


max(s1, s2) + max(p1-s1, p2-s2)


max(s1, s2)

* The result precision and scale have an absolute maximum of 38. When a result precision is greater than 38, the corresponding scale is reduced to prevent the integral part of a result from being truncated.

e1 = numeric(20,8)

e2 = numeric(20,8)

e1/e2

is this correct

max(6,s1 + p2 + 1)

 8 + 20 + 1= 29 since under 38 use 29 scale

scale would be max(6,29) = 29 correct???????


p1 - s1 + s2 + max(6, s1 + p2 + 1)
20 - 8 + 8 + 29 = 49 does that mean it truncate the least sugificant digits by 29 - 11 = 18 so the effective result should be numeric(38,18) or ##,###,###,###,###,###,###.000000000000000000 this does not seem to be what you get can some explain also we have seen that if you enter a number in the trillions such 9,999,999,999,999 neither .net or sql management studio cannot display the value?????

View Replies !
Number Of Columns In Table And Performance
Hi,
I have a denormalized table (done so with reason) with around 40 columns. I would never have to retrieve data for all of those columns together.
I haven't done any performance measurements yet but just wondering if anyone has ready answer to this: Will there be a performance degradation if I retrieve data from a table with many columns, even if not all columns are referred in the query? (for making it simple, lets assume that all or varchar type of columns, I just want to find out if performance degrades if there are too many columns in table)
 
Thanks in advance,
Sandeep
 

View Replies !
Max Number Of Columns In SQlServer Table
We are looking at developing a new app with a SQL Server db. As such, we're all newbies.

What is the maximum number of columns I can put in a SQL Server table?

Thanks in advance.

Bob Anderson

View Replies !
Set Number Of Columns In Matrix Table
I am creating a report that uses the Matrix control.  I need to display a fixed number of columns (5).  In my query, I am returning the top 5 rows of data. However, in some cases there are less than 5 rows of data returned from the dataset.  Is there a way to force the number of columns displayed in the matrix control and to populate with some text (such as "n/a") if no data is available?

 

Thanks!

ads

 

View Replies !
Limits On The Number Of Columns In A Table?
I have a database hosted by GoDaddy. Recently they made some changes to the interface and upgraded to SQL Server 2008. One or the other has made it impossible to access my data in one table.
 
The table is quite large in terms of the numbers of elements. Each row describes a dog and all the elements are components of the description. There are (I would guess) more than 50 elements all together.
 
When I try to search the database, the query form goes beyond the top and bottom of the page. I can scroll the database but the search tool  (which lies atop the data) does not scroll. The result is that I can't activate the search.
 
I've tried about 10 machines. All with IE6 display this fault. Machines with IE7 do not. I've tried various screen resolutions on the machines with IE6. That doesn't help.
 
I've checked other tables in the database. No problem.
 
In short, there's nothing I can do. I can't edit my data and GoDaddy says, "Tough."
 
Is there a limit on the number of columns (elements) in a table in SQL Server 2008?
 
Eric
 
 

View Replies !
Return Number Of Rows From A Table
Im am trying to return the number of rows in a table and i only can get a response of true thanks for any help 

View Replies !
What Is The Easiest Way To Get The Number Of Rows In A Table?
With classic asp I would do something like this:
set conn = server.createobject("ADODB.Connection")
conn.open "PROVIDER=SQLOLEDB;DATA SOURCE=sqlservername;UID=username;PWD=password;DATABASE=databasename "set rs = conn.execute("select count(*) from myTable")response.write rs(0)How can I do this with asp.net in the fewest number of lines?  

View Replies !
How To Find The Number Of Rows In A Table
I try to find the number of rows in a table with this commands:
CountRec = New SqlParameterCountRec.ParameterName = "@countrec"CountRec.SqlDbType = SqlDbType.IntCountRec.Value = 0MyCommand = New Data.SqlClient.SqlCommand()MyCommand.CommandText = "select count(*) as @countrec from Customer;"MyCommand.CommandType = Data.CommandType.TextMyCommand.Connection = MyConnectionMyCommand.Parameters.Add(CountRec)MyCommand.Connection.Open()MyReader = MyCommand.ExecuteReaderiRecordCount = CountRec.Value
This is the result:
Incorrect syntax near '@countrec'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near '@countrec'.Source Error:




Line 39:
Line 40: MyCommand.Connection.Open()
Line 41: MyReader = MyCommand.ExecuteReader
Line 42: iRecordCount = CountRec.Value
Line 43:
Source File: E:DevelopWebASPwebAccessTimberSalesUserEntry.aspx.vb    Line: 41
What to do? I need a complete example to see how it works.
Thanks...

View Replies !
Limit Of Number Of Rows In A Table ?
Is there a limit of how many rows a table can have in SQL compact Edition? I didn't find anything in the documentation, but I get regularly a funny error message "Expression evaluation caused an overflow. [ Name of function (if known) =  ]" when I try to create record number 32768 (is equal to 2 to the power of 15).

Where is this limit documented ?




Code Snippet

const string connectionString = "Data Source='" + dbFileName + "'; Max Database Size = 4091; temp file max size = 4091";



 using (SqlCeEngine testEngine = new SqlCeEngine(connectionString)) {
   testEngine.CreateDatabase();
 }






using (SqlCeCommand addMValuesTableComand = testDbConnection.CreateCommand()) {
  addMValuesTableComand.CommandText = "CREATE TABLE MValues (MSerieId int, TimeStamp smallint, Value real, PRIMARY KEY(MSerieId, TimeStamp))";
  addMValuesTableComand.ExecuteNonQuery();
}

//fill table
StatusLabel.Text = "fill MValues Table";
using (SqlCeCommand fillTableComand = testDbConnection.CreateCommand()) {
  int i = 0;
  try {
    int iterationCount = (int)RecordsCountNumericUpDown.Value;

    ProgressBar.Value = 0;
    ProgressBar.Maximum = iterationCount;
    for (i = 0;i < iterationCount;i++) {
      fillTableComand.CommandText = "INSERT MValues VALUES (1, " + i.ToString() + ", " + (i/100.0).ToString() + ")";
      fillTableComand.ExecuteNonQuery();
      ProgressBar.Value = i+1;
    }
  } catch (Exception ex) {
    ErrorTextBox.Text = "Error occured" + Environment.NewLine +
        "Iterations: " + i.ToString() + Environment.NewLine +
         "Error Message: " + ex.ToString();
  }
}

View Replies !
Number Of Table Rows In The Catalog
Hi,

What catalog table has the number of rows of a table ?

View Replies !
Variable Number Of Columns In A Temporary Table
How do I create a temporary table in a stored procedure with differeent number of columns?
That is: sometimes ten columns, sometimes 24 etc.

View Replies !
Create Table With Veriable Number Of Columns
 

Hi everyone,
 
I need to create temporary table in one of the SP.The problem is that number of columns in table will vary depanding on input in SP.
 
How can i create table with variable number of columns?
 
Thanks,
 

Alex

View Replies !
Query DB For Table Sizes/number Of Rows
Hi

I have a database with 150 tables. I want to make a query ranking those tables by table size and/or number of rows.

Is this possible?

Many thanks
ds9

View Replies !
Database Table Design For Huge Number Of Columns
Hi

I have a table (Sql server 2000) which has 14 cost columns for each record, and now due to a new requirement, I have 2 taxes which needs to be applied on two more fields called Share1 and share 2
e.g
Sales tax = 10%
Use Tax = 10%
Share1 = 60%
Share2 = 40%

So Sales tax Amt (A) = Cost1 * Share1 * Sales Tax
So Use tax Amt (B) = cost1 * share2 * Use tax

same calculation for all the costs and then total cost with Sales tax = Cost 1 + A , Cost 2 + A and so on..
and total cost with Use tax = Cost1 +B, Cost 2 +B etc.

So there are around 14 new fields required to save Sales Tax amt for each cost, another 14 new fields to store Cost with Sales Tax, Cost with Use tax. So that increases the table size.
Some of these fields might be used for making reports.

I was wondering which is a better approach out of the below 3:
1) To calculate these fields dynamically while displaying them on the User interface and not save in DB (while making reports, again calculate these fields dynamically and show), or
2) Add new formula field columns in database table to save each field, which would make the table size bigger, but reporting becomes easier.
3) Add only those columns in database on which reports needs to be made, calculate rest of the fields dynamically on screen.

Your help is greatly appreciated.
Thanks

View Replies !
Database Table Design For Huge Number Of Columns
Hi

I have a table (Sql server 2000) which has 14 cost columns for each record, and now due to a new requirement, I have 2 taxes which needs to be applied on two more fields called Share1 and share 2
e.g
Sales tax = 10%
Use Tax = 10%
Share1 = 60%
Share2 = 40%

So Sales tax Amt (A) = Cost1 * Share1 * Sales Tax
So Use tax Amt (B) = cost1 * share2 * Use tax

same calculation for all the costs and then total cost with Sales tax = Cost 1 + A , Cost 2 + A and so on..
and total cost with Use tax = Cost1 +B, Cost 2 +B etc.

So there are around 14 new fields required to save Sales Tax amt for each cost, another 14 new fields to store Cost with Sales Tax, Cost with Use tax. So that increases the table size.
Some of these fields might be used for making reports.

I was wondering which is a better approach out of the below 4:
1) To calculate these fields dynamically while displaying them on the User interface and not save in DB (while making reports, again calculate these fields dynamically and show), or
2) Add new formula field columns in database table to save each field, which would make the table size bigger, but reporting becomes easier.
3) Add only those columns in database on which reports needs to be made, calculate rest of the fields dynamically on screen.

4) Create a view just for reports, and calculate values dynamically in UI and not adding any computed values in table.

 

Your help is greatly appreciated.
Thanks

View Replies !
How To Archiv Table To Another Table With Unique Number For All Rows Once + Date
need help
how to archiv table to another table with unique number for all rows once + date time (not the second only day time +minute)
i need whan i insert to the another table add 2 more fields (unique number      ,         date_time )
 
this is the table 1 i select from
ID      fname      new_date      val_holiday
----------------------------------------------------

111   aaaa         15/03/2008       1
111   aaaa         16/03/2008       1
111   aaaa         18/03/2008       1
111   aaaa         19/03/2008       1
111   aaaa         20/03/2008       1
111   aaaa         21/03/2008       1
 
222  bbb            02/05/2008       3
222  bbb            03/05/2008       3
222  bbb            04/05/2008       3
222  bbb            05/05/2008       3
222  bbb            06/05/2008       3
222  bbb            07/05/2008       3
222  bbb            08/05/2008       3
222  bbb            09/05/2008       3
 
333  ccc            03/04/2008       4
333  ccc            04/04/2008       4
 
this is the table 2 i insert into
----------------------------------
ID      fname      new_date      val_holiday     unique number               date_time
--------------------------------------------------------------------------------------------------------------------

111   aaaa         15/03/2008       1                     666                           15/04/2008 17:03
111   aaaa         16/03/2008       1                    666                             15/04/2008 17:03
111   aaaa         18/03/2008       1
111   aaaa         19/03/2008       1                    666                             15/04/2008 17:03
111   aaaa         20/03/2008       1                    666                             15/04/2008 17:03
111   aaaa         21/03/2008       1                    666                            15/04/2008 17:03
 
222  bbb            02/05/2008       3                    666                             15/04/2008 17:03
222  bbb            03/05/2008       3
222  bbb            04/05/2008       3                   666                             15/04/2008 17:03
222  bbb            05/05/2008       3                   666                              15/04/2008 17:03
222  bbb            06/05/2008       3                  666                              15/04/2008 17:03
222  bbb            07/05/2008       3                  666                               15/04/2008 17:03
222  bbb            08/05/2008       3                  666                              15/04/2008 17:03
222  bbb            09/05/2008       3                  666                            15/04/2008 17:03
 
333  ccc            03/04/2008       4                666                               15/04/2008 17:03
333  ccc            04/04/2008       4               666                              15/04/2008 17:03
 
for evry archiv table to another table (insert) i need to get a unique number + date time (not the second only day time +minute)
 
next insert ......
ID      fname      new_date      val_holiday     unique number               date_time
--------------------------------------------------------------------------------------------------------------------

111   aaaa         15/03/2008       1                     667                           15/04/2008 17:15
111   aaaa         16/03/2008       1                    667                            15/04/2008 17:15
111   aaaa         18/03/2008       1
111   aaaa         19/03/2008       1                    667                            15/04/2008 17:15

.........................
.....................................................................667                            15/04/2008 17:15                 

 
next insert ......
ID      fname      new_date      val_holiday     unique number               date_time
--------------------------------------------------------------------------------------------------------------------

111   aaaa         15/03/2008       1                     668                           15/04/2008 08:15
111   aaaa         16/03/2008       1                    668                            15/04/2008 08:15
111   aaaa         18/03/2008       1
111   aaaa         19/03/2008       1                    668                            15/04/2008 08:15

.........................
.....................................................................668                            15/04/2008 08:15       

 
 
TNX

View Replies !
Add Column To Existing Table With Large Number Of Rows
Hey Guys

i need to add a datetime column to an exisitng table that has like 1.2 million records and its being accessed frequently
but i cant afford to stop the db at all

whenever i do :  alter table mytable add Updated_date datetime

it just takes too long and i have to stop executing the query after a couple of mins
I am running sql express 2005 sp2. db size is over 3 gb but still under the 4 gb limit

can u plz advice on how to add this column. its urgent!!

thanks in advance

View Replies !
What Is The Maximum Number Of Rows Retrieve From A Table To Reports
hi friends,

                   i got a error while retrieving more than 100000 rows (records) from a table .. can any one tell me  what is the maximum number of rows retrieve from a database to reports... and how can i overcome this issue...

 

View Replies !
Maximum Number Of Columns In A Sql Server Express 2005 Table
What is the maximum number of columns you can have in a sql server express 2005 table?

View Replies !
Retrieving Specific Page(number Of Rows) Form Table
hi,

i need SP that receive 2 integers ,@NUM_ROWS and @PAGE_NUMBER,
and return the rows in that page.
for example:

SP(4,2) will return 4 rows in page number 2 .

So if i have table with 9 rows i will get rows 5-8,
the first page is rows 1-4 the second page is 5-8 and the 3 page is row 9.

i have to assume that rows can be deleted form that table.
thanks

View Replies !
Which Is The Most Efficient Query To Find Out The Total Number Of Rows In A Table?
which is the most efficient query to find out the total number of rows in a table other than using  - SELECT COUNT(*) ... in query

View Replies !
Controlling Number Of Rows To Display In A Table And Matrix On One Page
Is there a way to control how many Detail Rows are displayed on one page in Table and Matrix controls?

View Replies !
How To Make A Table To Display Perticular Number Of Rows Per Page??
Hi,
Can anybody tell how to ristrict the number of rows per page in SSRS?
I have a table in my report.I know we have to use" =Int(RowNumber(Nothing)/25)" in group expression.But I already have 3 group expression in my table.Where to write??
Thanks.

View Replies !
Built In Limit Or Setting That Limits The Number Of Rows From An OLE DB Source Table In A Data Flow Task?
I have a table that I'm loading as part of a control flow that in turn is copied to a target table by using a data flow task. I am doing this because a different set of fields may be used from the source entry to create the target entry based on a field in the source table. That same field may indicate that multiple entries need to be created in the target table from one source table entry for which I use a multi-cast transformation.

The problem I'm having is that no matter how many entries there are in the source table, the OLE DB Source during execution only shows 7,532 entries being taken from the source table. If there are less than 7,532 entries in the source table, everything processes fine. More than 7,532 and the data flow task only takes 7,532 and then seems to hang. It also seems as though only one path of the multi-cast transformation is taken when the conditional split directs a source entry down that path.

Seems like a strange problem I know, but any insight anyone could provide is appreciated. Thanks.

View Replies !
SELECT Query - Different Columns/Number Of Columns In Condition
I am working on a Statistical Reporting system where:


Data Repository: SQL Server 2005
Business Logic Tier: Views, User Defined Functions, Stored Procedures
Data Access Tier: Stored Procedures
Presentation Tier: Reporting ServicesThe end user will be able to slice & dice the data for the report by


different organizational hierarchies
different number of layers within a hierarchy
select a organization or select All of the organizations with the organizational hierarchy
combinations of selection criteria, where this selection criteria is independent of each other, and also differeBelow is an example of 2 Organizational Hierarchies:
Hierarchy 1


Country -> Work Group -> Project Team (Project Team within Work Group within Country) 
Hierarchy 2


Client -> Contract -> Project (Project within Contract within Client)Based on 2 different Hierarchies from above - here are a couple of use cases:


Country = "USA", Work Group = "Network Infrastructure", Project Team = all teams
Country = "USA", Work Group = all work groups

Client = "Client A", Contract = "2007-2008 Maint", Project = "Accounts Payable Maintenance"
Client = "Client A", Contract = "2007-2008 Maint", Project = all
Client = "Client A", Contract = allI am totally stuck on:


How to implement the data interface (Stored Procs) to the Reports
Implement the business logic to handle the different hierarchies & different number of levelsI did get help earlier in this forum for how to handle a parameter having a specific value or NULL value (to select "all")
(WorkGroup = @argWorkGroup OR @argWorkGrop is NULL)

Any Ideas?  Should I be doing this in SQL Statements or should I be looking to use Analysis Services.

Thanks for all your help!

View Replies !
Max. Number Of Columns
does anyone know what the maximum number of columns is that an SQL table can contain ?

i seem to remember that in the past it was something like 200 columns max, but i don't know whether that has changed with newer versions of SQL Server

looking at the spec for SQL Server 2000 i see a maximum of 1024 columns per base table - am i right in interpreting this to mean the maximum is now 1024 columns or is a base table different from an SQL table ?

View Replies !
Getting Number Of Rows
Is there a simple way to get the number of rows of a table besides going through and counting all of the rows programmatically?

View Replies !
Number Rows
I have wrote a query that returns product details for all orders that are at stage 6. Is there a way to number the product lines in each order no?!

Eg.
Order 1
Product 1 - 1
Product 2 - 2
Product 3 - 3

--counter restarts
Order 2
Product 1 - 1
Product 2 -2

thanks?

View Replies !
Number Of Rows
Hello!

I try to figure out how to change the number of rows at each page, but I'm stuck.

I have no page break , but I get a number of pages when I view my report. Is there any way to set the number of rows shown at each page?

//Cissi

View Replies !
Number Of Rows.
Hi,
I have the following issue:

Here is my query:
The result is below:
(SELECT 'Succesful' AS metric_value,
SUM(CASE WHEN Product_Cat_Tier_3__2_ IN ('S Infr', 'S Entitl', 'S Provi') THEN 1 ELSE 0 end) AS S,
SUM(CASE WHEN Product_Cat_Tier_3__2_ IN ('Ading', 'Bending Floor', 'Net Ops' ) THEN 1 ELSE 0 end) AS N,
SUM(CASE WHEN Product_Cat_Tier_3__2_ IN ('Management NET', 'erprise') THEN 1 ELSE 0 end) AS ENTERP,
SUM(CASE WHEN Product_Cat_Tier_3__2_ LIKE '%Sector%' THEN 1 ELSE 0 end) AS TS,
SUM(CASE WHEN Product_Cat_Tier_3__2_ LIKE '%NMS%' THEN 1 ELSE 0 end) AS MS,
SUM(CASE WHEN Product_Cat_Tier_3__2_ = 'Fading' ) AR TS,
month(DATEADD(second, Actual_End_Date, '1969-12-31 8:00:00 PM')) as month
FROM Change

WHERE YEAR(DATEADD(second, Actual_End_Date, '1969-12-31 8:00:00 PM')) = YEAR(GETDATE()) AND

Product_Cat_Tier_1_2_ = 'Network' AND
Product_Cat_Tier_2__2_ = 'RFC' AND (Change_Request_Status = 11 and Status_Reason = 6000) AND
Product_Cat_Tier_3__2_ NOT IN ('Installation', 'Voice AND Video')
GROUP BY YEAR(DATEADD(second, Actual_End_Date, '1969-12-31 8:00:00 PM')), month(DATEADD(second, Actual_End_Date, '1969-12-31 8:00:00 PM'))
)

=====================
Result
================
metric_value S N ENTERP TS MS AR month
------------ -- -- ------ -- -- -- ----
Succesful 0 1 0 0 0 0 5
Succesful 0 1 1 0 0 0 6

And I want the following output, because now is June so month is equal to 6.
metric_value S N ENTERP TS MS AR month
------------ -- -- ------ -- -- -- ----
Succesful N N N N N N 1
Succesful N N N N N N 2
Succesful N N N N N N 3
Succesful N N N N N N 4
Succesful 0 1 1 0 0 0 5
Succesful 0 1 1 0 0 0 6

WHERE , N = NULL
THANK YOU

View Replies !
Number Of Columns And Performance
Hi,I'm designing a new database and I have a doubt in which surely youcan help me.I'm storing in this database historical data of some measurements andthe system in constantly growing, new measurements are added everyday.So, I have to set some extra columns in advance, so space is availablewhenever is needed and the client doesn't have to modify the structurein SQL server.The question is: the more columns I add "just in case", the slower theSQL reads the table?Of course the "empty" columns are not included in any query until theyhave some valid data inside.Will I have better performance if I configure only the columns beingused at the moment, without any empty columns?Thanks in advance.Ignacio

View Replies !
Dynamic Number Of Columns
when using sorred procedure to create a temporary table is it possable to base the number of columns in that table on another variable?

View Replies !
ADO 2.8 Is There Any Limitation On Number Of Columns?
 

Hi,
   

           I'm using ADO 2.8 in a vb.net code. The .Net framework version is 1.1 and  windows server 2003. 
 

I'm firing a query that result in 256 columns and few hundred rows. Here is the snapshot of the code
 


adoRs = New ADODB.Recordset

With adoRs

.CursorLocation = CursorLocationEnum.adUseClient ' adUseClient

.ActiveConnection = adoCn

.CursorType = CursorTypeEnum.adOpenStatic ' adOpenStatic

.LockType = LockTypeEnum.adLockBatchOptimistic ' adLockBatchOptimistic

.Open(strSQL)

End With
 
 
The returned record set is empty with all the the 256 columns name.  Could anyone shed light why it is returning empty recordset. Is there any limitation on number of columns that a recordset can hold. 
 
Thanks in advance.
 
With regards
Ganesh
 





 
 
 

View Replies !
The Number Of Columns Is Incorrect
While Running a SSIS package after migrating it from DTS to SSIS , in MS SQL Server 2005 ,
it gives error while execution :

DTS_DTSTASK_DATAPUMPTASK_2
The number of columns is incorrect.verify the column metadata is valid.
"OLEDB Destination "(22) Failed the pre execution phase and returned error code 0xC0202025
Thanks for the response .....

View Replies !
How To Change A Decimal Number To Percent Format Number?
in my sql, i want to change a decimal number to percent format number, just so it is convenient for users. for example there is a decimal number 0.98, i want to change it to 98%, how can i complete it?

thks

View Replies !
Sql Help With Number Of Rows Return Value
hi,i have a stored procedure like this in SQL server ,it returns proper value if data is there for a given id.But if there is no data,it returns row/rows of NULL value and that is counted towards "number of row returned"..Shouldn't it be like,if there are null values in a row,that row should not be counted towards rows returned value .?Rightnow if no value returned from either of the select,it still returns as 2 rows instead of 0 rows.How do handle this situation in SQL? thanks for your help
SELECT     SUM(col1) AS SUM_COL1, SUM(col2) AS SUM_COL2, SUM(col3) AS SUM_COL3, SUM(col4) AS SUM_COL4FROM         TABLE1WHERE     (ID = nn)     UNION all
 SELECT      SUM(col22) AS SUM_COL22 ,cast(null as int) as c1,cast(null as int)as c2,cast(null as int) as c3FROM         table2WHERE     TABLE2 = nn)

View Replies !
Set Number Of Returned Rows !!! Please Help Me.
I want to select data from a table with 5.000.000 rows. It's very slowly. Do you now, how I can select only a XY number of rows? I can't use TOP in select query. User see only 20-30 rows on his page, but he can use page_up, page_down. Is possible to something as lazy load?

View Replies !
Very Large Number Of Rows
We are busy designing a generic analytical system at work that willhold multiple analytic types over time. This system is being developedin SQL 2000.Example of tableIDENTITY intItemId int [PK]AnalyticType int [PK]AnalyticDate DateTime [PK]Value numeric(28,15)ItemId - the item for which the analytic is being storedAnalyticType - an arbitrary typeThe [PK] tag indicates the composite primary key.Our scenario is the following:* For this time series data, we expect around 250 days per year(working days) and the dataset could extend to over 20 years* Up to 50 analytic types* Up to 20,000 itemsLooking at the combined calculation - this comes to roughly somethinglike25 * 20,000 * 50 * 250 or around 5 billion rows.We will be inserting around 50*20,000 or around 1 million rows each day(the inserts will take place in the middle of the night (outside themain query time) - this could be done through something like BCP orBULK INSERT.Our real problem is we have not previously worked with such largetables before and are nervous that our system is going to grind to ahalt. Our biggest tables are around 20 million rows at the moment.Scanning through google and microsoft's own site we have found aparititioning method that is available.http://www.microsoft.com/resources/...art5/c1861.mspxHaving experimented with the above system it seems rather quirky andlooking at the available literature it seems that this is not moreeffective than a clustered index as far as queries go.It needs to be optimized for queries like:Given the ItemID and the AnalyticType search for a specific date or aspecific range of dates.If anyone has any experience or helpful suggestions I would reallyappreciate it.ThanksA

View Replies !
How To Count Number Of Rows
Hello, DeanTry this:select distinct c1, c2 into #tmp_1 from t1select count(*) as cnt from #tmp_1drop table #tmp_1With best regards.

View Replies !
Number Of Rows Returned By Sp
Is it possible to get the number of Rows returned by a stored procedure in a profiler ?
if yes, what parameters shud I be looking for?

THanks

Harshal

View Replies !
Count Number Of Rows In Asp.net
hey, how would i count the number of rows, with out using a loop??

thanks, Justin

View Replies !
Get Number Of Rows Deleted
How do we get the number of rows deleted from a table?

@@rowcount is returning 0

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved