2,736 Topics
| |
Hi Its in fact easy to handle special characters like "%" in query, with just a bit of research one can found solution for this. Today when i checked events for my server i found that one error message and that was because a user searched for " l'atelier " … | |
Hi Forumer's, I have 3 tables, my objective is to compare the returndate from receiptdate and trandate and get the most recent receiptdate or trandate based on returndate. [CODE] Create Table #USPRODUCT (ESN Nvarchar(35), returndate datetime) Insert Into #USPRODUCT (ESN, returndate) Values ('268435458805382753','2011-04-21') Insert Into #USPRODUCT (ESN, returndate) Values ('268435458805382753','2011-08-08') … | |
Good day, I want to delete a record from a single table but some of the filed on sigle record is related to other table on my database. how would i delete it.. i used this script delete from faculty deptid = (select deptCode from dept) all i want is … | |
I have a database that continually receives information from outside sources. I then use SQL code to take this data and move to different databases based on the information received. As it stands right now, if I receive a '1', '2', '3', from an outside source, we manually move it. … | |
hello ! i have experience in VB.net,C# and MSSQL2000,2005,2008r2 .but today my boss assign me a task to connect mssql server 2008 by using JS or JSON ,both are unknown for me ,:( i dont have any knowledge about JSON and JS , can any one help me how to … | |
[CODE]IF OBJECT_ID('tempdb..#Table', 'U') IS NOT NULL DROP TABLE #Table GO Create Table #Table ( CorrectionDate datetime, Origdesc nvarchar(50), Newdesc nvarchar(50), Total int ) Insert Into #Table (CorrectionDate, Origdesc,Newdesc,Total) Values ('2011-08-01 00:00:00.000','RMAWAR','NTF',193) Insert Into #Table (CorrectionDate, Origdesc,Newdesc,Total) Values ('2011-08-01 00:00:00.000','NTF','RMAWAR',108) Insert Into #Table (CorrectionDate, Origdesc,Newdesc,Total) Values ('2011-08-01 00:00:00.000','RMAWAR','Sub Abuse',86) Insert Into … | |
Hello Friends. Im having a problem in identifying the Provider for my MSSQL Server 2008. Can anyone address me the location of this information because I have to initialize it in my VB.et. As I understand for Ms Access it is something like [CODE]"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="[/CODE] Can I know where to … | |
My table has these info T123 T153 T174 Basic SQL count works fine which results to (3).. but when I use this function needed for my query the output is 4. [CODE] COUNT(DISTINCT CASE WHEN id LIKE '%T%' THEN RIGHT(ID, 3) ELSE 0 END) AS Count [/CODE] what's wrong with … | |
I am wondering if anyone wants to try and better this code sample. Here is the request: Given a range of dates (start, end) return all rows that cross that range where the rows contain a start and end date. This appears to work. I just wonder if anyone else … | |
hi there i have problem with my MS SQL server some one execute unwanted update statement on huge table and make loss for my data i fix it by using available backup but, i need to know who,can i do it if there are some logs for sql statement please … | |
Hi, I have a table that stores records of students. Now what I want is that after a particular period of time the account of the student gets disabled automatically. Is there any time based trigger that can be hit automatically if i set the time limit for that. Or … | |
Hi guys, Need your advice. I ask my boss if i could have a training for SSAS and he replied positively, im not connected in IT we are different department but were using MS SQL and we do some analysis and reports using excel and SSRS. im helping other department … | |
Hi, For the users, i grant the permissions to create a table and then i also given the permission to alter table i.e grant alter on san to user; Logging as user: Table (design mode), am getting the error: "You are not logged on as the database owner or system … | |
I am having a table named "Society" And 5 master tables "BlockA","BlockB","BlockC","BlockD","BlockE". The "Society" table contains the foreign key columns of all the 5 master tables. Now when i write the select query it takes a lot of time to execute, as 5 tables are referencing one table and joining … | |
So I've looked for an answer to this question on the web but couldn't find anything that covers this specifically. Our database stores the project version in the format #.#.# (Rev_#) so there is both text and numbers in the string. I have no control over the data so I … | |
Hi a have 4 tables Table A ID | Data 1 --------------- 1 | A Table B ID | Data 2 ----------------- 1 | B 1 | C Table C ID | Data 3 ---------------- 1 | D 1 | E 1 | F Table D ID | Data 4 … | |
Guys, Need your help. i need to obtain the nearest date from 3 tables. attached my scripst. th problem with this scripts it creates double entry in receipt date with the same transaction specially for this ESN "268435459407885398". [CODE] SELECT p.ESN, p.ReturnDate, s.Receiptdate, e.Shipdate FROM #Product p with (nolock) CROSS … | |
I have Sql2008 enterprise edition and want to install on windows 7 ultimate edition,it is giving error for version compability.what is required to do? | |
Hi, I am having trouble with retrieving records on my database. My layout was this.. [CODE]UsersList Username Firstname LastName Role Records TheUser ApprovedBy DateApproved [/CODE] The first text are the table names while the indented once are the field names. I have a table named Records. TheUser and ApprovedBy was … | |
Hi, I want to convert Single Column values to Row. Table Original Content: Code Amount Expenditure 10027 5000.00 LOCAL CONVEYANCE 10027 320.00 LOCAL CONVEYANCE 10116 1589.00 TRAVEL EXPENSES 10095 350.00 LOCAL CONVEYANCE 10095 1215.00 TRAVEL EXPENSES Expected Output : Code LC TE 10027 5000.00 NULL 10027 320.00 NULL 10116 NULL … | |
hi, can someone help me? i am using vb.net2010 and mssql as my database. what i want to do is when i open the form, the database will auto increment the student id and show it on the text box. | |
Hello Every one ! i am trying to make query to show the growth of sale of the product month wise ,i have one table name Sales .having following fields , SalesID,ProductID,amt,Qty,SalesDate i use this query to show my records [CODE] select ProductID,Amt,Qty,substring (datename(month,SalesDate ),1,3)as months,DATENAME(YEAR,salesdate ) as years [/CODE] … | |
Hi, I am trying to use the PIVOT function in SQL Server 2008. I have a query that I think should work, but whenever I execute it, I get the errors: Msg 265, Level 16, State 1, Line 25 The column name "CompleteTime" specified in the PIVOT operator conflicts with … | |
hi, what i need to do is to get information from 2 tables and show it to the listview. for example, i want to get the surname, first name and middle name from the student_info table and the Payment_Status from the accounting_system. i don't want to show the information that … | |
Hi Guys , i have faced a sql command problem. That is currently i have 2 different table [ICODE]a) Select ID, Name from Table1 where ID >=1 and ID ID <=3 ID | Name 1 | Alan 2 | Amy 3 | Andrew [/ICODE] [ICODE]b) Select ID,Sum(Points) as [Total] from … | |
i want to create a stored procedure that can return the initial character of two string inside the description field. ex. Computer Security -> in one data only if i use this statement select left(description) from table1 i want to return only CS when i run my script. is there … | |
I have a form where a user can search for properties from a database. Everything is working except for the suburb search. I would like the user to be able to search for more then one suburb. At the moment I have the information from the textbox being separated into … | |
The End.