Viewing 15 posts - 8,161 through 8,175 (of 8,760 total)
You could use "SET IDENTITY_INSERT <table_name> ON" to insert identity values into a table. Just remember to switch it off afterwards.
😎
May 28, 2014 at 10:05 am
That is vb.net code, if you are using C# then you need to change it, unfortunately I cannot do it at the moment.
😎
May 28, 2014 at 5:52 am
Another quick though:-D (and you could squash two bugs with the same code), check the file size. Found this lying around:cool:
Private Function intGetFileSize(ByVal strFileName As String)...
May 28, 2014 at 5:33 am
Here is a very simple approach
😎
USE tempdb;
GO
DECLARE @TXML XML = N'<?xml version="1.0"?>
<CommonEventData>
<Row>
<CallSource>999</CallSource>
<CallerCityStateZipCode>
</CallerCityStateZipCode>
<CallerName>TEST</CallerName>
<CallerPhone>TEST</CallerPhone>
</Row>
<Row>
<Beat>E27</Beat>
<MultiEventId>0</MultiEventId>
<PrimaryUnitId>E09A1</PrimaryUnitId>
</Row>
</CommonEventData>'
SELECT
MAX(RO.W.value('CallSource[1]','NVARCHAR(50)') ...
May 28, 2014 at 5:20 am
Quick thought, escaped back-slashes?
😎
public void Main()
{
string filelocation = @"D:\\myfolder\\emps.txt";
...
May 28, 2014 at 2:47 am
david.dartnell (5/28/2014)
I am getting the error 'Incorrect syntax near the keyword set' with the following code snippet -
declare @dteTo Date
set @dteTo = CONVERT(date, GETDATE())
My intention is to set the...
May 28, 2014 at 2:23 am
Quick question, how do those two tables relate?
😎
May 28, 2014 at 12:07 am
A semi-dynamic query is straight forward
😎
USE tempdb;
GO
--CREATE TEST DATA
IF OBJECT_ID('tempdb..#PivotTestTable') IS NOT NULL DROP TABLE #PivotTestTable
CREATE TABLE #PivotTestTable
(
[SURVEY_REF] [nvarchar](100) NOT NULL
,[QUESTION] [nvarchar](MAX) NULL
,[ANSWER] [nvarchar](100) NULL
,[DATE_REC] [nvarchar](10) NULL
,[TIME_REC] [nvarchar](10) NULL
)
INSERT...
May 27, 2014 at 11:04 pm
prepaess (5/27/2014)
hi all please who can help me to solve this errorthis is the snapshot
It is a connection manager error, by the looks of it, it cannot locate...
May 27, 2014 at 10:18 pm
autoexcrement (5/27/2014)
Is there any way to...
May 27, 2014 at 10:13 pm
mickyT (5/27/2014)
I've had a look at a few options and for the data the I'm testing on, this appears to be the best solution (for SQL 2012 +). It...
May 27, 2014 at 1:38 pm
Johnny H (5/27/2014)
DECLARE @sign...
May 27, 2014 at 10:00 am
Roust_m (5/27/2014)
The server timezone is (UTC-06:00) Central Time (US...
May 27, 2014 at 2:06 am
May 27, 2014 at 1:35 am
Roust_m (5/27/2014)
Eirikur Eiriksson (5/26/2014)
Roust_m (5/26/2014)
To deal with clock moves.Bear with me here, but why not do this in TSQL as a set based operation?
Can you please elaborate on this?...
May 27, 2014 at 12:39 am
Viewing 15 posts - 8,161 through 8,175 (of 8,760 total)