Viewing 15 posts - 3,706 through 3,720 (of 4,820 total)
Dynamic SQL isn't even necessary. In fact, the table of field names isn't really needed either...
Try this on for size:
DECLARE @t1 AS TABLE (
tab varchar(100)
);
INSERT INTO @t1 VALUES ('I');
INSERT...
Steve (aka sgmunson) π π π
Rent Servers for Income (picks and shovels strategy)
June 4, 2015 at 7:49 am
Is it possible that the function gets a dependency "taken out from under it", so to speak, and then when accessed, there has somehow been no opportunity to re-establish that...
Steve (aka sgmunson) π π π
Rent Servers for Income (picks and shovels strategy)
June 4, 2015 at 7:16 am
I'm guessing, but you appear to have mixed the install of SSDT from a CTP release with an RTM install of SQL Server. Generally, that's not a good...
Steve (aka sgmunson) π π π
Rent Servers for Income (picks and shovels strategy)
June 3, 2015 at 8:44 am
Alvin Ramard (6/3/2015)
sgmunson (6/3/2015)
Steve (aka sgmunson) π π π
Rent Servers for Income (picks and shovels strategy)
June 3, 2015 at 8:30 am
Have you looked into the LEAD and LAG functions? The latter is what you appear to need. See the following blog for an example usage:
http://blog.sqlauthority.com/2011/11/15/sql-server-introduction-to-lead-and-lag-analytic-functions-introduced-in-sql-server-2012/%5B/url%5D
Steve (aka sgmunson) π π π
Rent Servers for Income (picks and shovels strategy)
June 3, 2015 at 8:21 am
I'm not 100% sure I know exactly what you are looking for, but if you're looking to compute the time difference between two fields that are stored as character fields...
Steve (aka sgmunson) π π π
Rent Servers for Income (picks and shovels strategy)
June 3, 2015 at 8:05 am
luissantos (5/29/2015)
i understand your doubt but i need the range of my invoiceheader dates .
without this range all invoices are appear.
In pratice, and i donΒ΄t know if it is...
Steve (aka sgmunson) π π π
Rent Servers for Income (picks and shovels strategy)
June 3, 2015 at 7:46 am
If it's "well-structured", that might suggest that loading it into an appropriate table design via SSIS might make sense, and depending on what testing bears out, you might even script...
Steve (aka sgmunson) π π π
Rent Servers for Income (picks and shovels strategy)
June 3, 2015 at 7:07 am
MadAdmin (5/30/2015)
do something like
select left(Name,charindex(' ',name)) from mytable
To cover the possibility of no spaces resulting in a NULL value, try this:
WITH mytable AS (
SELECT 'Alok Kumar' AS [Name] UNION...
Steve (aka sgmunson) π π π
Rent Servers for Income (picks and shovels strategy)
June 1, 2015 at 10:12 am
manoj.ramaiah (6/1/2015)
I have a package which is creating a excel file 'ExcelName.xls' and storing in 'E:\Reporting\Delivered_Reports'. Now I have to attach this report using send mail task and send it...
Steve (aka sgmunson) π π π
Rent Servers for Income (picks and shovels strategy)
June 1, 2015 at 10:02 am
I usually make folders using VBScript, but you can use a Script Task within SSIS, and use Visual Basic. I usually do it in a separate task...
Steve (aka sgmunson) π π π
Rent Servers for Income (picks and shovels strategy)
June 1, 2015 at 9:59 am
As I'm not familiar with how the XML stuff works in sufficient detail, all I can offer is a simple REPLACE:
SELECT REPLACE(
(
SELECT
-- Root element attributes
'http://tempuri.org/Form.xsd' AS xmlns,
'http://www.w3.org/2001/XMLSchema-instance' AS 'xmlns:xsd',
(
SELECT
-- Creating...
Steve (aka sgmunson) π π π
Rent Servers for Income (picks and shovels strategy)
June 1, 2015 at 9:53 am
Meatloaf (5/27/2015)
I am looking to create a simple IF Else statement in a SPROC but my syantax seems to be wrong. Can someone advise what I am doing wrong?
IF (vchDept='IT')
BEGIN...
Steve (aka sgmunson) π π π
Rent Servers for Income (picks and shovels strategy)
May 27, 2015 at 2:00 pm
myjobsinus (5/27/2015)
SSCommitted - Perfect! works like a charm! Thank you so much. your help is much appreciated.SSCrazy - Thanks for your help too.
Great work. keep going guys.
Many Thanks,
Alvin
Alvin (myjobsinus),
SSCommitted...
Steve (aka sgmunson) π π π
Rent Servers for Income (picks and shovels strategy)
May 27, 2015 at 1:47 pm
Can you use a variable name to supply the value instead of just pure text? If so, how about:
DECLARE @VER AS nvarchar(255) = @@VERSION;
DECLARE @TXT AS varchar(3);
SELECT @TXT...
Steve (aka sgmunson) π π π
Rent Servers for Income (picks and shovels strategy)
May 27, 2015 at 1:11 pm
Viewing 15 posts - 3,706 through 3,720 (of 4,820 total)