Common exceptions while executing sql queries
I have read that catching the particular exception separately enhanced the performance so I just wanted to know what are the most common exception that might generate while executing any sql query ...
I have read that catching the particular exception separately enhanced the performance so I just wanted to know what are the most common exception that might generate while executing any sql query ...
Hi everybody. I have a question about AdvantureWorks. What is the query to determine the full hirarchy of an employee's managers? example: Alex is the input Sara (Manager - Level 1) James(Manager - Level 2) David(Manager - Level 3) Alex(Simple Employee) ...
I'm running a .net aspx application. I'll need my android app to access and modify/insert information into the ms sql database. is there any api ? thank you ...
I want to do something like SO does with DisplayName. When someone does not enter a DisplayName, I want to default this to 'User' + UserId. So the first user who signs up would get User1 - since UserId will be 1, the second User2 - since UserId will be 2, and so on. The easiest way I can think of doing this is using a trigger, but I...
My question is that How database stores data and how it performs query internally. Suppose we have following fields in our table: ID Name Age Weight Manager and we query select * from Table1 where age>50 and weight<100 I am just curious that how it perform query internally. What will the Node of B-Tre/B+Tree contains in this exam...
Hi Friends, I have the following queries and I want to put them in an sql CASE statement so I would have only one query but I don't know how to do that. Can somebody help me? IF (SELECT EtlLoadId FROM ssislogs.audit.processcontrol WHERE SubjectArea = 'UaqaFacetsImp') > 0 SELECT pc.SrcFileName + ' - '+ CONVERT(VARCHAR(10), pc.[Reco...
I've gotten really rusty with TSQL I'm ashamed to say. Using Entity Framework has made me forget what little TSQL I even knew. And I haven't exactly made very complex queries with Entity Framework either, just never had the need to sad to say. This is one exercise our professor gave us this Friday: "Monica buys a gallon of milk from th...
I am trying to justify writing a website in asp.net that has the potential to be as large as wikipedia. Are there any large websites content driven websites that have been written asp.net? ...
my aim is to create a db, and check if the db is there or not, at pageload the confusions are stated beneath "BOLD TEXT" i do not see why its not clear but still as requested i adding more explanations working fine code using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using Syst...
My need is to write a code, which creates a db creates four tables creates primary keys creates foreign keys and constraints like type int or boolean or string etc Yes I know w3c shools has the sql codes, but the problem is I first need to detect if these things exists or not one by one. And this is for me a great problem. I tried ...
Hi, I am working on a project where there are 110 workers, each work for 4 hours in a batch of 8 worker, I want to Generate timing for this workers. e.g - Batch 1 - Worker 1-8 Timing 08:00am - 12:00pm Date 1/1/2010 - Batch 2 - Worker 9-16 Timing 12:00am - 04:00pm Date 1/1/2010 - Batch 3 - Worker 17-24 Timing 0...
Ok, not sure if this is possible to do.. I have a query that returns just simple records from the database, but formatted out as XML as follows: select name, address, dateCreated, flag from table where name = 'test' for xml path('row'), root('rows') ok, no problems, and I get the XML as desired: <rows> <row> <name>jddjdjd</nam...
I'm developing a web site and i would like to use the SQL Server Express as my DB. The Express edition is limited for 4GB per DB. Is it legal to create & use several DB's for the use of a single web site? ...
Hi experts, I am trying automatically increment the alpha numeric field (say for productid in product table). But I am getting an error (see below). Could somebody please look into this error or any other approach to achieve this task? My table details: create table tblProduct ( id varchar(15) ) create procedure spInsertInProduct AS...
I create 2 tables and another 1 with foreign keys to the other two. I realized I want to make some changes to table no 3. I try to update a field but I get an error "Saving changes is not permitted. The changes you have made require the following table to be dropped and re-created." I delete those 2 relationships but when I look at d...
Possible Duplicate: SQL CASE statement Hi Frdz, i have created a stored proc and i put three queries in stored proc with inputvariable @EtlLoadId = 0 and i get three different windows for each query under result tab. is there any chance i can get results from the stored proc (results of three queries) as only one window and r...
Ive a big select case in SQL query. (select case tb_usuario.int_id_cargo when 13 then '20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53' when 20 then '' when 21 the...
Using TEXT datatype in SQL Working on SQL 2000, I would like to perform the following Select @String = SUBSTRING(@String, @idx + DATALENGTH(@firstDelimiter)/ 2,LEN(@String)) NOTE: @String is a type TEXT , @FirstDelimiter is of type Varchar(4). Why am I unable to run the above code? How do I perform the above instead? Is the a...
I have an event table with following columns: sequence (int) DeviceID (varchar(8)) time_start (datetime) DeviceState (smallint) time_end (datetime) All columns except time_end are populated with the data (my current time_end column is NULL through out the table). What I'd need to do is to populate the time_end column with the event c...
I have a table that essentially stores revisions of certain datasets (i.e. edits back through time if you like). The date of the revision is unimaginatively stored as a datetime field named revision. Each new revision is taken daily, at midnight. If this table were left to populate, there would be a set of rows for every single day, wh...