In company there are two version of app. New one save order status as "Ordered" the old save as "ORDERED". In order to find out who use old version, how to code in where clause like below?
select userid from order where status = 'ORDERED' (only capital)
Here is my question: Can you set this code up to do more than one word ex: I have names like Mc Donald, or Brook-Smith and the are lower case like the code states??
upper(left(client.first,1))+ lower(right(client.first,len(client.first)-1)) +' '+ upper(left(client.last,1))+ lower(right(client.last,len(client.last)-1)) As 'Full Name'
I have a strange SQL statement Select * from TableName WH
Basicly I have a code that creates a Dynamic SQL statement in this case I thought that I will get an error on the above statement but infact I did not I tested it on the Enterprise Manager and it works fine I changed the WH to WHER it works as long as its not a reserved word so if I put my name or what ever after that sql it still works unless I use two words with a space between them it will give an error on the second one not the first
Can anyone tell me why is that I do not know if its a feature or what
We compulsorily use NOLOCK in our scripts on reporting DB and development generally forget putting NOLOCKS or schema names with tables.
Creating a script to search for a missing word or a phrase in SQL Server script.
Our format is <schema>.<table> <alias here> WITH NOLOCK <or alias here> or <schema>.<table> <alias here> NOLOCK <or alias here> or <schema>.<table> <alias here> (NOLOCK) <or alias here>
but generally developers write only <table> <alias>
What I really need is to find the entries that have the word LVAD but on either side there should be a space chartacters.In other words I don't want to see the following coming from the query "SILVADENE ([PHI] SULFADIAZINE)"How can we write this query to search only for any entry that has the word " LVAD " ?
Select top 100 * FROM tbl_abc where AIMS_Value like '%LVAD%'
I have an application providing me with multiple headers which I havemergerd into one big header (below), this header my not always be thesame but I need to be able to extract a periodstart and periodend fromit. The periodstart will always be the third substring from the end(or 3rd from right) and the periodend will always be the firstsubstring from the end (or 1st from the right).How can I extract the periodstart and periodend?E.g:- Header'Jensen Alpha TR UKN GBP BM: Caut Mgd BM (50% FTAllSh 50% ML £ BroadMkt) RF DEF:RFI 3Y 31/08/2004 To 31/08/2007'I currently have the sql: convert(Datetime,(dbo.FDHGetWord(@FullHeader, 20)) ,103) but this only works in thisinstance, I need to use someting like the RIGHT function or REVERSEfunction but I can't get the sql right.Can someone please help!????
I have a SSRS report developed in SQL 2012. When I exporting the report into word the back ground colour of page header missing. When Exporting to PDF and Excel page header BG colour showing.
For the past couple of days I've been having an issue with Reporting Services. From what I can understand reporting services doesn't work well when exporting to word.
The scenario is quite simple, I am developing a report for a client with a 'master page', which works as the cover, and executes 2 sub-reports with one table each, nothing fancy. We don't export this report to pdf, because the internal client has to attach another report that is impossible to automate, so they generate that report via excel and integrate it on our word document before sending the document to their business partners.
Our main problem is that we can't export the header/footers to word.
Below is from the SQL Help files on INSERT INTO http://msdn2.microsoft.com/en-us/library/ms174335.aspx
What is the N doing in this script? (...N'F2'...N'Square Feet'...)
----------------------------------------- USE AdventureWorks; GO INSERT INTO Production.UnitMeasure VALUES (N'F2', N'Square Feet', GETDATE()); GO -----------------------------------------
i have string where i need to convert them into Capital text in required string only
i have written query to do this using Charindex it is finding only one how to go for 2nd one i am only finding the 2 nd word through index how to find other words also
Is it possible to pull the index(s) for capital words in a string. Â For example, if I have a string that says, GetTableName, would it be possible to output, 0, 3, and 8?
hi! I'm just wondering does anyone know how to create an sql command that can search word by word? what i mean is like I have a product with name 'harry potter broom'. I want an sql command where if i type only 'harry broom' this 'harry potter broom' product will show up. Does anyone have any idea? Here's my sql comand: (I'm using asp.net vb script do develop this system) ------------------------------------------------------------------------- query = "select distinct * from product where " & _ "(pname like '%" & keyword & "%' or " & _ "pdesc like '%" & keyword & "%' ) and " & _ "(price >= " & price1 & " and price <= " & price2 & _ ") and status <> 'out of stock' order by price asc" ------------------------------------------------------------------------- Thank you.
Presently using CONVERT(VARCHAR(11), [ExpiryDate], 100) to get close to the correct format.Only stumbled across this by accident so am assuming there might be better hidden 'treasures' .Formatting dates seems to be my biggest time-consuming activity and I just don't seem to get better at it!
Is the word "Name" a reserved word in SQL? look at line 10 of my stored procedure. When I use the word "Name"it is highlited in blue by SQL Server? Note I only list part of the stored proc 1 CREATE PROCEDURE [dbo].[GetXMLPeopleNames] 23 (4 @Status nvarchar(3)5)6 AS7 SELECT8 PersonId,9 PersonDescription,10 Name,11 UpdateDate,12 UpdateAppUser13 FROM14 Customer WHERE Customer.PersonDescription=@Status15 ORDER BY
I work for a financial company where we send out lots of correspondence to clients on a daily and monthly basis. This would typically be something like a financial report, account statements, etc. We've decided to use PDF as the format which these documents must be in when our clients receive them.
Our marketing and sales departments designs the templates of these documents using Microsoft Word. They can save these MS Word documents in the Word XML format (either 2003 or 2007). We want it in XML format, because it is text based, and we can therefore string replace the content to update the template with a client€™s information. In the same token RTF would also do, but the file size when converted to RTF is a problem.
What I am looking for is a way to convert this XML into PDF using something like XSL-FO - i.e. we do not want to use the Word Interopt on our Production Server, firstly it is a little slow and secondly the production server is unmanned and we cannot allow a WinWord.EXE process to not close successfully for some or other reason.
I've tried a number of companies' evaluation software to try and achieve this (converting the WordML to PDF via XSL-FO), but so far no luck.
Does anybody know of a stylesheet out there with which I will be able to achieve this? Or an alternative method of converting MS Word files into PDF without using Word to do it?
I am trying to move files to directories based on the file status. If the file contains the Flag='E' then I want to move it to an "Error" folder, otherwise it will go to a "Processed" folder.
Here is my current code:
DECLARE @cmd varchar(500) SELECT CASE WHEN Processed_Flag = 'E' THEN SET @cmd='MOVE /Y C: empmyfiles*.dat C: empmyfilesError' ELSE SET @cmd='MOVE /Y C: empmyfiles*.dat C: empmyfilesProcessed' END FROM#TEMP
I need assigning a group of users read, write, update (not delete) permission on all user databases. is there any way to do so instead of creating role on each database separately.
How can I do this in TSQL, there are alot of wild chars but I could not find how to count them, in case below I only want id =1 and 2
this sql is not correct yet...
DECLARE @a VARCHAR(22) = ' alpha1234 qwerew', @b VARCHAR(22) = '3456_Bravo', @c VARCHAR(22) = ' only_three123_Delta' --SELECT 1 id, @a c UNION select 2 id, @b c UNION SELECT 3 id, @c c SELECT * FROM (SELECT 1 id, @a c UNION select 2 id, @b c UNION SELECT 3 id, @c c) b WHERE c LIKE '%[1_3]%'