Viewing 15 posts - 166 through 180 (of 422 total)
Something like this is what you need. The splitter function allows you to do a set-based join to get your query results.
--sample date table
IF OBJECT_ID('tempdb..#TempTable') IS NOT NULL
DROP TABLE #TempTable
CREATE...
May 3, 2013 at 1:25 pm
The two basic forms of the statement are:
--the first table must already exist. You can use * if inserting ALL columns,
--otherwise you must give a column list
INSERT INTO existing_table
SELECT...
May 2, 2013 at 11:09 pm
You should certainly consider these products. BTW, I do NOT work for this company, but just know they have a superior product for just the sort of things you seem...
May 2, 2013 at 9:45 pm
I usually don't expect the ISDATE function to return predictable results because it is dependent on the specific date datatype you are converting to and often gives different results (0/1)...
May 2, 2013 at 9:38 pm
Here's a function that does exactly what you want:
CREATE FUNCTION [dbo].[itvfFindPos]
(
@strInput VARCHAR(8000)
,@delimiter VARCHAR(5)
)
RETURNS TABLE WITH SCHEMABINDING
AS
RETURN
(
...
May 2, 2013 at 2:48 pm
Not exactly clear on what you are trying to accomplish, but my first instinct is to suggest the STUFF function. You can google it.
May 2, 2013 at 1:45 am
Find your \Local Settings\Temp folder and delete any .tmp files you find there. These files don't seem to clean up after themselves and after awhile you get hundreds of them...
May 1, 2013 at 6:05 pm
syadnan2408 (5/1/2013)
The requirements are;
Load data from 6 database tables into one excel sheet, while creating 4 new tabs for the new...
May 1, 2013 at 5:53 pm
WITH cteStore (SalesPersonID,TerritoryID)
AS
(
SELECT 1,2 UNION ALL
SELECT 2,2 UNION ALL
SELECT 3,2...
April 30, 2013 at 6:07 pm
The easiest method is GENERATE SCRIPTS:
April 30, 2013 at 12:00 pm
Assuming that the PKs would always be in ODD/EVEN order would make me nervous. What if data has been inserted or deleted and the IDs are no longer sequential? What...
April 29, 2013 at 10:10 pm
Bill.Smith (4/29/2013)
I was able to create the XML without the Metadata lines using, "FOR XML RAW ('Request'), ELEMENTS". ...
April 29, 2013 at 9:20 am
Here's an XML parsing procedure I use all the time. It shreds the XML into a table. Below that I modified the output of the second version to produce a...
April 26, 2013 at 8:07 pm
IF OBJECT_ID('tempdb..#TempTable') IS NOT NULL
DROP TABLE #TempTable
CREATE TABLE #TempTable (
[ID] INT IDENTITY(1,1) NOT NULL,
[MemberID] INT NULL,
[Event] NVARCHAR(50) NULL,
...
April 26, 2013 at 11:11 am
Here's what I came up with using dynamic SQL. To retrieve the column names dynamically it uses a function which I've included below.
DECLARE
@strSearch NVARCHAR(4000)
...
April 25, 2013 at 9:55 pm
Viewing 15 posts - 166 through 180 (of 422 total)