Is there any way to select items from a table and have<br>them displayed in a list format - comma delimited.<br>In SYBASE I saw the function LIST() but MS SQL Server<br>does not mention the function.<br><br>Any ideas?<br><br>Example below - does not work as the inbedded select<br>returns more...
I have query, grouping data by hour using<br>Group by DatePart(hour, TheDateField)<br><br>I need to group records by the half hour - <br>I cant use: Group by DatePart(minute,The DateField)<br><br>Has anyone got a suggestion.<br><br>regards
I need to pass the @TheVar variable to the <br>IN statement but this keep on giving me 0 records -<br>if I type the statement into the SQL <br>"WHERE Name IN ('John', 'Frank', 'Tom')<br>the statement works fine, 20 records returned.<br><br>DECLARE @TheVar nvarchar(40)<br>SET @TheVar =...
Our company processes numerous(100,000) records every<br>15 minututes (bcp), stored procedures are used to <br>disperse the data -we have staff and clients accing<br>the same database - during the insert and stored <br>procedure processing we are experiencing major<br>performance issues on...
Our companies needs to process statistical<br>calculations on data with MS SQLServer 7.<br><br>Does anyone have advise on this matter - is there<br>a plugin or add on for SQLServer which would provide<br>extra functionality?<br><br>
I would like to know how to calculate the median of<br>multiple fields in my table. The result would be<br>Field 1 Median = X, Field 2 Median = Y<br><br>This is my SQL Median Statement for a single field<br>--------------------------------------------------<br>DECLARE @A_Median <br>SELECT...
We have a large database with stored procedures which run<br>on data insert - these procedures disperse the data and<br>calculate averages. The sp are quite lengthly - is it better<br>to split these sp's into small parts?
I am using the following statement to output a file:<br><br>declare @str varchar(255)<br>select @str = 'isql -Q "select * from <tablename>" -E > c:\file.txt'<br>exec master..xp_cmdshell @str<br><br>Does anyone know how to set the delimeter for this file,<br>at the moment I am...
I have had a few responses to my question. Most people suggest: Charindex (to detect position of separator) and substring (to take out needed subfield) functions in cycle.<br><br>I am using MS SQLServer - sample code would be great!
I have a table with a char field - the values are for this field for each record consist of a list string. E.g."data 1;data 2;data 3; data 4".<br><br>I want to select the field and insert each list value into a new table. Can SQL perform this function.<br>Thanks
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.