.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

The ASP Column: ATL Server Versus ASP.NET

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

More Related Resource Links

Server Collation SQL_Latin1_General_CP1_CI_AS versus Latin1_General_CI_AS

Hi,Why does SQL Server 2005 sometimes install with a server collation of :Server Collation SQL_Latin1_General_CP1_CI_AS and other times a server collation of :Latin1_General_CI_ASWhat causes this ???What is the difference between the two ?Are there any problems restoring databases from one to the other ? Do the two different collations cause problems with applications ?

How to get a Table name from the column Value in Sql Server?

Hi All,I have a number of tables in the database and i have a column value as "abc" coming from one of the tables in the database,Now i need to find the table name from where this column value is coming?

SQL Server Unicode Characters in a column

I have an ETL and it fails because of some Unicode Characters. The unicode characters are getting inserted from somewhere in the application and we are still trying to ascertain the source of the same.But till then I need to run a T-SQL Query and find out the rows( I know the column name ) that are causing this problem, modify the data to the correct format and then run the ETL. Would i need to use a cursor? can anyone please advise? It was a bit urgent thus any help would be great! Thanks Nimish


Hi Friends, I am creating an application for a jewellery shop (MINOR PROJECT) in VB.Net but my problem is that I dont know how to insert multiple records for same bill number. consider the following condition Bill Number Customer Name   ............................................... Customer Address ................................................ S.No                 Item name                Rate    Qty                            Total 1                      abc                            5        5                                 25 2                 &nb

what is stored the guidlocal column in MSmerge_genhistory table (MS SQL Server 2000)?

In MSmerge_genhistory table there is a column called guidlocal. I noticed that for a large subset of the records on both the publisher and the subscriber, the value in this column is '00000000-0000-0000-0000-000000000000'. What does it mean? BOL says that guidlocal is: "Local identifier of the changes identified by generation at the Subscriber." but I still can't make it out what does '00000000-0000-0000-0000-000000000000' mean?

SQL Server 2008 multiple lines in a varchar(MAX) column?



I'm using varchar(Max) to store a text file content. It's not taking the newline character. I tried \n and char(13) etc.. whatever solution posted in the net.

ex : update test set f='This is line 1.' + CHAR(13) + CHAR(10) + 'This is line 2.' 

after updating it doesn't have any newline or linebreak. Can anyone help me in this how to have linebreaks in the varchar(max) field.

Thanks a lot.

Column Alias in ORDER BY Clause -- not supported in SQL Server 2005/2008 -- Causes enter migration



We are migrating from SQL Server 2000 to SQL Server 2008 R2 and our web application having thousands of SQL Statement with "Column Alias in ORDER BY Clause ".It is very difficulty to change all statements.

One of article says that SQL Server 2005/SQL Server 2008 not support "Column Alias in ORDER BY Clause and we have to replace with column name" because of this issue If we change Alias name to column name, we have do enter application/integrity testing. it is going to be big deal.

our client Decided to stop migration, Please some help is there any other alternative.



Conditional column selection in SQL Server 2005


I'm attempting to use a SQLDataSource to only pull those fields that are "different".  For example:  I have two tables; Artist & ArtistPendingChanges.  When an Artists updates their online profile, it's saved to the ArtistPendingChanges table, which is almost an exact copy of the Artist table.  I want the Artist to be able to go to a page where they can see what changes are pending.  Ideally I'd like to be able to build my SELECT statement to do something like this (in plain English):

SELECT ArtistPendingChanges.FirstName if it's different from the Artist.FirstName

Right now this is my query and it's displaying all fields which isn't that helpful if the user only updated one column:

SELECT     ArtistPendingChanges.LastName, ArtistPendingChanges.FirstName, ArtistPendingChanges.HomeAddress, ArtistPendingChanges.HomeAddressPublic, 
                      ArtistPendingChanges.MailAddress, ArtistPendingChanges.MailAddressPublic, ArtistPendingChanges.PostalCode, 
                      ArtistPendingChanges.PostalCodePublic, ArtistPendingChanges.HomePhone, ArtistPendingChanges.CommunityID, 
                      ArtistPendingChanges.HomePhonePublic, ArtistPendingChanges.AltPhone, ArtistPendingChanges.AltPhonePublic, ArtistPendingChanges.PhoneTypeID, 

How to Sum Each Column Values in sql Server 2008



I am facing problem in sql server 2008, my requirement is to sum the values in each columns in table and displays in total.

I used stored procedure to get 5 rows with values, but i need to total value for each column in bottom row. Like

COL    COL1    COL2   COL3    COL4    
AA          150     100        50        4
HHH       161     125        36        4
PPPP      160      85         75        4
JJJJJ        120      56        64         2
GGGG       40      31          9         2
TOTAL      ??       ??          ??        ??

I need to get the total for

Is it possible to save "Collections" to a single varbinary(MAX) field/column in a SQL Server 2008 da


I was thinking about the fastest way to retrieve a "set" of objects related to a specific user. For instance, if I was to create a website similar to Flickr where people upload lots and lots of photos(jpegs) what would be the fastest way to be able to retrieve those photos from the SQL Server database. Scenario 1: You store metadata about each file they upload to the website as a single row in a database table. Then when you want to retrieve a specific users uploaded files you simply scan the database file for every row matching the UserID and store them in memory.

SELECT PictureId, UserId, PathToFile, Caption, (etc.)

FROM Photos

WHERE UserId=@UserId

This, of course, gets all the information about all the photos a single user has uploaded. My concern with this approach is when the user activity goes from a few thousand to being in excess of a million.

This approach seems fine for a small website but does this method work for a million plus user website like Flicker or MySpace? When you have a million users and millions more photos does this approach still perform at acceptable speeds?

My idea was to actually attempt to create a collection in memory of "ALL" the PictureIds' for a single user and store them in-memory, in a collection and then save this collection as a single VARBINARY(MAX) field in the SQL

Convert NVARCHAR column to DateTime - SQL Server


Hi there,

Have spent few hours to get this working. I like to get help now. Please note MONTH AND DATES stored in single or double digits as they occur.

Unfortunately DATE TIME is stored in NVARCHAR Data type column as 2/9/2010,  22/10/2010 etc. Following UK Date here.

It is required to pull the data to COUNT No. of Expired. Obviously below one fails.

--AS Date AND Month stored in Single digits AND double digits , below statement 
--thorws Arthmetic overflow exception
SUM(CASE WHEN CONVERT(DATETIME,ExpiryDate,103) >= (CONVERT(datetime,'2010-01-07',103)) AND    
 CONVERT(DATETIME,ExpiryDate,103) < dateadd(month,1,(convert(datetime,'2010-01-09', 103))) THEN 1 ELSE 0 END) AS Expired  


Convert NVARCHAR column data into DATETIME - SQL Server 2000


ExpiryDate column in Table Data Type is NVARCHAR , storing Dates ONLY without time as 2/10/2010 , 12/10/2010 IN DD/MM/YYYY FORMAT.



SUM(CASE WHEN CONVERT(datetime,a.expirydate,103) >= (CONVERT(datetime,'2010-01-07',103)) AND 
		CONVERT(DATETIME,a.ExpiryDate,103) < dateadd(month,1,(convert(datetime,'2010-01-09', 103))) THEN 1 ELSE 0 END) AS Expired


Your help is greatly appreciated. Spent hours to get this resolved.


Derived Column Transform with average value (from SQL Server to SQL Server)


Hello everyone,

sorry if the following appears like a total newbie question, but I'm taking my first college course using MS SQL Server & SSIS, so please bear with me :)

I'm currently working on an assignment and face a couple (maybe mundane) problems:

  1. I'm trying to create a new (bit) column which should compare sales to an average and if the sales exceed the average the bit should be flipped, i.e. put a "1" into the database. The problem here: the average should be calculated from the same dataset and I'm trying to be smart and have it calculated with every new run of the data flow. But the derived column transform only takes one input, how can I get the average into it? I tried to have an aggregate transform and have that assigned to a variable which I'd have used in the expression statement, but I couldn't figure out how to do that - like I said, a I'm a newbie here.. :(
  2. Something similar, I'm trying to transform a gender code ("f"/"m") in the database to a bit value. The transformation itself I managed to get done (Excel output worked out fine), but I'm having trouble writing it back into the database table. In plain SQL (which I used before) I'd just write an UPDATE statement, but one point of the assignment is to use SSIS for all the tasks. When trying to use the OLE DB desti

In SQL Server Management Studio can you double click in column data?

I'd like to easily see data in the results data grid, for instance xml or a particular value so I can cut and paste it quickly. Is there a way to double click in column data for popup to appear so can see full data item and make edits immediately?

Call a SQL Server function(cleans html tags) on a derived column in SSIS


I have a task to move table having "text" data type for a column from SQL Server to CSV file so while transfering the data using SSIS I want to perform Cleanup on this column such as removing HTML tags, White spaces etc and then transfer it. Note: I dont have any option to store the table in the staging database as I will be running it on the production server directly.

Can any one help me accomplish this task???





How to Sum Column Values - Sql Server


Hi all ...I need to add values like this ... I have a table like this...

EmpID  Basic   PF    DA    HRA    MA  

1           500     200   100   100   100     =

2          100     100   100   100   100      =

I need to add these values and store it in column through query ...Like this

The Total Salary Would be like this.... BY  Adding First row of EmpId:1

Total Salary : 1000( 500+200+100+100+100)...

How to Write query for this...how to do this...kindly help.....




ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend