Searching For Double Quote In Sql Server 2005

Jun 11, 2008

Hi ,

I'm using sql server 2005. In my 'Books' table some of the 'subject' column contains data's with single and double quote. example: Quantu"m phys'ics

i'm passing the subject as parameter and it have to display results if the corresponding subject name is in the table. Here is my code... i'm using dynamic query...

 alter procedure getbooks
@sub varchar(200)
as
begin
declare @sqlq nvarchar(2000)
set @sqlq='select subject from books where subjectname like '''+@sub+'%'''
exec sp_executesql @sqlq
end

 How can i search for words like this Quantu"m phys'ics in the above query? Any one who knows how to do this please send me the code..

 

View 9 Replies


ADVERTISEMENT

SQL Server 2008 :: Remove Double Quote In String Fields

Feb 23, 2015

I have a SQL select syntax as below

0 AS SalaryMin,
2088 AS SalaryMax,
2088 AS BillableHours,
'Month' AS SalaryPaidCode,
0 AS SalaryBreakdownHourly,
0 AS SalaryBreakdownDaily,

[Code] ...

While outputting to CSV.file

I got :0,2088,2088,"Month",0,0,0,0,0,0,0,"N/A","N/A","G","N/A","Exempt","Other",1

How can I remove all double quotes in the string fields? so that O can get the result as below while the output
0,2088,2088,Month,0,0,0,0,0,0,0,N/A,N/A,G,N/A,Exempt,Other,1

View 7 Replies View Related

Double Quote In Database Record

Dec 14, 2005

In my asp.net page when I run a query against the database the datagrid get populated with only the records that starts with the first letter for example A good day. But none of the records that starts like this "A fine day" or "A nice day" displays in the datagrid. I tried to replace the Double Quote but it still returns only the records without " quotes. My query looks like this:
Dim queryString As String = "SELECT [Articles].[AN], [Articles].[Department], [Articles].[ArticleHeading], [Articles].[AccessLevel], [Articles].[Status] FROM [Articles] WHERE (([Articles].[AccessLevel] <> 'SysAdmin') AND ([Articles].[Status] = 'Enable') AND (REPLACE([Articles].[ArticleHeading], 'chr(34)', '')) like @ArticleHeading) ORDER BY [Articles].[ArticleHeading]"

View 6 Replies View Related

Double Quote In Beginning Of Record

Dec 14, 2005

Some of my records starts with a double quote, when I do a search for all records starting with A I can get all except the ones that start "A fine day ...

View 4 Replies View Related

String Constants Must End With A Double Quote.

Apr 2, 2007

i got this error when i was trying to deploy the report... in the preview mode report is working good....



D:
eport1.rdl The expression for the query €˜dataset€™ contains an error: [BC30648] String constants must end with a double quote.



can any one gimme the solution




View 11 Replies View Related

String Constants Must End With A Double Quote.

May 5, 2008

Hi There,

I can't figure out what is causing this error: can you please have a look at my code and let em know what is wrong or rework it for me:

="SELECT ARIBC.cntbtch, ARIBC.btchdesc, ARIBC.AUDTUSER, ARIBC.AUDTDATE, ARIBC.AUDTTI, GLPSOFTMAP.PSPRODUCT, GLPSOFTMAP.PSDEPT, GLPSOFTMAP.PSACCOUNT, GLPSOFTMAP.ACCTID, ARIBH.CODECURN, ARIBH.INVCDESC, CONVERT(varchar,ARIBH.FISCYR + ARIBH.FISCPER) as PERIOD, CONVERT(varchar,ARIBH.IDCUST) AS ACCOUNT, ARCUS.NAMECUST as ARNAME, CASE TEXTTRX WHEN 1 THEN 'INV' WHEN 2 THEN 'DM' WHEN 3 THEN 'CM' END AS CLASS, CONVERT(varchar,ARIBH.IDINVC) AS TRX_NUMBER, (CASE TEXTTRX WHEN 3 THEN ROUND((ARIBD.AMTEXTN*-1),2) ELSE ROUND((ARIBD.AMTEXTN),2) END) AS ""AMOUNT FROM ARIBC"" INNER JOIN ARIBH ON ARIBC.CNTBTCH = ARIBH.CNTBTCH INNER JOIN ARCUS ON ARIBH.IDCUST = ARCUS.IDCUST INNER JOIN ARIBD ON ARIBH.CNTBTCH = ARIBD.CNTBTCH AND ARIBH.CNTITEM = ARIBD.CNTITEM INNER JOIN GLAMF ON ARIBD.IDACCTREV = GLAMF.ACCTFMTTD INNER JOIN GLPSOFTMAP ON ARIBD.IDACCTREV = GLPSOFTMAP.ACCTID WHERE ARIBC.BTCHSTTS=3 AND ERRENTRY <= 0 AND BTCHDESC NOT LIKE '%54-8003%' AND ARIBH.IDINVC in ('" &Replace(Parameters!invoicenum.Value,",","','")"

Thanks,
RC

View 1 Replies View Related

Export A View With Double Quote Delimiter

Aug 14, 2006

i am running sql server 2000 on windows 2000. i have a need to export a view and delimit the columns with double quotes as it has imbedded commas in the columns, how do i do this??

View 1 Replies View Related

SQL 2012 :: SSIS Double Quote Text Qualifiers

Dec 12, 2014

We have an issue with importing a CSV file into SQL where using a double quote " text qualifier is failing. The data is correct but it fails on a particular line, complaining about the qualifier even though the qualifier is in place and previous lines have imported fine.

View 3 Replies View Related

Using Password Ending In Unmatched Double Quote Mark With OleDbConnection

Mar 14, 2008


Issue



I need to write VS2005 C# code using SQL OLE DB to access SQL Server 2005. I have no choice in that matter. I can create a database user with a password like COMPANY", which is a string of uppercase characters ending in an unmatched double-quote mark.

Using Microsoft SQL Server Server Management Studio I login using Windows Authentication, create an account with the password, COMPANY", check the "Enforce password policy", click "OK", and then exit.


Setup


I launch Microsoft SQL Server Server Management Studio again, select "SQL Server Authentication", type in the account name and the COMPANY" password, click the Connect button, and I'm in.

Problem


Now, I need to connect programmatically and run a stored procedure. The password is stored in clear text in hte Registry€”not my choice, it's a legacy application, and changing that is not an option open to me. (We have probably all seen company safes where the combination is scribbled on the wall in case you forget it!)

Here is the code I use to run the sproc:


DBCONNINFOLib.DBConnectionInfoClass DBConnInfo1 = new DBCONNINFOLib.DBConnectionInfoClass();
String strConnString = DBConnInfo1.GetConnectionString( "" );
OleDbConnection con1 = new OleDbConnection( strConnString );
OleDbCommand cmd1 = con1.CreateCommand();
cmd1.CommandType = CommandType.StoredProcedure;
String sCmdText = "sp_SomeStoredProcedure";
cmd1.CommandText = sCmdText;

If I set the connection string in the registry to COMPANY", I get an error like this:


Server Error in '/' Application.


Response is not available in this context.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Response is not available in this context.

Source Error:





Line 60: catch (System.Exception e)
Line 61: {
Line 62: Response.Write(e.Message.ToString());
Line 63: }
Line 64:
Source File: C:sourceProductNameDataCenterAdm&ReportsWebPagesProductNameWebCommonCodeCommon.cs Line: 62

Stack Trace:





[HttpException (0x80004005): Response is not available in this context.]
System.Web.UI.Page.get_Response() +2077605
SiteIQWeb.CommonCode.Common..ctor() in C:ProductNameDataCenterAdm&ReportsWebPagesProductNameWebCommonCodeCommon.cs:62
SiteIQWeb.MasterPage..ctor() in C:ProductNameDataCenterAdm&ReportsWebPagesProductNameWebMasterPage.master.cs:21
ASP.masterpage_master..ctor() in c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files
oot255b545c8a400c7App_Web_hfj8popy.0.cs:0
__ASP.FastObjectFactory_app_web_hfj8popy.Create_ASP_masterpage_master() in c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files
oot255b545c8a400c7App_Web_hfj8popy.3.cs:0
System.Web.Compilation.BuildResultCompiledType.CreateInstance() +49
System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +250
System.Web.UI.Page.get_Master() +48
System.Web.UI.Page.ApplyMasterPage() +18
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +685




Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433


The closes to success I have been able to come is to set the password to "COMPANYNAME""" or 'COMPANYNAME"', which results in a System.Data.OleDb.OleDbConection Exception with a HResult of 0x80040e4d, and the message Login failed for user 'username'.


Questions


Can the password be formatted differently in the registry, or somehow processed after retrieving it, so that SQL Server 2005 will accept it?

Is this a bug in .NET Framework or SQL OleDb?

Is this simply a case of "Is it hurts, don't do it"?

Thanks in advance. As with all postings, my job, promotion, product success, company future, or some combination thereof is on the line.

View 2 Replies View Related

T-SQL (SS2K8) :: Find All Instances Of String That Contain Certain Letters - Escape Double Quote

Sep 14, 2015

I am trying to find all instances of a string that contain the letters FSC. While I am able to find most of them, I am unable to find the ones wrapped in double quotes.

Query example:

Select *
from myTable
Where item like '%FSC%'

This works great with the exception of when FSC is surrounded by double quotes.

ex: MySentencecontains"FSC"

I have tried Replace with no luck.

View 3 Replies View Related

SSIS Undouble - Inline Double Quote And Column Delimeter Problem

Apr 24, 2007

We have problems with SSIS flat file adapter.

We try to import file which contains next sort of data:

"1";"ABC";5
"2";"A""BC""";5
"3";"A""B;C""";5

The resulting table must be:
f1 f2 f3
1 ABC 5
2 A"BC" 5
3 A"B;C" 5

How can we get this result?

p.s.
We tried to use "SQL Server SSIS Sample Component: UnDouble" but the result was unsuccesfull.

View 11 Replies View Related

Form Field Returns Name With Double Quotes Instead Of Single Quote During Update Process.

Oct 3, 2007

I've a weird problem in my application. In of the pages, while trying to update the text box "Name", when I enter Linda's test, it gets saved as Linda''s test. I'm not sure if this is a problem due to SQL server. When I look at the stored procedure, I don't anything different. Also, when I update the table directly in SQL Server, the result is displayed in single quote. But if I update the field thro' the application, the returned name is with double quotes instead of single quote.  Has any of you faced problems like this? What am I missing? What do I need to do to get the name saved the way I entered (with single quotes) instead of double quotes?

View 1 Replies View Related

Reporting Services :: SSRS 2012 - CSV Rendering / Turn Off Double Quote Qualifier

Sep 29, 2015

I have scoured the Microsoft forums and the internet to find out how I can generate the output of a CSV report that has double quotes around each value and is comma separated as follows:

"Abcd","123456","Efghi","789012","JKLMN"

If I try to concatenate double quotes around the values in the stored procedure or in the RDL, two double quotes appear around each value as follows. 

""Abcd"",""123456"",""Efghi"",""789012"",""JKLMN""

I understand that this is because the default qualifier is double quote.  What I see is that every time a double quote appears in a value (along with commas and line breaks), the qualifier will activate.  Is there any way to turn this off for double quotes? 

If I try to enter:  <Qualifier>false</Qualifier>, the word "false" appears as the qualifier instead.

The only way I have found that produces a result similar to what I need ("Abcd","123456","Efghi","789012","JKLMN") is if I add a line break - chr(10) in the RDL in each field. However, this won't work for me because I can't have line breaks in each field in the output. 

Note that in SSRS 2005, I was able to produce the report output as I state above by setting the field delimiter and qualifier as follows:

<FieldDelimiter>@?!?@</FieldDelimiter>
<Qualifier>?#^?</Qualifier>

This essentially turned the field delimiter and qualifier off, as the values entered would never appear in the data.  I then could add double quotes and commas in the RDL.  This used to work in the old version but does not anymore.

View 4 Replies View Related

Searching Double Values

Feb 11, 2005

Hi,
I have a table with lots of records init and i want to make a simple query where i can show only the records with more then 1 time the same value,
problem is that i want to make a collumn primary key and there are still double values in it. :confused:

Thanx in front
Cheers Wimmo

View 2 Replies View Related

Searching A String With Asian Characters (double Byte)

Jun 14, 2007

My problem is that i can't search a field that contains Asian characters (Korean in this case).



The table user_Access_tab have 2 keys:

access_id nVarchar(50)

user_id nVarchar(50)



The sql query below is sent through a oledbcommand to a sql server 2005 database.



"select access_id, access_right from user_Access_tab where user_id ='HQ001kimjo012007-05-07 ì˜¤ì „ 11:50:323401'"



It doesn't show any hits even thogh i know there is a number of matching records.



The question doesn't generate an answer in SQL server manager studio eigher.



If i change the datatype on user_id to Varchar(50) the id is presented (in the database) as:

HQ001kimjo012007-05-07 ?? 11:50:323401



Then the question works, but why doesn't it work with nVarChar(50)?



Regards Martin Jonsson

View 1 Replies View Related

SQL Server 2008 :: DOUBLE Precision For Calculations / Convert To Double?

May 19, 2011

I am performing a series of calculations where accuracy is very important, so have a quick question about single vs double precision variables in SQL 2008.

I'm assuming that there is an easy way to cast a variable that is currently stored as a FLOAT as a DOUBLE prior to these calculations for reduced rounding errors, but I can't seem to find it.

I've tried CAST and CONVERT, but get errors when I try to convert to DOUBLE.

For example...

SELECT CAST(1.0/7.0 AS FLOAT)
SELECT CONVERT(FLOAT, 1.0/7.0)

both give the same 6 decimal place approximation, and the 6 decimals make me think this is single precision.

But I get errors if I try to change the word FLOAT to DOUBLE in either one of those commands...

SELECT CAST(1.0/7.0 AS DOUBLE)

gives "Incorrect syntax near )"

SELECT CONVERT(DOUBLE, 1.0/7.0)

gives "Incorrect syntax near ,"

View 2 Replies View Related

Truncation Error Arrising From Quote Escaped Quotes In Quote Encapsulated Strings

Feb 15, 2006

Hi All,

I'm having trouble importing a CSV file into SQL using SSIS. The trouble seems to stem from truncation and from quote encapsulated fields.

Firstly it's worth noting that some of the data within the quotes contains the separator. E.g.

12,"some text, and a comma",34

Thankfully SSIS seems to cope with that by specifying " as the Text Qualifier. My next problem was that the SSIS Import and Export Wizard gave an error: "failed because truncation occurred". But I fixed this by specifying the OutputColumnWidth for the NCHAR and NVARCHAR type columns to be the width from the table definition.

But now I have another problem with the length of fields. Consider the following where the center column is NCHAR (22)

101,"some text, and a comma",303
102,"some ""quoted text"" bye",303

The first row has the correct width (once the encapsulating quotes are stripped out), but the second row does not, because it seems that when I exported the table the export wizard escaped the quote characters within encapsulated strings using quote characters. So I am back to getting the "truncation occurred" error. How can I get around this within SSIS?

Cheers,

Tim.

View 1 Replies View Related

Reading A Negative Double From SQL Server 2005 Express DB

May 26, 2008

Hi all,I'm reading some doubles from a DB table using c# and some of these doubles are negative numbers.They are negative because the doubles are GPS data and all my Longitude values are, for example, '-6.214545'.Now, I physically put these doubles into the table by typing the '-' character and then the number.What is happening is that the code is reading it as a positive double, which obviously throws off the whole App as the difference between '-6.214545' and  '6.214545' is massive!I've declared them as type decimal(18, 6) Any ideas as to what might be the problem??? 

View 5 Replies View Related

DB Engine :: Double Row Added From A Source Table That Did Not Have Double Record

Aug 28, 2014

Every night we connect to a remote server using Linked Server and copy details from that database to a loading table, then load it into the 'real' table in our own environment. The remove database we load it from has indexes/primary keys that match the 'real', however the 'loading' table itself does not have any indexes or primary keys, both are SQL Server 2005 machines.

In the loading table we first of all truncate it then do a select insert statement from the remote server, then we then truncate the 'real' table and load iit from the 'loading' table.

The issue is when we attempted to load it into our 'real' table from our loading table there was a duplicate row, and our process failed with a Primary Key violation.

I checked the source with does have the same primary key's in, it did not contain a duplicate row and I checked the loading table and that did contain a duplicate row.

