9 digit date number (ex.01.01.2014 => 131989761)
HelloA program saves date data in SQL like this01.01.2014 => 131989761 01.02.2014 => 131990017and I want to use this data in excel but I can't convert it normal date format in excel.Please...
View ArticleSP for Check Existing Some Char in Col (Returns False / True)
Hello Friends, I am looking for a SP you can check values within a field.Parameters: ASCII code value (from) ASCII code value (until) Output parameters: Boolean output (whether present or not) Is...
View Articleunion vs case in select list
Hi, which one will be faster( i have tested it , i wanted to know in general)1)select *from abc drr LEFT JOIN (SELECT bridgeid FROM bridge1 SS WHERE SS.Status=1...
View ArticleCreate Column in SQL Server
Hi all, I am having below table. create table Student_Register ( Name varchar(30), FatherName varchar(35), Address1 varchar(100), Address2 varchar(100), Place varchar(75), Pincode int, SchoolName...
View ArticleConvert characters to date?
I have list of records that displays the month and the year in the following format: January-2013February-2014June-2012How can I convert the characters to date for the month and year?Thanks in advance
View ArticlePlz tell me why in a view: "order by" has to come with "top"
I don't know why in a view: "order by" has to come with "top". Please tell me why? Thanks in advanced!--The Anh--
View ArticleHelp in update generic query
HI, Some super_id is wrong or null in my #cred table and I want to update with the correct super_id. The best way is to COUNT max 'super_id' on the basis of column-'b_id' and 'bid_code'. Query...
View ArticleFind 2nd highest Salary from two table.
Hi Frndzz..Plz Tell me that how to find 2nd , 3rd highest salary from two table .Here both table contain Salary column .??
View ArticleBackup Database
There are database files mdf, ndf1, ndf2 on one database, on the other hand there are three drives as backup destination for each database files.We want to execute database backup parallel, by...
View ArticleHow to Copy complete structure of a table with data from one database table...
I need a sql query to copy structure of table with data from production table of ONLINEBTREKDB database to production table of Archive database.I tried this queryselect * into Archive.dbo.Production...
View ArticleT-SQL Matching Values or previous Values
Hi, I'm wondering if someone can point me in the right direction for this particular query - using 2008R2.I have a table that contains date, fruit, value and prices. The table only contains data for...
View ArticleDrop and Rebuild Indexes
Hi all,Our databases which are deployed at client sites have somehow ended with a mixture of column collations. The 'fix' the developers have been putting in is to use COLLATE database_default when...
View ArticleSQL server 5 user license issue
i like to know what does it mean that SQL server with 5 user license ? does it mean that only 5 user can conect to sql server at a time with same or different connection string?suppose we have a...
View ArticleJob Deletion Error
Am unable to delete a job in Sql Server Agent,When i try for deleting a job it shows to drop a FOREIGN KEY Constraint in System Database ( MSDB ) .But, what am worrying is does dropping a FOREIGN KEY...
View ArticleOrder by (select 0) meaning
Hi,The thing I ask is probably very basic but I don't really get the point.I found this query in one of the posts and I do not understand a part of it.;WITH CTE AS ( SELECT GroupID , Name ,...
View ArticleGet first record value from each group using T-SQL
Hi All,I have one table with 3 columns, say Name as varchar, ID1 as int, ID2 as int datatypes.Create table:Create table Sample ( Rec_Id Int Not null, Name varchar(30) null, ID1 int null, ID2 int null,...
View ArticleSelect statement to get all data with the same column value
i have created a page for user to search the sql server.. the search page has 2 dropdown, one is the Entity dropdown containing all the entity_ID in SQL server the other is Business Unit Dropdown which...
View ArticleStored procedure searching comments with wildcards
Hello I need to create a stored procedure and incorporate it into a report where the users can look up certain values in comment fields. This is what I have so far but I am getting errors, maybe I'm...
View ArticleLogging Table Lock Help
I need some helping formulating a strategy to fix an issue with the same log ID being assigned to multiple user imports. In my web application users can upload files. Every import is logged in a...
View Articlespexecute_adodb_sql generating Apostrophe symbol at excel header columns ?
Hi,I have a stored procedure to generate excel file , but the excel file is getting Apostrophe at starting of column headers.exec spExecute_ADODB_SQL @DDL='Create table Excel_CAB (CedNo TEXT,Cedname...
View Article