Quantcast
Channel: Transact-SQL forum
Browsing all 23857 articles
Browse latest View live

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 Article


Image may be NSFW.
Clik here to view.

Mayday! 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 Article


Need 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 Article

Problem 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 Article

Disable 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 Article


How 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 Article

Unique 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 Article

Image may be NSFW.
Clik here to view.

What'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 Article


can 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 Article


how 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 Article

multiple 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 Article

Image may be NSFW.
Clik here to view.

Best 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 Article

How 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 Article


find 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 Article

Calculate 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 Article


Query 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 Article

Multi-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 Article


How 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 Article

INNER 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 Article

convert 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
Browsing all 23857 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>