My question this is in what circumstances this could happen ?

View 5 Replies View Related

How Do I Insert A Single Quote (') Into A Microsoft SQL Server Database?

Jun 7, 2008

hellohow are you all ?I want to insert ,select update date in database these data contains special chars like ' & _ <> and so onso is there any way to handle this issue ? please help methanks a lot 

View 3 Replies View Related

Date Searching In Sqlserver 2005

Jan 11, 2008

hi,
i have problem while searching date in datebase using like operator ,i write the below query but this will not give any result and i have the date 13/1/2008 in my table meeting please any one help me.
 
select meetingdate from meeting where meetingdate  like '%13/1/2008%'
 
thanks
prasath

View 4 Replies View Related

SQL Server Agent SSIS Job: Set Values Drops Leading Quote

Jul 19, 2006

We are using BCP in a Process task. The value for the path to BCP's error log requires double quotes around it. We initially put this value in a configuration file, and that worked fine. Yesterday, we eliminated the config file and tried to use the "Set Values" tab of the SSIS SQL Server Agent job to pass in this value.

The package variable was assigned the value of the path -- all except for the leading double quote. The closing quotation mark was included in the value.

We tried adding a second double quote at the beginning of the value, but that caused the job to fail immediately.

For now we will work around this problem by putting the quotes around the value in a Script task inside the package.

Has anyone else encountered this problem?

Thanks,

Ron

View 2 Replies View Related

Full Text Searching With SQL 2005 Express Advanced

Jun 2, 2008

I'm using the Full text functionality of SQL 2005 Express Advanced and it works well.

However, the first time a query is run it take 20 seconds or so to actually return the search results. Thereafter, the search results are almost immediate.

That would be fine, except that if no further search is performed for approx 15 minutes or so, then we are back to the first scenario where it takes 20 seconds to return the results.

I assume this means that the full text catalog is not being held in cache at the server? Is there anyway to force it to do this?

My first thoughts were that Full Text within 2005 was an excellent tool, but if the first search always takes a long time then I will have to re-think as I can be sure that customers will get extremely annoyed at the response.

Do you know if there is any way around this or if there are any fixes imminent for this problem.....indeed, is it a problem or am I missing a fundamental setup issue?

What would be the implications if I created a small console application to perform a full text search once every minute at the server to keep the index cached?

many thanks

View 2 Replies View Related

SQL Server Double Hop

Feb 25, 2008

I have run into a somewhat pain in the posterior situation.

We have an app that currently uses SQL Server authentication. The application also uses a linked server. Now, we would like to move to a Windows authentication type of set up, but from what my network guys tell me is that AD doesn't support a "double hop".

In reading what's out here, I'm getting the impression that Kerberos needs to be enabled or delegation?

Does anyone know of somewhere I can find some good instructions on how to configure my SQL Server(s) to support the double hop?

I guess I shouls also tell ya whay our set up is:

- Our users authenticate onto our network.
- They then authenticate into Citrix.
- From Citrix they authenticate into SQL Server.
- Then there's the linked server.

So essnetially the hops woulg look like this:

Citrix to Database1 is HOP 1
Database1 to Database2 is HOP2

Thanks!!

View 4 Replies View Related

Double Take Software With SQL Server

May 7, 2008

Did you any out there used Double Take Software for SQL Server 2000 for Data Protection ( Setting up DR Site )

Thanks
Venu

View 2 Replies View Related

ASP, SQL Server And Double Insert...

Jul 20, 2005

hello,I have a little (big?) problem with a software in ASP / SQL Server.This is a demo of the problem:ID= 12458 Data=21/01/2004 21:14:45 txt txt txtID= 12458 Data=21/01/2004 21:14:45 txt txt txtID= 12458 Data=21/01/2004 21:14:45 txt txt txtID= 12458 Data=21/01/2004 21:14:45 txt txt txtID= 12458 Data=21/01/2004 21:14:45 txt txt txtSo: I insert a record from my asp page but I find the same record formore times... Why?

View 2 Replies View Related

Why Does SQL Server Round Number Of Type Double?

Jul 8, 2004

Dear Programmers,

I want to store a number of .NET type double (16,95) into the database
column of type numeric, but it is stored as integer (17) and when I call the
value in my application, it is displayed as 17. How can I solve this
problem? Thanks in advance,

Burak

View 2 Replies View Related

Insert Double Quotes Into Sql Server Table

Jul 23, 2005

hi,just wanted to know if i need to insert a string with double quotes init into a sql server table, do i need to use any delimeters, like "?an insert like:insert into producttable values(key, "double quote text")where i need the "double quote text" to go in like that, with the " "at both ends.Thank you.

View 1 Replies View Related

DB Engine :: Linked Server Double Hop To Clipper Tables 64-32 Bit

Jul 23, 2015

I am attempting to reach some Clipper tables through a 32-bit ODBC driver from a 64 bit SQL Server. As there is no 64 bit driver offered for Clipper, I am pursuing a solution similar to the one described here:

Creating a Linked Server with 64 bit SQL Server 2008 to MS Access

It involves using a SQL Express 32 bit instance as a bridge.

I have created a Linked Server on the 32 bit instance MTESTXPRESS as follows:

EXEC sp_addlinkedserver @server = N'ABDATA', @srvproduct=N'DataDirect 4.1', @provider=N'MSDASQL', @datasrc=N'ABServerCA'
On the 64 bit instance ALISTESTER I have another Linked Server as follow:
EXEC sp_addlinkedserver @server = N'ABACUS', @provider=N'SQLNCLI', @datasrc=N'ALISTESTERMTESTEXPRESS'

The suggestion is to then use a select statement such as:

SELECT * FROM OPENQUERY(ABACUS, 'SELECT COUNT(*) FROM ABDATA...ABBATCH')

Unfortunately, the DataDirect driver for MTESTEXPRESS will not recognize the 'ABDATA...ABBATCH' 3-part naming convention. The error message is:

An invalid schema or catalog was specified for the provider "MSDASQL" for linked server "ABDATA"

Is there some other way to select from the MTESTEXPRESS linked server?

View 21 Replies View Related

Double Click SQL Server Express And Install With Sa Password

May 30, 2007

Hi!



Is it possible to double click the sql server express installer, it will install sql server 2005 in silent mode, set sa password..



Just want alternative of command installation on double click



setup.exe /qb INSTANCENAME=<InstanceName> SAPWD=<StrongPassword>



is it possible







thanks in advance

View 4 Replies View Related

How To Set Up SQL Server To Do Full Text Search Against Double Byte Character

Jan 10, 2001

I had a situation that required me to set up SQL Server to do full text search against both English content and Chinese content. I am not sure if it's achievable in SQL server environment. Any help is appreciated.

View 2 Replies View Related

SQL Server 2012 :: Query Get Data In Double Codes In String

Feb 9, 2014

I have data like this

"entitlementwrapper" : [ {
"Type" : "Factory Warranty",
"Date_Type" : "Ship date",
"Status" : "Active",
"Start_Date" : "2012-12-21",
"End_Date" : "2014-01-19",
"Days_Left" : "116",
"Term" : "13",
"Description" : "Wty: HP HW Replacement Support",
"IsTrusted" : "Y",
"Transaction_ID" : "4644780453"
}

I want to get only data in double codes in using sql query.

View 9 Replies View Related

SQL Server 2014 :: Find Double Records Within DateTime Range

Apr 13, 2015

I have a query question.

Consider a table with the following structure:
RecordID (PK - int) - RecordDate (DateTime)

I need to find all records that fall within a 7 day period slot based on the first RecordDate of a specific slot.

Example, consider the following records:
RecordID - RecordDate

1 - 2015-04-01 14:00
2 - 2015-04-03 15:00
3 - 2015-04-03 16:05
4 - 2015-04-03 19:23
5 - 2015-04-06 09:15
6 - 2015-04-06 11:30
7 - 2015-04-07 12:00
8 - 2015-04-09 15:15

The result of the query I'd like should look something like this

1
2
5
7
8

So basically I'd like to leave record 3 and 4 out because they fall within 24 hours of record 2 and I'd like to leave record 6 out because it falls within 24 hours of record 5.I'd tried working with a CTE and set a dateadd(d, 1, recorddate), join it on itself and use a between From / To filter on the join but that didn't work. I don't think NTILE will work with this?

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved