473,537 Members | 2,712 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.
1
1,211
thread by: barbarao | last post Mar 27 '14 by: barbarao
Hi,SQL backend, Access front end. I have a query which has 6 column aliases. Only two of them are showing properly. Anyone have an idea of what could be going on? Query follows. Thanks in advance.SELECT TOP 100 PERCENT dbo.ProviderNEW.NPI AS , 'Primary Care | Adults' AS , dbo.ProviderRelationships.OPNumber AS ,...
0
981
thread by: baddulas | last post Mar 29 '14 by: baddulas
Hi all, Please help on the below scenario. Source - Oracle Target - SQL Server After every 2 hours data is truncating from target and loading the source data.Now i don't want to lose the target data.only matched records needs to be delete from target. Which approach is best for the above scenario.
6
1,477
thread by: lsauravbi | last post Apr 1 '14 by: Luuk
the following query is running slow as i have used the abs function in it WITH SubFolders(dataid,name,SubType,lvl) AS ( -- Anchor Member (AM) SELECT dataid, Name,subtype, 0 FROM llirimsuser.DTree (nolock) WHERE dataid = 28264085
1
2,251
thread by: fran7 | last post Apr 2 '14 by: Rabbit
Hi, I have this query to get a drop down list and that works fine. The trouble is I need to select another field from the table to give it a where clause but if I try I get an error message. SQLQuery = "select tbl.country from tbl group by country HAVING COUNT(country) > 1 order by count(country) desc" Any pointers would be great Thanks...
1
1,427
thread by: fran7 | last post Apr 2 '14 by: Rabbit
Hi, I have individual members pages by profileid lngprofileid=CLng(Request("profileid")) On these pages I am making a second query as I want to display other members who fall into a similar category (country) for example, to the member in the main query. Because the main query is by profileid and not the category (country) i cannot see how...
1
1,299
thread by: ruileote | last post Apr 5 '14 by: Luuk
Hi, I have a problem. In my databse I have the following numbers available: 101 104 105 110 111 112 113 114 What I need is to get a select query with records and sequentials numbers after it like:
2
1,376
thread by: jl98 | last post Apr 8 '14 by: Luuk
Other than using substring('2014-04-06',6,2) + ... Is there a better way to convert the varchar column value to MMDDYYYY format ?
3
1,187
thread by: phanikumar32 | last post Apr 11 '14 by: Rabbit
Hai all, I have a table like below.(with the column headings are column1 and column2) Column1 Column2 id 2 Name xyz Class 10 id 3 Name pqr Class 10 id 5
1
1,119
thread by: Merchant62 | last post Apr 14 '14 by: Rabbit
I have multiple user environment and want to obtain uniq sales invoice no for each user I run update query ALTER PROCEDURE . -- Add the parameters for the stored procedure here @gid varchar(5) AS UPDATE .. WITH (ROWLOCK) SET COUNTERS =COUNTERS+.000001 UPDATE ..
3
1,664
thread by: jimatqsi | last post Apr 16 '14 by: Rabbit
I cannot figure out why this function returns Null for every customer. Even when I run a query based on the credit card file, which means every row has something to be returned by this function. The function should read all the rows in table x and concatenate the CC last 4 digits along with expiration info. So valid return values could look...
5
1,247
thread by: barbarao | last post Apr 16 '14 by: barbarao
Hi, SQL Backend. Access Front End. I have a stored procedure that works fine for me but when an end user clicks the button that should run the stored procedure they get a message that the procedure can't be found. I know there is a simple fix for this but can't remember it. Hoping someone can help. thanks.
2
1,332
thread by: lsauravbi | last post Apr 17 '14 by: lsauravbi
I have 1 table that store file MIME type info in 1 coloum and size of each file in another coloumn. Please help me query to find the total size for each MIME type?
1
1,476
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,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.
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.
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...
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...
4
1,355
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...
2
1,166
thread by: vikasavinash | last post Apr 26 '14 by: ck9663
Hi All, I would like to know how to release a lock from table that occured while running a stored procedure. Thanks :)
3
1,275
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,350
thread by: pdeepti | last post May 2 '14 by: pdeepti
I want to chane my name column records like if the name is with one word (Example: John) it shuold remain same (Ex: John). If it is with two words (Ex: John Bodi) it should be there as it is (Ex: John Bodi) but if it is one word and one letter (Ex:John B) then it should get '.' at the end of the letter(Ex: John B.) Please post your query for...
1
2,127
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......
2
20,263
thread by: honeyvirus | last post May 6 '14 by: markwillium
Hi , Can somebody help with an SQL Statement to list the Recovery models for all the Databases in a server. I am trying to use the status column from sysdatabases..but i am not able to get the right statement. Any help/references asap... Thanks in advance. Sasi.
4
1,696
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 ...

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.