You would think it would be easy to find out what 1 means, but google is not being helpful (I would guess that it does not see the @@ part and error is to generic.
MSDN (at least on the @@Error page and Concept page) is also unhelpful.
Any help here?
...
I'm working on a small project regarding classic ASP and sql server.
I have a drop down menu where the user can enter name, last name, etc. and it will create a query based on that and create a table displaying the result.
What I want to add is the option to export to excel after the table is created. I've looked at other tutorials but...
I get this error when trying to connect to SQL Server.
Error is:
Login failed for user ''. The user is not associated with a trusted SQL Server connection.
Server resides remotely. From my localhost I am trying to connect using this URL:
"jdbc:sqlserver://serverName:portNo;integratedSecurity=true;databaseName=myDB"
But when I use ...
I've read over a number of posts regarding DB table design for a common one-to-many / users-to-friends scenario. One post included the following:
USERS
* user_id (primary key)
* username
FRIENDS
* user_id (primary key, foreign key to USERS(user_id))
* friend_id (primary key, foreign key to USERS(user_id))
> This will s...
I would like to stress test my database, which is a hospital patient database.
The current one is 2 GB. I would like to have a 100GB database, so I would like do the following:
1) read each patient record
2) create a new, fake patient id, and store back to database
3) repeat until size reaches 100GB
What is the easiest way of doing th...
Initially I was getting a "no SELECT privilege" error when attempting to query contents for a report I need to create. So we granted DatabaseMailUserRole in MSDB to my account - I see columns, but none of the data we know to exist.
What am I missing that needs to be done for my account to see the data?
...
I have a query that is taking a lot longer then usual, and I cannot tell if it is stuck.
The query is something like this:
INSERT XXXXXX WITH (TABLOCK)
SELECT * FROM YYYYYY with (NOLOCK)
WHERE ZZZZZZZZ = 1
This will insert hundreds of millions of rows. I have an index on ZZZZZZZZ.
There are no blocking sessions. When I check sys.d...
How I can delete all records from all tables of my database? Can I do it with one SQL command or I need for one SQL command per one table?
...
in sql server I do like this:
insert into foo(name) values('bob')
select @@identity;
so I get a query/scalar result displayed
how to this with postgres ?
...
The Problem
i'm trying to import data into a table using SQL Server Management Studio's Import Data task. It only brings in 26 rows, out of the original 49,325. (Edit: That's where 99.9% comes from: (1-26/49325)*100 = 99.9%
Using DTS in Enterprise Manager correctly brings all 49,325 rows.
Why is SSMS not importing all rows, reporting ...
I am having some issues when running sp_executesql on a database table. I am using an ORM (NHibernate) that generates a SQL query that queries one table in this case. This table has about 7 million records in it and is highly indexed.
When I run the query that the ORM spits out without the sp_executesql, it runs very quickly and pro...
I have created a web enabled DB for a company as a part of my internship and it's up and ready. However the connection string of the server is already coded by me. But the IT guy said that he wanted me to read the connection string from a file containing various connection strings and choosing whichever it wanted to at that time.
My que...
I have a column chart in which I want to display the % of Invoiced Sales in 24 hours and % of Not Invoiced Sales in 24 hours. The data should be categorized by date, so for each date I can see the % of invoiced and not invoiced sales within 24 hours.
My dataset contains:
sales id,
sales status (only invoiced are permitted and I took...
I have a poorly normalized set of tables and am trying to correct this issue. The DB is MS SQL 2005.
Table1 has an id field (record ID), a mainID field (person ID) and a sequence field (and int that determines the sort order)
Table2 has its own id field and a copy of the id for the first record by a person (sequence = 1).
I've added ...
How can I see all disk usage of all my databases on a given SQL Server in one single query. I have around 15 different databases on my server and I want to see which one is using the maximum disk space.
I know I can see reports of Disk Usage per database in SSMS or logon to the server and see the size of MDF/LDF files but this seems li...
What is the most common naming convention for SQL Database tables?
Was it historically one way and now it's better to do another way?
What are the most common practices now?
...
I have deployed my web application on www.aspspider.com (which also support MS SQL server db), while connecting to the database, it is giving me an error. So what changes should be made in the connection string, so as to make the connection possible.
Error Message:
A network-related or instance-specific error occurred while establishin...
All language like C#,VB.NET all have try catch finally block but SQL server only have try and catch only why not finally block is given is there any specific reason for that?
...
I am using SQlserver procedure and i have habit of using of Print Statement in PRocedure
to differentiate the code of PRocedure.
I have almost 200-250 procedure in my DB.
Should print statement affect the Performance?
I am working on MultiUser Windows application.
...
I want to know that does Apply transaction in stored procedure slow the execution of query?
if yes the why?
i want to know the actual internal processing of sql server when we apply transaction on query?
...