3,481 Topics
![]() | |
[CODE]Select CONVERT(VARCHAR,[Last_Edited1],106) As [Date], count([Lead_id]) as [Total Lead] from Avalan_cus Group By CONVERT(VARCHAR,[Last_Edited1],106) - (Select Count([Lead_Id]) from avalan_cus where [Lead_Id] in(Select Leadid from avalan_extract)Group By CONVERT(VARCHAR,[Last_Edited1],106))[/CODE] how can i do like this....i hv to substract | |
[code=php]<?php $host = "Localhost"; $user = "User"; $pass = "Pass"; $db = "DB"; echo "<b>This will test your SQL Server connectivity...</b>"; /********** testing connectivity ***************/ echo"<font color = 'green'><br>connecting to Server....<P>"; $link = mssql_connect( $host, $user, $pass); if( !$link ) { die("<font color = 'red'><p>Failed to connect to server: database … | |
hi all, this is first time connect php with mssql 2005 code : [CODE]<?php $myServer = "srv\ins"; $myUser = ""; $myPass = ""; $myDB = "db1"; //connection to the database $dbhandle = mssql_connect($myServer, $myUser, $myPass) or die("Couldn't connect to SQL Server on $myServer"); //select a database to work with $selected … | |
I know, is a very basic question, but I am in the process of re-learning sql stored procedures, and this is what happended: I was practicing with some simple delete / insert routines, when encountered with this: if I ONLY insert records: 1. dog 2. cat 3. t-rex 4. llama … | |
Hi, select row_number() over(order by b.inv_no) as sl_no,b.fyear_code,b.inv_no,b.inv_date,b.service_nature,b.inv_total,c.bal_amount,b.client_code,b.amt_received from fn_receipt a, trn_invoice_history b, mst_expenditureinvoice c where a.client_id=b.client_code and a.client_name=b.client_name and a.location=b.client_location and a.receiptno=35 and b.fully_recived not in ('Y') and b.amt_balance>0 and (c.fyear_code=b.fyear_code and b.inv_no=c.inv_no) union select row_number() over(order by b.inv_no) as sl_no,b.fyear_code,b.inv_no,b.inv_date,b.service_nature,b.inv_total,c.bal_amount,b.client_code,b.amt_received from fn_receipt a, trn_invoice_history b, mst_invoice c where … | |
This is a User Defined Function to perform simple encryption on an input string. This is performed by transposing the ASCII value of each character in the string by the increment value (@increment in the parameter list) Pass the function the string you wish encrypted and the increment value, which … | |
I'm running MSSQL Server 2008 I did this: set CLASSPATH= C:\Program Files\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\enu\sqljdbc4.jar (I dont know where I can check if this has been executed correctly) Then when approaching this URL: [url]http://localhost:8983/solr/db/dataimport?command=full-import[/url] Using this data-config.xml: [code=xml]<dataConfig> <dataSource driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://localhost:1433;databaseName=wedding" user="sa" password="r00kw0rst" /> <document name="weddinglocations"> <entity name="location" … | |
i have procedure like this select count(*),sum(Transaction_Amount),dateadd(hour, datediff(hour, 0, Created_On), 0),convert(nvarchar(10),Created_On ,105) from Collect_Transaction where convert(nvarchar(10),Created_On ,101) between @Date_From and @Date_To group by dateadd(hour, datediff(hour, 0, Created_On), 0),convert(nvarchar(10),Created_On ,105) order by dateadd(hour, datediff(hour, 0, Created_On), 0),convert(nvarchar(10),Created_On ,105) but it displays time when it has an entry . but when it … | |
[CODE]declare @Search_String nvarchar(50); set @Search_String =null select * from Punnu1 where Column11 like case when @Search_String is null then '%%' else '%'+@Search_String+'%' end[/CODE] i have a query like this . but this does not take any element in column1 with values null. what should i do to take query with … | |
As soon as the computer showed a problem I had to start in safe mode to run MBAM. I updated first. I did run MBAM first before all the other scanners. First MBAM scan, Malwarebytes' Anti-Malware 1.46 [url]www.malwarebytes.org[/url] Database version: 4363 Windows 5.1.2600 Service Pack 3 (Safe Mode) Internet Explorer … | |
Hi. I am new to this forum/community and need help to join multiple result sets in SQL. The last time I used SQL was in 2000. The goal is to provide one single data set result from multiple queries. I have included the code from two queries that I have … | |
I have some text with Cyrillic and Latin (š, đ, č, ć, ž). How can I store that data in MS SQL 2008. I tried to store word 'Palačinka' but instead of 'č' i get 'c'. | |
Hello everybody, I'm having the same problem. I can connect to a SQL server with default instance (no named), but can't connect to a named instance! I tried escaping backslashes, and putting port number, with no success. Examples: $connection = mssql_connect('MYSERVER', 'USER', 'PWD'); --> WORKS OK $connection = mssql_connect('MYSERVER\INSTANCE', 'USER', … | |
I know this is probably a stupid post but I cannot think of how to accomplish this. How do you do the equivilent to an autonumber in a SQL Server table? Please let me know my project is very close to deadline Thanks in advance | |
Good Morning, I have inherited a database that I am not happy with the structure of. In the system there are components on the web application it reads as Level1, Level2, Level3. The tables are set up as Component ->Level1 Component ->Level2 Component ->Level3 The component table houses the level … | |
I have alot of tables in database in one of this contains owner_id and another one have relation many to many with that,and that table have dissent_type how i can select dissent_type where owner_id = "" | |
Hi All, I have been pulling my hair out over this one. What we are trying to do is pull sum values for the same item out of three different tables in the same DB (MSSQL '05) – Should be quite straight forward however... The result should look a bit … | |
Hi, Is there any way to do this? I tried using a 'select scope_identity()', but that returns null, apparently because my identity column is not a numeric of any sort. An answer to this would help me a lot! I would love to not have to use an integer or … | |
Hi guys, Im running on PHP 5.3, Apache/2.2.12 (Win32 and SQL server 2008 using the sqlsrv driver 2.0. I have no problems connecting to my db instance using either Windows or server authentication as i Have enabled both. I use Windows auth for the application. I have enabled remote connections. … | |
Hello Everyone, I need to upload excel sheet in to the database. Which i am doing with the query [CODE] SELECT * INTO temp FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\Dokumente und Einstellungen\l.varada\Desktop\BA-Control.xls', 'SELECT * FROM [qry_BA_Controlling (Report)$]')[/CODE] Here C:\Dokumente und Einstellungen\l.varada\Desktop\BA-Control.xls is the path from where the excel file needs to be … | |
Hi all, I am developing an application which to use different local computers. There is a computer has a mssql 2005 express and my database on it, I want to use it all local computer (5 computers), connection string like that : [CODE]"Data Source=DARKOCEAN\\SQLEXPRESS;Initial Catalog=TestDB;Integrated Security=True"[/CODE] How can I use … | |
Every time I do a google search and try to click on one of the links my browser redirect to another site. I and attach a hijackthis log. Could someone please help. Logfile of Trend Micro HijackThis v2.0.4 Scan saved at 10:00:02 PM, on 07/23/10 Platform: Windows XP SP3 (WinNT … | |
Hello So, recently I obtained a horrid assignment from lé boss, and I have yet to figure out how to do this. The idea is to select the ID(db_medlem) of all customers that have purchased for over 1000, in the year 2010. (I know its a funny syntax, but its … | |
Below are my stored procedure to change password and the VB.net code to call it. The Sored Procedure executes properly and returns correct values when executed from SQL Server directly, but it does not check its conditions and returns -1 when called from VB.net code. please help me in this … | |
Hello everybody, I am c# developer but I have c# application and want to change it with Java because sometimes I have problem. I have 7 modems and my clients send package to my application and I want to listen it with thread ans produce an answer to them. I … | |
hi, not sure if im posting in the correct section but im working on a site registration for a mate this bit has been completed, however i am wanting to extend this and display a plethora of info but i have hit a bit of a wall. iam wanting to … | |
hi, I need to update my data in two tables simultaneously,for example if i update product id in one aspx page it should be updated in my sql tables where i use product id in all my pages we can join tables to view data but how to update.. hope … | |
Question: I just recently had a cut over for a web application using a SQL DB that was previously using xp_sendmail to dispatch messages to the users. In accordance with the cut over, xp_sendmail is no longer usable in Server 2005 and should be replaced with sp_send_dbmail. Previously, the emails … | |
i ran hijack and i need to know what to do to fix the rundll error and get the internet back working here is the log : Scan saved at 5:15:23 PM, on 7/19/2010 Platform: Windows XP SP3 (WinNT 5.01.2600) MSIE: Internet Explorer v8.00 (8.00.6001.18702) Boot mode: Normal Running processes: … | |
Okay, so I've got THREE MSSQL Tables. First table is: Eponyms : ID, NAME, DESCRIPTION, CATEGORIES Second table: Categories : ID, CATEGORY Third is the intersecting table: EponymCategory : ID, EponymID<FK>, CategoryID<FK> The "Eponyms" table has the list of Eponyms, and the CATEGORIES column is inserted with data like "PSYCH … | |
Hi, I'm a recent IT graduate, I want to upgrade my skills from what I learnt at college to the SQL Server 2008 platform. I want to also get certified with Microsoft, it seems a lot of companies are asking for this now. If you have gone through the certification … | |
I am using a custom made application that is using MSDE 2000 transact SQL. Thing is that I've made a simple batch file in order to save databases automatically every day but it seems I made a mistake... I never expected the server to save in the same file if … | |
hi any body plz help me I want to create new table from an existing table with data and definition. | |
How do I retrieve data from MSSQL Server using Javascript? I am used to doing things in PHP, but I want to have an interactive form which is able to display Sales Tax after user types in his zip code. My query is similar to: "select top z.rate from zipcodes … | |
I have a bit of a unique situation. I am loading a DropDownList (asp.net) from a SQL DB. Let me explain my scenario. [Products] [DB2.dbo.Orders] -Product_ID -Order_ID -Product_Name -Order_Product_Name -Product_Price -Order_Product_Price -Order_QTY [DROP DOWN] [PRICE_LABEL]* [OrderQTY] +ADD ProdName1 ProdName2 ProdName3 [PRICE_LABEL]: *(gets pulled by Select Product_Price where Product_Name=DropDown.Selected) After I … ![]() | |
When printing or exporting a SSRS report, is it possible to hide information? I don't want a hyperlink that is used for report navigation to be visible on a PDF. I would prefer that a user doesn't have to manually toggle visibility. Thanks. | |
I'm making some sort of mistake in the following code: [CODE]use xPress_CR select * from (SELECT * FROM dbo.T_JOBS WHERE ENDDATEANDTIME = null UNION SELECT * FROM dbo.T_JOBS WHERE STATUS = 'Failed')[/CODE] Any idea what I'm doing wrong? | |
I'm attempting to write the formula for a computed column in SQL Server 2005 using SQL Server Management Studio 2008. I get the error validating formula and I'm not sure how to write the formula to work. If it were standard math the formula would be: (mmtot * 22) + … | |
Hi, i have followed a tutorial and modified it to get a image stored as a blob from MSSQL, it is working perfectly - however i utilised handlers in this tutorial. and while it is working fine - id quite like to understand what is going on! [code] <%@ WebHandler … | |
Hi all i have a problem in a task assigned to me in sql 2005 i have table contains column called ID which is an integer i would to retrieve top 10 rows order by ID in descending order and i want the result of this query to be in … | |
I have a column in my database that has a list of keywords. sometimes the keywords are a couple of words and sometimes just one. Each keyword (can be more than one word) is separated from a comma. for example - this is my column - hi, how are you, … | |
hi Im building an asp.net application which sends data to another webservice and then sends the data back. I get it to receive the data and save it into a sql database. But I cant get it to display in the gridview. I have been struggling with this for over … | |
people plix help me with ASP code for login. am using MSSQL i want users who have registered using their emailadress and passwords to be able to login. | |
Imagine functions (as in coding): there is a function call, to each function there are parameters and whereas the names and the amount of parameters is specific to a function, the value of that parameters is specific to the function call. For example: Add (Number1,Number2) ADD = function Number1 & … | |
Join a table to itself with no specfic ID I have a table of customer records which has no ID column, a customer may appear in the table more than once with various of the columns populated. I have managed to build a column INIT_SURNAME which is fully poplated but … | |
I want to fill a Table quick. I have tried something but its not working. Here is my MSSQL-Script: [code] CREATE FUNCTION [dbo].[fillTable] ( @Amount INT ) RETURNS @Integers TABLE ( [IntValue] INT ) AS BEGIN DECLARE @Counter INT SET @Counter = 0 WHILE @Counter < @Amount BEGIN INSERT INTO … | |
I have 3 tables which hold PO's which have uniquie IDs I want to get the last ID in the list then add one to it (i can add one in my code if needed). My query thus far is [CODE] SELECT TOP 1 (SELECT 0 AS [PURCHASE_ORDER_ID] UNION SELECT … | |
hi all.. i have created a cube in bids..here i am stuck in a very bad way.i have a measure called as total and a dimension called as date..what i want is a measure which will calculate the difference of the total for the years..eg..for 2007 total is 5 and … |
The End.