Monday, September 30, 2013

[SQL Server 2008 issues] Convert DD MMM YYYY to yyyymmdd in string

[SQL Server 2008 issues] Convert DD MMM YYYY to yyyymmdd in string


Convert DD MMM YYYY to yyyymmdd in string

Posted: 29 Sep 2013 11:21 AM PDT

Hi,I am struggling with changing the date format of [b]dd MMM YYYY[u][/u][/b] in the sample strings below [u]into [/u][b]yyymmdd[u][/u][/b]Sample Data InputColumn Name: [b]SourceName[/b][quote]12 Jan 2013 Test.docx 01 February 2001 File.pptx Meeting 04 Feb 2012.xls 09 September 2011.txt 30 Jan 13.doc[/quote]Sample Data OutputColumn Name: [b]SourceName[/b][quote]20130112 Test.docx 20010201 File.pptx Meeting 20120204.xls 20110911.txt 20130130.doc[/quote]

Returning related records from the same table

Posted: 29 Sep 2013 11:00 AM PDT

I have a table named batch. Which contains a PK field(ID) and FK field(OriginatingID). The issue I have is that I need to be able to return all related rows related to the PK field. The records in the table are similar to belowID ORIGINATIONID BATCHNUM1 null 1002 1 100EXP13 2 100EXP24 3 100EXP3I have been trying to figure out to write a select statement that would return all the rows that are related to the Batch 100I have thought about doing something with the BATCHNUM field however, the data entered in that field doesn't always follow the same conventions as far as the data that is entered.Any and all assistance is appreciated!Thanks

Rolling 3 month average cost help

Posted: 22 Sep 2013 03:16 PM PDT

Hi guys,I need some help calculating a 3 month avergae rolling cost. I have been trying to figure this out for a couple days now, as well as get help, but to no avail.What I'm trying to do is replicate a 3 month average cost metric that I have in excel to a sql query, so that I can use it in SSRS as a data set. In excel I take the avergae of the sum of the cost and divide it by the count of members.I have two tables that derive the data. Below is example of my tables:Table name: AddmissionContract Admissiondate SumofCost 0606 200701 8639.380607 200702 22895.940608 200703 123752.28null 200704 61378.49Table name: MembersContract Admissiondate CountofMembers0606 200701 860607 200702 1020608 200703 90null 200704 120

how to add a column to a table ?

Posted: 28 Sep 2013 11:51 PM PDT

How to edit table data in SQL Server Management Studio ?I right click on table > Edit top 200 data ---> then I go to cell ---> then I modify data.but how do I save this data ? It says data is not committed yet with a red mark.I tried clicking Execute SQL button at the top ...but that did not do anything.

Query to create log file for sql select query...

Posted: 29 Sep 2013 03:58 AM PDT

can you please tell me how to create a log file in sql server 2008

Installation Error

Posted: 19 Mar 2009 06:31 AM PDT

Hi All,I need urgent help from anyone. I was trying to install the sql server 2008 standard edition. When I try to install, i'm getting the following during the final stage --SQL Server Setup has encountered the following error:The collation was not found.Error code 0x84B40000.----------someone help me please.Thank you.

No comments:

Post a Comment

Search This Blog