Viewing 15 posts - 7,531 through 7,545 (of 8,731 total)
Here are some ideas using T-SQL.
WITH SampleData(String) AS(
SELECT 'LAT|BOX|5290113661|BP9744524|PHY|JAI|GREWAL|1|BI|Vacc Bill|MED|191.2||SHI||20131015|50242006001|||||6|116820411||' UNION ALL
SELECT 'LAT|BARDI|TAMMY|20020 44th|PHY|MARK|MORADI|BI|Vacc Bill|MED|183.0||SHI||20131016|50242006001|||||6|116899590||' UNION ALL
SELECT 'LAT|ARRE|SONIA|344 RICH|PHY|IAN|HANT|1|BI|Vacc Bill|MED|153||SHI||20131016|50242006|||||3|116786607|')
SELECT String,
LEFT( String, CHARINDEX( '|PHY|', String)) AS LAT,
SUBSTRING( String, CHARINDEX( 'PHY|',...
October 29, 2013 at 1:05 pm
There might be several ways to go, but here's an option using a recursive query on a table-valued function. Before implementing this solution, be sure to understand what's going on...
October 29, 2013 at 11:43 am
If you're looking for ideas, this phrase by Jeff Moden might help you.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to...
October 29, 2013 at 10:19 am
If you give the Stored Procedure code and the cursor code, we might be able to give a better solution. You should give DDL and sample data as well to...
October 29, 2013 at 9:39 am
This is just a shot in the dark. It might be wrong but the information you gave is limited. Could you post DDL and sample data as well as expected...
October 29, 2013 at 9:14 am
Why don't you just simply add the top 1? It seems like a good idea.
SQL Server will ignore other conditions if 1=2 is present, since it will know that the...
October 28, 2013 at 4:21 pm
I'm not sure if it's of help, but SQL Server won't throw an error for DateField = '31/31/2013' if the table doesn't exists because it will treat it as a...
October 28, 2013 at 4:09 pm
It's the same way, but you should read the article (it's not long) to understand how does it work.
October 28, 2013 at 2:59 pm
Ed Wagner (10/28/2013)
Sean Lange (10/28/2013)
Luis Cazares (10/28/2013)
October 28, 2013 at 11:13 am
To get better help, please read the article linked in my signature, it will tell you how to post DDL, sample data and expected results in the way someone can...
October 28, 2013 at 10:53 am
Rating someone on an average for all SQL Server is not a great idea. I could rate myself high on developing T-SQL, but not on DBA or ETL stuff. It's...
October 28, 2013 at 10:32 am
Maybe you're facing some problems with NULL values.
For more information: http://sqlinthewild.co.za/index.php/2010/02/18/not-exists-vs-not-in/
Example:
WITH TableA(IP1) AS ( SELECT '10.1.1.20' UNION ALL SELECT '10.2.00.21' UNION ALL SELECT NULL),
TableB(IP1A) AS (SELECT '10.1.1.20' UNION ALL SELECT...
October 28, 2013 at 9:58 am
Using SQL Server 2005, there's an interesting and really fast way to do it. You should read all the explanation and be sure to understand it before using it. You...
October 28, 2013 at 9:20 am
lnardozi 61862 (10/25/2013)
Just a thought - category1 thru category5 could just be computed fields. You already have all the information you need in Score.
I'm sure that Andrew can't change the...
October 25, 2013 at 6:07 pm
I'm losing faith in humanity here as I've been interviewing some candidates for BI developers at my job. The last one claiming to have 8 years of experience as .NET...
October 25, 2013 at 4:30 pm
Viewing 15 posts - 7,531 through 7,545 (of 8,731 total)