2,935 Topics

Member Avatar for
Member Avatar for iann

Hi Guys It may be friday, but I am having a real brain fade with this one. I have one table which contains several columns (see below) I need to match names in the tables. The first name is in column childname1 which contains the full name, the column I …

Member Avatar for urtrivedi
0
64
Member Avatar for gsc1ugs

Use this code [code] sql = "SELECT products.endDate FROM products INNER JOIN " sql = sql & " auctionevents ON products.idsupplier = auctionevents.idSupplier " sql = sql & " WHERE (products.endDate > CURRENT_TIMESTAMP) AND (auctionevents.ID = "&id&") AND (products.ListHidden <> 1)" [/code] but if the server is not run the …

0
51
Member Avatar for questionary

Hi. I have a question to advanced SQL programmers/users. I would be very grateful if you could explain me in simple words why we use multiple joins on the same table (for example multiple left outer joins) - what benefits it brings? examples would be appreciated best regards q

Member Avatar for MeSampath
0
148
Member Avatar for carobee

Hi, I have created a temporary @table and while inserting ,i am using dynamic sql.But this is not getting executed and throws an error that "EXECUTE cannot be used as a source when inserting into a table variable" i am using SQLServer2005. Dont know where i am going wrong [code] …

Member Avatar for jbisono
0
2K
Member Avatar for cVz

I get the following message when executing a stored procedure. [COLOR="Red"]The query has exceeded the maximum number of result sets that can be displayed in the results grid. Only the first 100 result sets are displayed in the grid.[/COLOR] However , i cannot change the fact that the SP uses …

0
99
Member Avatar for farhan111
0
49
Member Avatar for xirosen

Hi,,, we have a database grown too fast... from 19GB last march 09 into 52GB this Nov 09... I search through internet on what happen why do database grow fast and i find nothing,, i found out on how to "sp_spaceused" query and the result says: database_name database_size unallocated space …

Member Avatar for GrimJack
0
69
Member Avatar for TJGreene

I'm currently studying SQL and have created two tables (Orders and Inventory). I have been trying to create a trigger on the "OrderDate" column of the Orders table to update the Cur_Stock value (to subtract the Quantity ordered from the Cur_Stock) on the Inventory table whenever a new Order is …

Member Avatar for TJGreene
0
728
Member Avatar for Likethatjazz

Hi all, i use mssql 2005 I have a doubt, how to create a schedule for a query to run every day,the result should be saved every time the query runs, into a new file For the moment I use SQL Server Agent to do this daily, with a jobtask …

0
52
Member Avatar for xirosen

Hi,, i am a newbie in SQL server.. we have a database in our office.. I notice that since 2004 - 2008 our database growth was about 19GB, but since jan. 2009 to present our database grows from 19GB to 52GB... is there's something wrong happening in our database's configuration? …

Member Avatar for xirosen
0
128
Member Avatar for vuyiswamb

Good Day All i have the Following that table [CODE] ID | ACTV |VENU |STUD | TRIES ===================================== 1 1 4 162 0 2 4 5 104 0 3 8 5 138 0 4 15 2 68 0 5 15 4 291 0 6 21 4 171 0 7 22 …

Member Avatar for urtrivedi
0
177
Member Avatar for tactfulsaint

hello everyone, i need a code snipet that can help me retrieve username and password and to authenticate the password in the database..

Member Avatar for truth4life
0
170
Member Avatar for asmikwen

Hi, I am trying to transfer some data from a Mysql database onto a Microsoft SQL database. I would need your help on how to operate this migration as I am new to MSSQL. I have been looking on Google but there are not a lot of pages on that. …

Member Avatar for bgkalbente
0
281
Member Avatar for londonstan

If i have some xml in the form [code=xml]<root> <a>hello</a> <b> <bi>hiya</bi> <bii>hey</bii> </b> <c/> <d>hello again</d> </root>[/code] how can I a) count the nodes? i.e. a, b, bi, bii, c, d so 6 b) count the nodes that are non empty a, bi, bii, d so 4 ? i …

0
48
Member Avatar for _taz_

