Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Browsing all 3145 articles
Browse latest View live

XML Query

HiI have a row/column oriented xml to be inserted into a table. How do I write a XQuery (????? in code below) so all records (in example 3 records) will inserted into table @person?

View Article


It is possible to create a dynamic table from a result set ?

Hi guys,I need help for store in a table #temp result set of a function PIVOT dynamics and join others data later, for example:-- Declare variableDECLARE    @query    VARCHAR(MAX)-

View Article


Performance Enquiry

I have Customers table (normally no more than 6,000 records as we are B2B) and I am writing a new invoice generation process using OOXML (the old one uses Word Interop).Customers table has various...

View Article

Forward email to SQL server?

Does anyone know of a way to send or forward and email to SQL server so it loaded into a table? I've set up email alerts from various applications that send emails to a distribution list and I would...

View Article

I need to extract the 5 char length substring between dashes

exampleasdfasf-ABCDE-asdfasdfsfasfss-TREWQ-asdfasfsf(the column is CI_NUM where that value lives)i need the 5 characters between the dasheshelp, (Again) . . . . Much appreciated

View Article


how do i find a specific status, and only that status

We have a table that contains part numbers, along with a status.because of the way the DB was designed, a single part, let's say ABC123, can have more that one status.  (The Part Number is not the key...

View Article

Pivoting a 2 columns table to a 6 columns table with 1/3 the rows

Hello,I have a table with 3 columns:RowNumber integerxImage ImagexImageDesc nvarchar(30)I need to flip this into a table with 6 columns where each xImage and xImageDesc from my first table will become...

View Article

Clock hands churning and high stolen memory

Hi,

View Article


Joining on the numeric part of string...

Hi All,It's been a while...I'd like to get your advice on the most efficient way to join on only the number part of a field that may be prefixed and/or suffixed with up to 2 letters. Here's a...

View Article


Getting Max date from rows

Hi all,I'm trying to get the latest date for every distinct value in a column: CREATE TABLE [dbo].[Ledger]( [ID] [int] NOT NULL, [ProfileId] [int] NULL, [Date] [datetime] NULL, [Time] [datetime]

View Article

Sql geo-spatial linked server query

I have one question on the TSQL Linked Server Query. Linked Server is GIS enforced so we pass the coordinates to that server which it returns the data from the Linked Server. Please find the...

View Article

Validate whether at least 1 record per user is marked as primary

I have the following table: EmployeeInformation Fields ,EmployeeInformationID ,Essentia_ID ,ADP_ID ,SSN ,FirstName ,LastName ,SupervisorOrVP ,LocationNum ,Primary ,EmployeeActive ,RecordActive...

View Article

Finding a particular date in all tables

HI all,The famous SearchAllTables proc failed to find date values I know exist in my (DateTime) columns.  A quick Google turned up zilch else..TIA

View Article


the metadata could not be determined because statement 'exec(@Exec sql)'...

Hi,After upgrading SQL Server from 2008r2 to 2016, I'm getting the below listed error.the metadata could not be determined because statement 'exec(@Exec sql)' in procedure 'spXYZABC'contains dynamic...

View Article

SQL PROFILER HELP

Trying to give information as to what I am dealing with so Please offer advice only and not flame!!!!I'm using SQL Server Profiler version 17.8.1 connecting to a SQL 2014 server.I have or at least I...

View Article


Converting Excel Formula into TSQL

Hello Dear Friends,I need a help with Converting an Excel Formula below into TSQLExcel Formula: [left]==15.42*(1-(125-100)/100)[/left]

View Article

sproc question

Is there a better way for optional date parameters to be used inside of a stored procedure?  I currently have a sproc that passes in    6 parameters to build my query.   I want to add 2 more values...

View Article


Sorting and Grouping problem

Hi,I have a table:

View Article

How to Get Peformance Counters Programmatically for One Dynamic SQL Statement

I need an SP that I can pass 1 valid SQL statement for dynamic execution which also returns performance counters (e.g., cpu time, elapsed time, memory usage, reads, logical reads, writes, etc.) similar...

View Article

separate pipe delimited values in SQL Server

I have a table which contains produce information which is separated by | . I need to separate those values but don't know how.  I am wondering if someone can help me with this. Please see attachments...

View Article
Browsing all 3145 articles
Browse latest View live