For some time i'm debating if i should leave columns which i don't know if data will be passed in and set the value to empty string ('') or just allow null.
i would like to hear what is the recommended practice here.
if it makes a difference, i'm using c# as the consuming application.
...
Hi all,
I am using SQL Server 2008 and Visual Studio 2008
I have two databases.I need to run a query in a database and grab those results
and update a table inside another database.
This process would be done every one hour automatically.
How can I do it? Data Transmission Services(DTS) used from SQL 2000?
Is there something better t...
Previously i working on SQL Server 2005 and i used MARS functionality but currently i am working on a old project and they want SQL Server 2000 as a backend.. and i want MARS kind of functionality in it.. please tell me how can i do this.. frontend is (VB.NET)
...
I am looking to create a temporary table which is used as an intermediate table while compiling a report.
For a bit of background I am porting a VB 6 app to .net
To create the table I can use...
SELECT TOP 0 * INTO #temp_copy FROM temp;
This creates an empty copy of temp, But it doesn't create a primary key
Is there a way to crea...
Hi all
There is a GridView with a Checkbox field on the page. And there is a button on the same page. There is a field which is related to the checkbox in the sql. Is there any simple way to update the sql? Not row by row.
Best Regards,
...
Hi,
Is reading the database records from the Database using Stored Procedures in NHibernate a good approach?If yes then why or if No, then also why?
The application has only the feature of reading values from the database using NHibernate in the data access layer no updates and no inserts just only retrieval.
...
We are storing the metadata of the content in the database tables. Out which there is a column named keywords which contains the keywords related to the content. So, should we normalise the table based on the keyword column because the keyword column will be holding multiple values.
...
Is there a T-SQL script to determine a database is currently mirroring or not? Is there a way to determine its partner?
Thank you very much.
...
Hi there,
I have a gridview in an asp.net page, and get the data by binding it to a SQL Server Table, I use C# and Stored Procedure in SQL server to bind the data. every thing works fine,except when I Delete multiple rows by using Stored Procedure, the gridview still shows the old data. actually I have couple of text boxes that the user...
I get the following error in SQL Server 2008:
There is insufficient system memory in resource pool 'internal' to run this query.
I recently migrated from SQL Server 2000 to SQL Server 2008, and the system is Windows Server 2K8.
...
how to truncate the numerics in a string in sqlserver
ForEx: String value: 200 May not be[34534]
Result: Many not be (reulst contains other than numerics)
...
I'm designing a query in SSMS 2005 which looks something like this:
SELECT COUNT(DISTINCT ColumnName) FROM Table WHERE ColumnName IS NOT NULL
When I run the query with COUNT() it returns the value 1. When I run it without COUNT(), SSMS reports the correct value eg 212 records.
The column in question is of datatype numeric(16, 0).
Fo...
I am using SQL Server 2005.
I have created a table with the columns ID and Courses. Records are as follows:
ID Courses
1. Java, ASP.Net, C#
2. Java
3. Java, C#
4. html
The Courses column is of type varchar and the values in it are comma separated.
I want to separate every word and store it in another or temp. ...
I have been looking for good newbie-advice on how to efficiently read data from an SQL Server to use in a JavaScript based timeline. Please consider that I have never done anything like this before. I have basic oop knowledge and would like to use json, I have written small java apps, but never used javascript (although I suppose it won'...
I have written a Windows service to collect information from all of our SQL servers. The service gets installed onto each server, and utilizing WMI and SMO, inserts relevant system information back to a central database. In order to get the SQL information, I use the following c# code:
List<Server> sqlServers = new List<Server...
The sort of stuff I'm after right now is quite basic:
Auto format
Detect ununsed variables
Variable naming convention checking
I wouldn't be surprised if there was a tool available that could handle more complex refactorings such as those found in Refactoring Databases, but I appreciate that the added complexities introduced by curr...
I use this query to get my average date:
CONVERT(DATETIME, AVG(CONVERT(FLOAT, ChargeOffDate))) as [Average C/O Date]
Which correctly give me the date '2003-08-12 14:17:22.103'.
When I use this query to get the weighted average date
CONVERT(DATETIME, SUM(CONVERT(FLOAT, ChargeOffDate) * FaceValue) / SUM(FaceValue))
I get a date like...
I have a problem executing two parameterized questions in one batch using SqlCommand in ADO.NET. (I want to reduce round-trips and avoid pinging)
Since I don't want execution plan pollution I expect ADO.NET to transform my CommandText from
"stmt1; stmt2" with all parameters belonging to stmt1 and stmt2 added to SqlCommand.Parameters
t...
I have a table that contains a user_id, and an XML field containing basically a series of values. I need to run a report against the data in the XML, but for the life of me I cannot get the XML out of the field in any useful fashion.
Here's the schema for the table:
|-----------------|
| type | name |
|-----------------|
| int | ...
Hello,
I'm trying to store Django data on MS SQL Server 2005 using:
http://code.google.com/p/django-pyodbc/
(pyodbc + FreeTDS)
As long as I'm storing string consist of ASCII characters everything is ok.
When I'm using unicode (ex. '\xc5\x82'), django throws ProgrammingError on:
ProgrammingError at /admin/cli/punktrejestracji/add/
('4...