Tag archive for ‘Database’

Stored Procedure to return an integer value and a table of results.

Question:
I have a stored procedure that returns an integer value (ie the number of rows modified).  I need to know how to return the number of rows modified and the actual modified rows.
I can make an output parameter to hold the number of rows modified, but the rows being modified are in a temp table [...]

Using Microsoft SQL Server Management Studio

Question:
I am using Microsoft SQL Server Management Studio (with SQL Server Express 2008) , and I would like to duplicate a database.  I have tried to take the original database and make a backup, and then restore to to an empty database, but I am unable to figure out how to do it.  If I [...]

Collation Error in SQL 2005

Question:
Hi Experts,
I have just migrated my database from MS-SQL 2000 to 2005.
I observed that most of the views i earlier createdon the 2000 are not sorted accordingly on the MSSQL 2005.
I have severally changed the collation with no success. I have also reinstalled with dictionary settings with no success.
Please tell me what to do. Am [...]

Splitting an Excel File into Multiple Access Tables on Import?

Question:
Hello! New around here. I’m learning more and more as to how badly the data is set up where I work, and coding isn’t exactly my fortay.
Currently, I have many excel files containing 256 columns of data (these are actually coming from .sav (SPSS) files containing 600 or so columns). Here’s the kicker: there are [...]

Can I create Sybase 12.5.4 Answer File?

Question:
Can I create Sybase 12.5.4 Answer File that’s not a silent installation and allows me to run the set-up interactively?
How can I do this?
Solution:
(part of text from http://manuals.sybase.com/onlinebooks/group-as/asp1251e/installnt/@Generic__BookTextView/6494)
Silent installation
A silent installation (sometimes referred to as an unattended install) is done by running InstallShield and providing a response file that contains answers to all of InstallShield’s [...]

Modify sql table from excel sheet

Question:
I have a sql table that contains items from a pos solution, and it contains items that have a unique barcode and item number. When I first setup the table a made the item number and the barcode (UPC) (two columns in this table by the way) the same, I have now found out by [...]

How to calculate the record size for Orcale database table?

Question:
Hello,
I would like to know that, how to calculate the record size for Orcale database table (e.g. for one row)?
[in bytes]
I actually have the following formula, but I am not sure if it is correct:
SELECT TABLE_NAME,
(SUM(LENGTH(column_name)) +
SUM(DECODE(DATA_LENGTH,0,2048,DATA_LENGTH))
)*(1.2) AS rec_size
FROM all_tab_columns
WHERE TABLE_NAME = <TABLE_NAME>
AND OWNER= <TABLE_OWNER>
GROUP BY TABLE_NAME
Would you please give some advice?
Thanks!!
Solution:
you can use vsize [...]

SQL Server C# Howwwwwww

Question:
Okay Am totally Confused
I am using C#
Right I have SQL SERVER 2008 ENTERPRISE EDITION
—–I created a database in it called it TestDB
—–I made a Table called it TestTable
—–The columns I have are ID, NAME, PASS, SERVER, DATABASE.
Right what I want to do is say I have a TextBox and a Button right
and
When I type say [...]

HOw do I write a query to delete records from one table that match a number from another table using mysql

Question:
I need to delete a few thousand records from a client db.  I’m trying to fine the quickest, safest way to do this.  This is a nutshell is what I want to do:  IF R_STATUS column in the REQUEST TABLE = ‘A’ find the R_NUMBER in the ANSWER table that matches the R_NUMBER in the [...]

using insert into command with sequence

Question:
hi
i havejust made a sequence on my table, now i want to insert a new row into it but it seems to be some error that i can not understand.
can anyone please provide me with some answer
please note that my table name is “customers”
and the type error i get is here;
ERROR at line 2:
ORA-00984: column [...]