Why should I must user dbo.[xxx] rather than xxx imediately in DELETE statement?
Hi guys,I just found that I must usedelete dbo.[user] where id=1rather thandelete user where id=1after re-install sql server on my computer.Is there some way to resolve this problem?Typing dbo.[] every...
View ArticleQuickest way to see if a city (52000 records) is inside a string
Hi,I am reading emails lines in c# and interop.outlook, and I need to know if in that line there is a city. The table is around 52000 records! Sql Server 2012Thks in advance
View ArticleExpanding IP values based on subnet mask with increased complexity.
Hello Forum Members/Gurus' Background: I have a IP range as: 1.2.3.0/255.255.255.0I want the following output:1.2.3.0 1.2.3.1 1.2.3.2 . . 1.2.3.254 1.2.3.255Proposed script by Patrick Hurst works like...
View ArticleSuddenly Database growth is high
Hello,We are using sql server 2008 and suddenly our database is grown up highly stopped working.How can i know which query makes db high?Database configured as auto growth is true.Regards,DBA5
View ArticleHow to put a SQL Agent Job wait in the trigger while the job is running.
Hello!I am not a geek in writing t-sql code so I am seeking forum help in completion of my task.I have a trigger which fires upon a action and with in that code, I am starting a job via t-sql likeEXEC...
View ArticleSQL Service Read-Only
I am trying to develop a membership application website with SQL 2008. When I attached a "create user" Wizard form, I got an error message: Failed to update database..................because the...
View ArticleQuery is taking too much time for inserting into a temp table and for spooling
Hi,I am working on a query optimization project where I have found a query which takes hell lot of time to execute.Temp table is defined as follows:DECLARE @CastSummary TABLE (CastID INT, SalesOrderID...
View ArticleHow does OUTPUT PARAMETER work with C#, how to understand it correctly?
Hi guys, I'm learning C# with SQL Server.I am practicing using C# to get a return valuefrom the output dataof a procedure with output parameter(s).I write procedure like thisLTER PROCEDURE...
View Articleneed SQLITE query
i have a string lets say https://lh3.googleusercontent.com/-8SrwkGjoDhE/U34hGfM3s0I/AAAAAAABcrE/iyXjqTH03eE/s9999/IMG_3975.JPGi want sqlite query to get only .JPG from the string, please help me.
View ArticleRemove Duplicate Words from the Record
Hi All, I would like to know whether I can remove the duplication value from the following records using T-SQL/function :-Before 1) MR K & MRS B DOWLING - VERWOOD PENSION FUND A/C VERWOOD PENSION...
View ArticleQuery for auto restore db
Hi Guys,I've already managed to do an scheduled dowload from a ftp server and to auto unpack it when it arrives. The next step i want to do is a automated restore from this db.I found a query but i'm...
View ArticleHot to select last month sales using fiscal calendar
Hi All, I have the following query listed below select DISTINCT -1, vODS_GLBalance_test.Page, vODS_GLBalance_test.FiscalYearId, vODS_GLBalance_test.FiscalMonthOfYearId, GLAmount From...
View ArticleSplit records T-SQL
Hi Friends,I have a full record which does have single and return information in the same record so I want to split into two records using SQLhave a look attached below screen shot this is the Input I...
View ArticleIsse with using Grouping Sets in SQL Server 2008 R2
Hi, I created a query in SQL Server 2012 using grouping sets that works fine. When I try to use the same query in SQL Server 2008 I get an error ("Inccorrect syntax near SETS").I researched using...
View ArticleALTER TABLE question
Experts,Say suppose 10 columns in a table with 100K records, now there is a new req. to add new 5 columns.So my question, Is there anyway where we can alter table add column_name with all the entries...
View ArticleInner Cursor Error
Hello,I have been using dynamic sql in an inner cursor and I get an error about the fetched variable of the outer cursor. How can I fix it? DECLARE A1 CURSOR GLOBAL FOR SELECT Iid, Server, Dbname FROM...
View ArticleHelp with SQL Round
I need to round up my Percentage column in my query below and couldnt quite get the ROUND function right. Right now I am getting:28.888888800would like 28.89%SELECT a.doctor as Doctor ,...
View ArticleTop 10 sum & count
I have been working on this Select statement all day (blogs & testing) and I guess it's time to seek some help.This is for my golf league to determine who is in the lead and determine the points...
View Articlewhat is the sql query for this
table Employee EmpId Name MonthlySalary DateofJoining Suggest a sql server query to find out the employee details whose having salary greater than their yers of experiance nravhad
View ArticleHow to achieve Assign Unique Value
Hi,I have a task where I need to assign a new value depending If a Group number falls in particular M area.For an example : In Database I have:SELECT DISTINCT M,[GroupNumber] FROM...
View Article