473,549 Members | 2,791 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Microsoft SQL Server Forum

Microsoft SQL Server database RDBMS - Ask questions about MSSQL administration, queries, errors, xml, data access, transact-sql, tools, mirroring, integration, setup, stored procedures, merging and more.
4
7,102
thread by: sariftustu | last post Dec 27 '18 by: mayasharma
Many way try but can not convert my MAC outlook EML mails into Outlook PST file format. Now i am worry about my important mails please provide any solution for type of problem.
1
1,210
thread by: TendaiMuchemwa | last post Jun 10 '14 by: Luuk
I want to ensure every serial number in a table has the same amount after each update to avoid a situation where the same serial number holds different values in different rows . CREATE TRIGGER myupdate (a,b) AFTER INSERT ON myTable FOR EACH ROW BEGIN SELECT a=lastInsertedAmount SELECT b=lastInsertedSerialNumber END
1
1,401
thread by: Viknes | last post Jun 9 '14 by: Luuk
(select '99999' as , /* the rest of the codes */ out put : <ram:ID> 99999 </ram:ID> but what i need is :
11
2,305
thread by: tasawer | last post May 31 '14 by: tasawer
Hi, in my SQl database, I have a WHERE statement to search a record based on two dates. using the code below, Query will not return a record if SearchDate=FromDate. Amongst my records, an example date range in database is: FromDate = 2014-04-10 17:32:55.000 ToDate= 2014-04-16 17:32:55.000 Search fails for 10/04/14. Other dates...
3
2,038
thread by: MartyC123 | last post May 22 '14 by: Luk3r
Hi, I have a situation where the customer wants to virtualize all their SQL Servers. They have medium sized databases and are a smaller company. The problem is the customer does not know which virtualization tool to use. I am not an expert on virtualization, and they are having someone else set up the servers. I started to think, how negatively...
4
1,532
thread by: phanikumar32 | last post May 23 '14 by: Luuk
Hello All, I have a table SQL Server with one column.The column name is 'Name'. This column contains names of some persons.(as shown in figure 1) So by using those names i want to get the output as each letter as an individual column.(as shown in figure 2) If this is possible please guide me how can i get this....
3
2,268
thread by: aladiver | last post May 14 '14 by: Rabbit
The following SQL code works fine if I don't use the CONVERT to make my column two characters wide. When using it as follows the error message reads: "ORDER BY items must appear in the select list if SELECT DISTINCT is specified." If I just use: SELECT DISTINCT MONTH(CTNoteDate) it works fine. How can I run this query with the column...
3
1,330
thread by: kimomakano | last post May 14 '14 by: Rabbit
I have successfully got my SAS data into SQL Server, but all of the data appears to be left-aligned, even numeric values. Is there a way to re-align the data so it is consistent with SQL data?
2
1,284
thread by: markyodo | last post May 13 '14 by: landrew21
Hello all this is my first post. I am trying to strip some unwanted text from a column containing department names. This first query strips all characters after the colon in the name: SELECT CASE WHEN CHARINDEX(':', DB.Table.DEPT)>0 THEN LEFT(DB.Table.DEPT, CHARINDEX(':', DB.Table.DEPT)-1) ELSE DB.Table.DEPT
0
1,075
thread by: raju171991 | last post May 12 '14 by: raju171991
How to follow the stored procedures naming conversation in mysql.
2
1,489
thread by: santoshpras1 | last post May 22 '14 by: prigupta2
I am using the below query to search some text in a sentence declare @a nvarchar(100) set @a=N'%' declare @b nvarchar(50) set @b='public property' select @b where @b like '%' +@a+'%'
8
1,563
Seth Schrock
thread by: Seth Schrock | last post May 8 '14 by: Seth Schrock
I'm probably making this harder than it has to be, but here is what I'm trying to do. I have created some functions in vb.net and then imported those functions as an assembly. I then created a UDF to be able to call those functions in the assembly. These functions require two arguments. The first I can pass to it as I call it. The second one...
4
1,314
thread by: Luk3r | last post May 7 '14 by: Luk3r
Hey guys, so what I'm trying to do is run two queries (keep in mind, there may be a better way to do this) to basically return a result of count = 0 or count = 1 #1 select * from person where username = 'username' From this query I want to get the users ID from the result. The column name is simply "id". I then want to use that ID in query...
2
1,286
thread by: AmrGhoneem | last post May 22 '14 by: prigupta2
My Code as below: ID,CustomerName,Customernumber,Type,Model,Serialnumber,PhoneNumber,Email,Country,SOW,Qty,InstallationDate,WarrantyExpiryDate,StopdateinCalculation,productDescription,GrossMaintenanceprice,YearMonth,ServiceTierlevel,SLAlevel,Location,NrofDaysincontract,TotalGrossMaintenanceamount,Yearamount,Netamountperperiod) @ID int,...
1
2,129
jhardman
thread by: jhardman | last post May 2 '14 by: Luk3r
the short version: I need to explicitly set the port for my linked server config to use only port 1433, and can't figure out how to do that. Has anyone done this before? the long version: I have two data servers on different subnets (xx.ab.cd.59 and xx.ef.gh.59)hosted by a third party and several client machines on each subnet that need to...
2
1,602
thread by: phanikumar32 | last post May 5 '14 by: phanikumar32
Hello all, Previously in my 'date' column the values are like below. Date ------ wed o5/23/2013 fri 03/20/2014 ------------ ------------ etc......
3
1,732
thread by: tubeysocks | last post May 9 '14 by: tubeysocks
Hello all, I am trying to query the minimum datetime from a column that is stored as nvarchar(max). There a a few tricky things with this query (at least for me) - There is more than just the date being stored within each record. -The position of the datetime is relative- although it does always appear in the format '**(DD-MM-YY at HH:MM...
3
1,278
thread by: phanikumar32 | last post Apr 29 '14 by: Rabbit
Hello all, I have a table in my sql server with column name as'type' and 'Direction' (as shown in image 1). and from this input i want the output as below once. (as shown in image 2). Thanks In Advance, Phani Kumar.
2
1,215
thread by: barbarao | last post Apr 25 '14 by: barbarao
Hi. SQL back end Access front end. I have a table that contains a phone number field. It has a mask so the phone numbers will have () around the area code. I ran a stored procedure to export some of the demographic fields in that table and some records are not showing the () around the area code while they appear like that on the form the user...
2
1,459
thread by: fran7 | last post Apr 25 '14 by: Rabbit
Hi, Same old problem I see everywhere but dont quite get the solution. I have this query. keywords_cmd.CommandText = "SELECT city,galleryimage1,galleryimage2,galleryimage3,galleryimage4,galleryimage5,galleryimage6 FROM databasetable where city like '%" & Request.QueryString("term") & "%' and galleryimage1<>'' and galleryimage2<>'' and...
1
1,155
thread by: phanikumar32 | last post Apr 25 '14 by: anvidc
Hello all, I have a table in sql server.The Layout is as below.(image1) And i want the output as like below.(image2). Please guide me,how can i do for this. Thanks In Advance, Phani Kumar.
4
1,477
thread by: Rohullah | last post Apr 23 '14 by: Luuk
Dear All, I want to create a view and the view only should get those rows from a table which a dateColumn has in this format(MM/DD/YYYY) this date(XX/20/XXXX) date for every month if the date is 21 in the view should not show that record, means for only one day the view should hold/keep the record. thanks in advance.
4
1,697
thread by: lsauravbi | last post May 6 '14 by: Rabbit
I have this first query which gives the mimetype and sum of their total datasize and count of number of document SELECT MimeType, SUM(DataSize)/1024 as Total_Size_MB,count(DocID) as Total_No_Doc FROM DVersData group by MimeType This second query gives the latest version of every document type SELECT DocID , MAX() AS FROM ...
1
1,477
thread by: lsauravbi | last post Apr 18 '14 by: NeoPa
I have table having column which stores documentid and another column storing the version of document.I want query to find out the only the latest version of document? can any one help
4
1,357
thread by: kimomakano | last post Apr 26 '14 by: ck9663
I have a set of data that has two dates for each row. The second set of dates is repetitive in some cases. I only want the last(MAX) date retained for this second set of dates. The raw data shows: ID Date1 Date2 312 1/12/2013 1/18/2013 312 1/12/2013 1/29/2013 312 1/21/2013 1/29/2013 312 1/25/2013 1/29/2013...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.