Viewing 15 posts - 481 through 495 (of 1,162 total)
SELECT COUNT(*) AS Total,
COUNT(CASE WHEN igroup=1 THEN 1 END) AS group1,
COUNT(CASE WHEN igroup=2 THEN 1 END) AS group2,
COUNT(CASE WHEN igroup=3 THEN 1 END) AS group3,
COUNT(CASE WHEN igroup=4 THEN 1...
March 6, 2012 at 4:23 am
I'm sure you can do this in a text file with the correct delimiters, but I'd avoid flat files entirely and use SSIS to move the data directly from one...
March 6, 2012 at 3:53 am
There is a wealth of information on Google on how to protect against SQL Injection. The main points are:
Always parameterise your inputs into SQL Server (e.g. use parameterised stored procedures...
March 6, 2012 at 2:43 am
I'd go for CustomerAttachment, EmployeeAttachment and ProjectAttachment tables with FK's back to the attachment table and the relevant entity...
March 6, 2012 at 2:36 am
mtillman-921105 (3/5/2012)
I was thinking it must be Teriyaki chicken, but it was not to be... :w00t:
That's Japanese! Entirely different cuisine 🙂
I've had good pigs trotters before in...
March 5, 2012 at 12:52 pm
Divine Flame (3/5/2012)
???
It's a spam bot. Reported
March 5, 2012 at 6:47 am
You could easily build your own backup script and use the sys.databases system view to filter out names as required.
Or, you could use something like Ola's backup scripts which support...
March 5, 2012 at 4:26 am
Is it just as simple as this:
declare @device_status_flag int=-539042045
SELECT SUBSTRING(CAST(@device_status_flag AS BINARY(4)),2,1)
This result could obviously be cast back to an int if required.
March 2, 2012 at 6:59 am
I haven't got a 2000 instance to hand, but shouldn't it be master.dbo.xp_delete_file?
March 1, 2012 at 9:39 am
If you're using SQL 2008 SP2 onwards, you can change the select to:
SELECT
LEVEL4_CODE,
LEVEL4_NAME,
LEVEL5_CODE,
LEVEL5_NAME,
LEVEL6_CODE,
LEVEL6_NAME,
product_Name,
package_Name,
product_code,
package_code,
borrower_no,
Due_Date,
RECEIPT_DATE,
RecPA,
Recsc,
Reclsc,
RecPenalty,
Rebate
FROM dbo.CR_RecoveryReceiptWise_Rpt(@DisbursementDateFrom,@DisbursementDateTo,@ReportingDate,@PRODUCTCODE,@PackageCode,@PurposeCode,@DonorCode,@ProjectCode,@MemberCode,@LoanApplyDate,@LoanStatus,@RepaymentMode,@RepaymentPeriod,@BorrowerNo,@SanctionNo,@PhasePLA,@PovertyRank,@Gender,@CNIC,@CoCode,@CoType,@CoStatus,@OfficeCodes) OPTION(RECOMPILE)
This will then use the new optimisations for static...
March 1, 2012 at 3:58 am
Mark Thornton (2/28/2012)
February 28, 2012 at 1:15 pm
You can easily use SSIS to pull directly from one data source to another without having to put it on disk first.
The easiest way to do this is to create...
February 28, 2012 at 9:21 am
If you have upgraded from SQL 2000, firstly check that you've specifically updated statistics WITH FULLSCAN.
Other than that, you may be hitting an edge case where SQL 2000 actually came...
February 28, 2012 at 8:34 am
Sorry, I guess what I meant was the problems associated with Parameter Sniffing rather than strictly Parameter Sniffing. Obviously in your 3rd example, if you changed the parameter value to...
February 27, 2012 at 10:53 am
GilaMonster (2/27/2012)
HowardW (2/27/2012)
Presumably, the one exception to this is the OPTION(RECOMPILE) optimisation in 2k8 SP2 onwards in that it forces it not to parameterise?
That's still parameterised (well, depends on...
February 27, 2012 at 7:51 am
Viewing 15 posts - 481 through 495 (of 1,162 total)