Posts

Sort Alpha Numeric data in SQL Server

Image
Sorting a alphanumeric data, A sample data is as below When i sort the data it looks like below I have modified the ORDER BY clause as shown below, and it returned the results in the proper order. (Note: The ID column is defined as varchar(20). So, I did the following to fix this issue: If ID is numeric, add 21 '0's in front of the ID value and get the last 20 characters If ID is not numeric, add 21 ‘’s at the end of the ID value and get the first 20 characters

SP_helptext issue has been resolved.

SP_helptext issue has been resolved . CREATE PROCEDURE [dbo].[sp_helptext2] (@ProcName NVARCHAR(256)) AS BEGIN   DECLARE @PROC_TABLE TABLE (X1  NVARCHAR(MAX))   DECLARE @Proc NVARCHAR(MAX)   DECLARE @Procedure NVARCHAR(MAX)   DECLARE @ProcLines TABLE (PLID INT IDENTITY(1,1), Line NVARCHAR(MAX))   SELECT @Procedure = 'SELECT DEFINITION FROM '+db_name()+'.SYS.SQL_MODULES WHERE OBJECT_ID = OBJECT_ID('''+@ProcName+''')'   insert into @PROC_TABLE (X1)         exec  (@Procedure)   SELECT @Proc=X1 from @PROC_TABLE   WHILE CHARINDEX(CHAR(13)+CHAR(10),@Proc) > 0   BEGIN         INSERT @ProcLines         SELECT LEFT(@Proc,CHARINDEX(CHAR(13)+CHAR(10),@Proc)-1)         SELECT @Proc = SUBSTRING(@Proc,CHARINDEX(CHAR(13)+CHAR(10),@Proc)+2,LEN(@Proc))   END  --* inserts last line  insert @ProcLines  select @Proc ;  --edited here. (whe...

System.IO.IsolatedStorage.IsolatedStorageException: Unable to create the store directory

Error Supporting Info System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.IO.IsolatedStorage.IsolatedStorageException: Unable to create the store directory. (Exception from HRESULT: 0x80131468) at System.IO.IsolatedStorage.IsolatedStorageFile.GetRootDir(IsolatedStorageScope scope, StringHandleOnStack retRootDir) at System.IO.IsolatedStorage.IsolatedStorageFile.InitGlobalsNonRoamingUser(IsolatedStorageScope scope) at System.IO.IsolatedStorage.IsolatedStorageFile.GetRootDir(IsolatedStorageScope scope) at System.IO.IsolatedStorage.IsolatedStorageFile.GetGlobalFileIOPerm(IsolatedStorageScope scope) at System.IO.IsolatedStorage.IsolatedStorageFile.Init(IsolatedStorageScope scope) at System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType) at MS.Internal.IO.Packaging.PackagingUtilities.ReliableIsolatedStorageFileFolder.G...

HTTP Error 500.0 - Internal Server Error Calling LoadLibraryEx on ISAPI filter "C:\Windows\Microsoft.NET\Framework\v4.0.30319\\aspnet_filter.dll" failed

HTTP Error 500.0 - Internal Server Error Calling LoadLibraryEx on ISAPI filter "C:\Windows\Microsoft.NET\Framework\v4.0.30319\\aspnet_filter.dll" failed I got this error, before you do any above stuff, just try below 1. Click on your computer icon in IIS 2. On right side, you see ISAPI filters - Click 3. Pick up the Filter name ASP.Net_4.0_64bit  and its path MIGHT HAVE AN EXTRA \ IN THE PATH, SO UNABLE TO LOAD THIS DLL,  %windir%\Microsoft.NET\Framework64 \\ v4.0.30319\aspnet_filter.dll 4. restart IIS - should resolve the error.

How to Stop Excel from giving a number in scientific notation

If you ever enter a very large number into a cell, you'll notice that Microsoft Excel displays it in scientific notation. For example, when you enter the number 1231231231234 in a cell, Excels displays 1.23123E+12. No matter how large you make the cell width, Excel still displays a number larger than 12 characters in scientific notation. To display the number in a format other than scientific notation, you need to reformat the cell(s). Here's how: We have two methods to get rid of this issue. Method 1 Concate the scientific notation with a single quote('), you will get the proper number. 1.11E+19 '11111111111111100000 But we have a issue still exists if it cross 20, here is an example. 1.11E+20 '1.11111111111111E+20 Disadvantage: So you cannot use method1 if it cross 20. Method 2 Step1:  Select the scientific notation , Go to format cell, select Text Step2:  Select the scientific notat...

Installation Product Key for Windows 8 and Windows Server 2012

Installation Product Key for Windows 8 and Windows Server 2012 Windows 8 - BN3D2-R7TKB-3YPBD-8DRP2-27GG4 Windows 8 N  - 8N2M2-HWPGY-7PGT9-HGDD8-GVGGY Windows 8 RT(ARM) - DXHJF-N9KQX-MFPVR-GHGQK-Y7RKV Windows 8 Professional  - NG4HW-VH26C-733KW-K6F98-J8CK4 Windows 8 Professional N - XCVCF-2NXM9-723PB-MHCB7-2RYQQ Windows 8 Professional with WMC - GNBB8-YVD74-QJHX6-27H4K-8QHDG Windows 8 Enterprise - 32JNW-9KQ84-P47T8-D8GGY-CWCK7 Windows 8 Enterprise N - JMNMF-RHW7P-DMY6X-RF3DR-X2BQT Windows Server 2012 Standard - XC9B7-NBPP2-83J2H-RHMBY-92BT4 Windows Server 2012 Datacenter - 48HP8-DN98B-MYWDG-T2DCC-8W83P Windows Server MultiPoint Standard - HM7DN-YVMH3-46JC3-XYTG7-CYQJJ Windows Server MultiPoint Premium - XNH6W-2V9GX-RGJ4K-Y8X6F-QGJ2G This is the key for installation only, not for activation.

The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine

This error bugged me for a whole day, I google a lotz and read many articles, but no use i was not able to fix this issue. I am using Windows 7 64bit O/S with 32bit Ms Office, i uninstalled Office completely and downloaded AccessDatabaseEngine_X64 and installed and run my application it worked smoothly. Then again i uninstalled microsoft access database engine and tried, i was getting that error message. So i concluded that i have to use Access database engine x 64 which was not installed during my ms office installation. you can download the same from the below URL. 64bit http://download.microsoft.com/download/f/d/8/fd8c20d8-e38a-48b6-8691-542403b91da1/AccessDatabaseEngine.exe 32bit http://download.microsoft.com/download/2/4/3/24375141-E08D-4803-AB0E-10F2E3A07AAA/AccessDatabaseEngine.exe But this did not resolved my problem, so i relayed on third party component(Infragistics).