I have a query that works, I wanted to add another sum from another table, but when I do, the all the SUM values are wrong this works [CODE]SELECT Clients.ClientID, Clients.WholeName, SUM(CASE WHEN Payments.Creditorid = 0 THEN Payments.Amount ELSE 0.00 END) AS 'Admin Fees', SUM(CASE WHEN (Payments.Creditorid = 3) THEN …

Member Avatar for _taz_
0
171
Member Avatar for shibbard

Hi all, I have a single table with both parent and child nodes, and each has an order number in it. I am trying to write a single query to output them in order, its for a navigation list with categories and sub-categories. I could manage it in code rather …

Member Avatar for shibbard
0
117
Member Avatar for kegathor

Hi, I have an insert statement that i need to refine...basically I need to trim the first couple of letters of whats trapped inthe field. so e.g. Z:\aaa\1.jpg needs to become aaa\1.jpg Im tried this but its not working [CODE]sImagelink = mid(request.form("Imagelink"),4,len(request.form("Imagelink")))[/CODE] any ideas?

Member Avatar for kegathor
0
118
Member Avatar for Tank50

Hi I need a help in SQL,There is table called sales.Its contains the day,sales quantity.If I write sql like below [CODE]select day,Sales_quantity from Sales.[/CODE] Then result should be Day SalesQuantity Monday 20 Monday 302 Monday 50 Tuseday 30 etc.. The problem is I want to get result like below Day …

Member Avatar for huangzhi
0
120
Member Avatar for webwiredit

Hi all... So, I am needing to sum all billable hours within a table... the problem is that it is returning rouded decimals instead... like .5 always comes back as 1 ... Here is my procedure: [CODE] Public Shared Function GetBillableTimeForTicket(ByVal SupportTicketID As Integer) As Decimal Dim conn As New …

Member Avatar for webwiredit
0
252
Member Avatar for Geekitygeek

Hi, this is giving me a major headache and my boss wants the project wrapped up asap : / I have two views pulling data from several tables. The end result is this: CustomerTotals CustomerID numeric(18,0), ProductID numeric(18,0), Delivered numeric(5,0), Ordered numeric(5,0) SupplierTotals SupplierID numeric(18,0), ProductID numeric(18,0), Delivered numeric(5,0), Ordered …

Member Avatar for Geekitygeek
0
129
Member Avatar for Rebel1

Hi, I am doing a project where i am creating a website with a SQL server 2005 DB in the backend. I am doing it using visual studio.net and coding in C#, ASP.NET & CSS. As a person registers on the website, the info goes to the DB but i …

Member Avatar for MeSampath
0
85
Member Avatar for vuyiswamb

Good Day all i have the Following Query [CODE] DECLARE @CurrentTime DATETIME SET @CurrentTime = CURRENT_TIMESTAMP select tr.Descr [Room], tb.Purpose [Purpose], tb.Description [Description], convert(varchar,datepart(hour,tb.starttime))+':'+convert(varchar,datepart(minute,tb.starttime)) [Start Time], convert(varchar,datepart(hour,tb.endtime))+':'+convert(varchar,datepart(minute,tb.endtime)) [End Time], tu.name [Requested by] from tbl_booking tb inner join tbl_resource tr on tb.resources = tr.id inner join tbl_user tu on tu.id = …

Member Avatar for vuyiswamb
0
86
Member Avatar for wchitamb

I am trying to write a bulk import routine so that i will be able to import text files or csv files to SQL i have tried this and it's giving me the following error message. P: is the drive where the file is in currently. [CODE] USE [XYZABQ] GO …

Member Avatar for MeSampath
0
123
Member Avatar for mattlightbourn

Dear all, I’m stuck on a problem which I’m hoping someone might be able to help with in an SQL script. I have a table with RAW Timesheet data which includes entries for Absences. When someone enters a timesheet on a particular date for a two week holiday, if I …

Member Avatar for mattlightbourn
0
157
Member Avatar for NextCom

I have multiple external databases that i want to connect to, from a stored procedure. What server the database is located on is dynamic (a record in a table). All of the external databases are LinkedServers, but also here i need to be able to define what server dynamicly. It …

Member Avatar for NextCom
0
85
Member Avatar for vuyiswamb

Good Day All am restoring a Database Programatically in Sql. Now if the backup is located in the remote machine i use a Share [QUOTE]\\Vuyiswa\MyShare\[/QUOTE] but i will get the Following Error [QUOTE] Exception caught in: ExecuteStoredProc: The file "\\Vuyiswa\Databases\\REmoteTest33.mdf" is on a network path that is not supported for …

Member Avatar for Ramesh S
0
196
Member Avatar for csihosting

I have a SSIS import file that imports a flat file that is in cvs format. I've been running into a problem where the input file that is retrieved from a third party has bad rows in it. These rows cause the import process to fail and it doesn't fully …

0
64
Member Avatar for elauri

I have following tables table1 nr_key1 nr_dad1 table2 nr_key2 value (repeated ~n times with same nr_key2 and different value) in table2 nr_key1 = nr_key2 After I have iterated through nr_key1 I want to use recursion to select nr_key1 = nr_dad1 and iterate again table2 with the new nr_key1. This should …

Member Avatar for huangzhi
0
121
Member Avatar for sk.faheemuddin

Hi All, Can anybody give me a solution how to solve or write a query for this scenario? there is table called ITT1 with the columns FATHER, CHILD_NUM, CODE, CODE_QTY a 1 b 1 b 1 c 1.5 c 1 d 2 d 1 e 1 There are 3 columns …

Member Avatar for network18
0
124
Member Avatar for wchitamb

I have some tables that i have created in SQL Server and i want to write a stored Procedure that will insert data on to one of my tables AND also be able to update say if i select record [CODE] CREATE PROCEDURE Sp_cust_SaveCustomer --ALTER PROCEDURE cust_SaveCustomer (@id int, @ …

Member Avatar for sknake
0
216

The End.