Query Correct But Unable to execute might be due to length limit for inner...
Following it the dynamic query that is been generated in one of my operation, Now the issue is that its generating error like Also need to look at the error Timestamp: 2014-04-30 21:22:41.160Message:...
View ArticleMayday! T-SQL Guru urgently required, for love and glory from all the community!
Mayday! Mayday! A distress signal is being sent out to all past, present and future Gurus!We need more of your awesomeness!The TechNet Guru Competitions have become BIG news within Microsoft circles,...
View ArticleNeed help in trigger creation
hii have two table tableA and tableB.i need to create trigger , if tableA has any row inserted or updated , the same should be inserted and updated in tableB as well.thanks
View ArticleProblem Joining multiple tables.
Good Afternoon, I am having hard time trying to left outer join tables. The problem is this. I have five tables a, b, c, d, e. I need to join a to b a to c a to d and then b to e. the minute I...
View ArticleDisable Foreign Key Constraints
Destination DB is sql2005. When export data to this db from various locations through a syncing app, Foreign Key Constraints error occurs. This will be solved through disable enable these constraints...
View ArticleHow to convert Date in varchar(50) format MM/DD/YYYY HH:MM into YYYY-MM-DD...
Hi,I am getting the error "The conversion of a varchar data type to a datetime data type resulted in an out-of-range value." when converting date in format Date in varchar(50) format MM/DD/YYYY HH:MM...
View ArticleUnique Key Violation error while updating table
Hi All,I am having problem with UNIQUE CONSTRAINT. I am trying to update a table and getting the violation error. Here is the over view. We have a table called ActivityAttendee. ActivityAttendee has...
View ArticleWhat's your suggestion's for deliver the high performance of OLTP in...
What's your suggestion's for deliver the high performance of OLTP in SQLServer for the following data model?Consider the BookHouseDataModel. If this system is proposed to scale with 1 million...
View Articlecan following query be used to find inserted update records.
hi,i am using query1) to insert data query2) to update the recordquery1)INSERT INTO [t1] ( id ,createddatetime ,updateddatetime) VALUES (1...
View Articlehow to apply business rules with out breaking to patch missing data
Hello Experts, I am very new to SQL And i have no idea how to apply below rules Data is polling for every 5 minutes so 12 time intervals per hour 6:00 -->1...
View Articlemultiple aggregation using pivot in sqlserver
I have a table Events Events containing cardno,time,id,name--each id has a cardno my requirement is every day each employee swipe the card several times i want to calculate first and last time of each...
View ArticleBest Query Approach
I have a scenario to display data from 2 tables combined. First table Named 'DayTable' consists of daily plan and actual. Second table named 'MonthTable' consists of Monthly plan and actual. I need to...
View ArticleHow to write a sql query to calculate weights using CTE
Hi guys,want some help using a CTE to generate data using recursive SQL - input data in table A to be transformed into table B shown belowTable AInstru_id_index instru_id_name instru_id_constit...
View Articlefind breaks in serial ranges
Hi All,I have a range of serial numbers in a table.I want a query that will return the top 8 but it should break it into start and End columns where there is a break it shouldreturn it on a different...
View ArticleCalculate duration between start date and end date
Hi everyone,I'm facing with problem when calculating duration between start & end with this function below . This fuction is working well, but i want to change working time from 8:00 am to 17:30...
View ArticleQuery active directory's custom attribute
HiI'm having trouble getting at custom value from our Active directory(AD) via linked server. we recently added a new attribute (named noxNotes) in our AD and that attribute is only viewable to one...
View ArticleMulti-part identifier could not be bound
I need to load a specific data into a variable in VisualBasic but im having this probably and getting a bit frustrated with this error. I would really aprecciate any help.Dim conn As New...
View ArticleHow to sum varbinary(max) column in sql server
Hi Techies,I have column called "UserAccessBit" with VarBinary(max) datatype. Now i would like to perform SUM operation on that column.see the following sampleselect SUM(AccessBit) from UserAccessEx :...
View ArticleINNER JOIN PROBLEM IN Microsoft SQL Server 2008 R2 Report Builder 3.0
SELECT ,maximo_tbl_matrectrans.ponum ,maximo_tbl_po.description AS [maximo_tbl_po description] ,maximo_tbl_matrectrans.polinenum ,maximo_tbl_matrectrans.itemnum ,maximo_tbl_item.description AS...
View Articleconvert decode oracle pl/sq to ms sql and help required on logic
I have below oracle query need to converted to ms sql. I also want to add a record into journal table when a insert portion is executed "caseidinserted" and update portion executed then...
View Article