Listing Titles Starting With Numbers Category?
May 13, 2014
I'm having problems with my website. I wish to make a section that has names starting with numbers only. For example, with every name beginning with "A", I have this code:
select * from names where name like "a%" order by name
and this works fine, but I want it so it will only list titles starting with 0-9..
View 10 Replies
ADVERTISEMENT
Mar 27, 2007
Hi,
I have a report which lists out the employees' details. I need A-Z links above the report, On clicking on an alphabet, say "C", should display all the employee details whose name starts with the selected alphabet. In the stored procedure we can accept the character and return back those results. But it is not a drill report and we need the result in the same report. Is there any way so that on clicking each link, the output will be shown in the same report. Any help is appreciated.
Thanks in advance,
Sonu
View 4 Replies
View Related
Feb 1, 2008
Hi
I have a table with one column
Shop Name
---------------
123 Shop
#56 Shop
@Shop
Astar Shop
Best Shop
I want to write a sql select statement and produces the following result
Shop Name
---------------
123 Shop
#56 Shop
@Shop
Please help me on this
Cheers
-Jag
View 3 Replies
View Related
Oct 7, 2015
If Exists ( Select c.name from sys.columns c where object_id = object_id('HH835HP') and C.name = 'ID_1' )
Begin
UPDATE HH835HP
SET ID_1 =
( select ROW_NUMBER() OVER(ORDER BY CHKDTS ASC) AS ID_1 FROM HH835HP ) ;
End;
Obviously... The stuff inside the IF is wrong syntax...I mean
UPDATE HH835HP
SET ID_1 =
( select ROW_NUMBER() OVER(ORDER BY CHKDTS ASC) AS ID_1 FROM HH835HP ) ;
View 4 Replies
View Related
Jun 29, 2005
Hi,
I have a simple table:
Categories
----------
CategoryID
ParentID
Name
I want to associate my Products to a category so that I can search by category....ok. If I just have a simlpe table:
CategoryProducts
-------------------
CategoryId
ProductId
I can link a product to a category. Now, if I just link a product to a single category, such as the bottom leaf category:
Self Help / Personal Development / Spiritual / Meditation
I would link a product to the Meditation category. However if I
click on Self Help while browsing, I want to see all items underneath
Personal Development, Spiritual and Meditiation. So my question
is is this a good way to store the product-category relationships, or
should I put many entries into CategoryProducts to keep the queries
simlpe and faster? Are they faster doing it this way? In this way there
would be 4 entries for a product in meditation. My personal idea
is that adding all entries up a tree arm of a category path will be
cumbersome to manage, but it does solve the problem of clicking on Self
Help and seeing all products that exist within sub-categories. I
am sure an SQL query would be able to work this out, but I dont know if
performance would be something to consider on an ecommerce site? Are
there any patterns fo rthis stuff - seems a reasonably repeatable
pattern for business sites?
Thanks,
jr.
View 5 Replies
View Related
Oct 15, 2007
How to add titles for column & row in Matrix?
View 3 Replies
View Related
Jul 11, 2006
I have a matrix report and it doesn't add titles to the different groupings. And when you try and add a text box it spans across all grouping columns. How do you add titles to these columns?
Cheers
Damien
View 3 Replies
View Related
May 15, 2008
Is there a way to dynamically feed the Text of the Column titles into a report at run-time in Reporting Services?
In Access I could use DLookup to pull YTD Dates (e.g. "05/2008") from another view that kept track of the settings for the year being processed (Curr Year, Prior Year, Prior Year II, YTD I, YTD II, and etc. for each Year's data. YTD I and YTD II would read like '07/2008' and '09/2008'. The YTD II value could change as the next month's data became available ('10/2008'). As we switched from year to year (2007, 2008, etc.) all I had to do was update the [tbl Status Flags] table for the next year and all my many reports would reflect the correct headers for the periods in the data. The period could be switched back to prior years at any time by the user in order to view past data. When the year was changed the report headers would have to reflect that. The status flags table would give the setting for each year. Using hard coded titles was too confusing for the user and changing the titles manually was not feasible.
We have moved to SQL Server 2005 and Reporting Services 2005. Besides losing the ability to Change the Data at the top of every page as the Dept, VP Name, Director and etc. changed I also seem to have lost this dynamic column headers ability. I have found a cumbersome workaround for the data at the top of the page, but the only thing I have come up for the columns is to try to create queried parameters to feed those titles (they will be the same throught the report) and to fill those parameters with the queried defaults. I haven't tried it successfully yet, but so far it's looking like that is not how the defaults work.
Hopefully someone out there has a solution. I'd appreciate any help I can get.
View 2 Replies
View Related
Jan 11, 2006
Hi,
I use RS2000 SP2.
I would like to set table header to Print titles option when export a report to excel.
I try to create text boxes in stead of table on Page header area. This way seems good, however, this way is difficult for preventing merged cell problem.
Does anyone know good solution?
Does it solve at RS2005?
View 1 Replies
View Related
Feb 1, 2007
I have a report with a column which contains either a string such as "N/A" or a number such as 12. A user exports the report to Excel. In Excel the numbers are formatted as text.
I already tried to set the value as CDbl which returns error for the cells containing a string.
The requirement is to export the column to Excel with the numbers formatted as numbers and the strings such as "N/A' in the same column as string.
Any suggestions?
View 1 Replies
View Related
May 18, 2007
Hello,
I had created a windows service using C#. I set its Startup Type as Automatic but it is not getting started automatically when my System Starts.
View 3 Replies
View Related
Feb 1, 2007
When our rep distribution services time-out (several times a day) some dba's just restart the service while others restart the rep job which starts the service. Are there any differences between these two methods? Does restarting the service inherit any changes made to the job's attributes?
Thanks!
View 1 Replies
View Related
Sep 21, 2006
I used to do this with classic asp but I'm not sure how to do it with .net.Basically I would take a table of Categories, Then I would loop through those. Within each loop I would call another stored procedure to get each item in that Category. I'll try to explain, Lets say category 2 has a player Reggie Bush and a player Drew Brees, and category 5 has Michael Vick, but the other categories have no items.Just for an example.. Category Table: ID Category1 Saints2 Falcons3 Bucaneers4 Chargers5 FalconsPlayer Table:ID CategoryID Player News Player Last Updated1 1 Reggie Bush Poetry in motion 9/21/20062 1 Drew Brees What shoulder injury? 9/18/20063 5 Michael Vick Break a leg, seriously. 9/20/2006 Basically I would need to display on a page:SaintsReggie BushPoetry in MotionFalconsMichael VickBreak a leg, seriously.So that the Drew Brees update doesnt display, only the Reggie Bush one, which is the latest.I have my stored procedures put together to do this. I just don't know how to loop through and display it on a page. Right now I have two datareaders in the code behind but ideally something like this, I would think the code would go on the page itself, around the html.
View 1 Replies
View Related
Mar 6, 2002
We have SQL 2000 (SP2) , Our SQL server agent showing green light as started from EM , It is succussfully restarting from NT Services too . But When I open the properties of the jobs from EM its gives error message SQL DMO error " SQl Agent is starting , try later " . And in EM Next run Date & Time not available .
MDDB database is accessable & in Log file its recovered fully
Thankx in Advance
Sha
View 1 Replies
View Related
Jul 20, 2005
Why does M$ Query Analyzer display all numbers as positive, no matterwhether they are truly positive or negative ?I am having to cast each column to varchar to find out if there areany negative numbers being hidden from me :(I tried checking Tools/Options/Connections/Use Regional Settings bothon and off, stopping and restarting M$ Query Analyer in betwixt, butno improvement.Am I missing some other option somewhere ?
View 7 Replies
View Related
Mar 11, 2008
I have a table with a column ID of ContentID. The ID in that column is all NULLs. I need a way to change those nulls to a number. It does not matter what type of number it is as long as they are different. Can someone point me somewhere with a piece of T-SQL that I could use to do that. There are over 24000 rows so cursor change will not be very efficient.
Thanks for any help
View 6 Replies
View Related
Feb 21, 2007
I have an 'ID' column. I'm up to about ID number 40000, but not all are in use, so ID 4354 might not be in any row. I want a list of all numbers which aren't in use. I want to write something like this:
select [numbers from 0 to 40000] where <number> not in (select distinct id from mytable)
but don't know how. Any clues?
View 1 Replies
View Related
Mar 27, 2007
I'm trying to write data to excel from an ssis component to a excel destination.
Even thought I'm writing numerics, every cell gets this error with a green tag:
Convert numbers stored as text to numbers
Excel Cells were all pre-formated to accounting 2 decimal, and if i manually type the exact data Im sending it formats just fine.
I'm hearing this a common problem -
On another project I was able to find a workaround for the web based version of excel, by writing this to the top of the file:
<style>.text { mso-number-format:@; } </style>
is there anything I can pre-set in excel (cells are already formated) or write to my file so that numerics are seen as numerics and not text.
Maybe some setting in my write drivers - using sql servers excel destination.
So close.. Thanks for any help or information.
View 1 Replies
View Related
Oct 26, 2006
HelloI am using sql server 2005.I have two tables as described below.Table1UserID UserSales---------------------1 102 133 174 195 216 107 128 119 3110 2311 2412 1013 16Table2UserID Country----------------------1 Canada2 Canada3 Canada4 Canada5 Canada6 USA7 USA8 USA9 USA10 USA11 UK12 UK13 UKI want to get top 2 UserSales for each country and remaining should bedisplayed as Total as Others for that country.Can someone please help me with this query?RegardsAmit
View 1 Replies
View Related
Mar 9, 2006
Hi fellas.
I need you to answer a question:
What should I do and which SQL Server tool do I have to use in order to find a job listing on the database ?
Thanks in advance,
Abrahão.
View 2 Replies
View Related
Dec 22, 2005
Let's say you a 1000 records in the Employees table, who are spread over 40 different cities.
How would you get a breakdown of how many employees in each city ?
Do I have to loop with a Count(*) for each CityID, or something ?
There must be a more straightforward method.
View 1 Replies
View Related
Mar 6, 2006
hi.
I have a table to store salesman's performance..
as you can see at structure.jpg, Tom sold total 18 Processors (5 different modals) and sold 11 mainboards (4 different modals)
I want to report that
what are the TOP 3 Processor and Mainboard modals that Tom sold with the same query
I tried different group by methods. also subqueries.
I could't do
you see the results I need at result.jpg
View 1 Replies
View Related
Sep 25, 2006
i am using this code :
SELECT MAX(user) AS lastuser, category
FROM journal
GROUP BY category
HAVING (COUNT(category) > 1)
it works but returns 1 line by category >1
i need all the user (all the rows) HAVING (COUNT(category) > 1) , not only 1
if 1 category has only 1 user i must not keep it
i am not shure to be clear :-)
thank you for helping
View 8 Replies
View Related
Feb 25, 2004
What are the thoughts on using a categoy table? What I mean by this is to have a table used to hold simply a category identifier for other table(s).
Eg:
Hardware Table
Hadware (PK) | Category (FK) | Description | Finish | etc....
------------------------------------------------------------------------------
P1 | Plate | 4"x4"x1/4 plate | Painted |
HardwareCategories
Category (PK)
-----------------
Plate
Channel
Angle
Should this be done or simply provide a category field in the hardware table? I like the extra table because it kind of ensures that a user doens't add a plate with a category value "Plate", another user adds "plate", and another user adds "Plates", etc....
What are your thoughts if any?
Mike B
View 1 Replies
View Related
Jan 27, 2008
I'm trying to remove a read only/stand by database that I believe was a messed-up attempt at log shipping. When I go through the interface it says 'cannot remove database because it is set up for replication'. If I try and 'directly update' the sys tables (yea I know you can't do that anymore) I get the error:
Msg 259, Level 16, State 1, Line 1
Ad hoc updates to system catalogs are not allowed.
So my dilema is I just want to delete a database that was attempting to do log shippinig and is now stuck in read only/standby. How can this be done in SQL 2005?
Thanks,
Phil
View 18 Replies
View Related
Dec 2, 2004
I am trying to get the following code to work but I keep getting an error.
DELETE statement conflicted with COLUMN REFERENCE constraint 'FK__titleauth__title__060DEAE8'. The conflict occurred in database 'pubs', table 'titleauthor', column 'title_id'.
Has anyone else experienced a problem with this example? Let me know what is wrong
with it.
Thanks,
Ralph
<%@ Page Language="VB" Debug="true" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.SqlClient" %>
<script runat="server">
Sub Page_Load
Dim dstPubs As DataSet
Dim conPubs As SqlConnection
Dim dadTitles As SqlDataAdapter
Dim dtblTitles As DataTable
Dim drowTitle As DataRow
Dim objCommandBuilder As New SqlCommandBuilder
' Grab Titles Table
dstPubs = New DataSet()
conPubs = New SqlConnection( "Server='(local)';Database=Pubs;trusted_connection=true" )
dadTitles = New SqlDataAdapter( "Select * from Titles", conPubs )
dadTitles.Fill( dstPubs, "Titles" )
dtblTitles = dstPubs.Tables( "Titles" )
' Display Original Titles Table
dgrdOriginalTitles.DataSource = dstPubs
dgrdOriginalTitles.DataBind()
' Add a Row
drowTitle = dtblTitles.NewRow()
drowTitle( "Title_id" ) = "xxxx"
drowTitle( "Title" ) = "ASP.NET Unleashed"
drowTitle( "Price" ) = 1200.00
drowTitle( "Type" ) = "Mystery"
drowTitle( "PubDate" ) = #12/25/1966#
dtblTitles.Rows.Add( drowTitle )
' Delete the First Row
dtblTitles.Rows( 0 ).Delete()
' Double the price of the Second Row
drowTitle = dtblTitles.Rows( 2 )
drowTitle( "Price" ) *= 2
' Generate the SQL Commands
objCommandBuilder = New SqlCommandBuilder( dadTitles )
' Update Titles Table
dadTitles.Update( dstPubs, "Titles" )
' Display New Titles Table
dgrdNewTitles.DataSource = dstPubs
dgrdNewTitles.DataBind()
End Sub
</script>
<html>
<head>
<title>UpdateDataSet</title>
</head>
<body>
<h2>Original Titles Table
</h2>
<asp:DataGrid id="dgrdOriginalTitles" Runat="Server"></asp:DataGrid>
<h2>New Titles Table
</h2>
<asp:DataGrid id="dgrdNewTitles" Runat="Server"></asp:DataGrid>
</body>
</html>
View 2 Replies
View Related
May 31, 2001
Is there a way to list all table index in a user database? Not the system index.
View 2 Replies
View Related
Aug 28, 2003
I want something like:
select TableName, IndexName
from SomeSystemTables
where TableName like 'Src%'
and IndexName not like '_WA%'
I plan on using this in a cursor in order to delete all indexes. Then I rebuild all tables from an old VMS.Ingres database and create new indexes.
I've looked over previous posts on listing indexes, but don't get the method for identifying both the tablename and the indexname in the same query. DB is SQL2000.
Thanks,
Al
View 2 Replies
View Related
Mar 21, 2001
Does anyone know of a system stored procedure that I can run to print a list of indexes for a specific datbase. I know I can do it for a specified table, but I would like it for all tables. Thanks!
View 4 Replies
View Related
Mar 12, 2004
Hi, I want to make a logfile where i store all tables, collnames and values of a specified database. Which statement can I use in SQLserver or Oracle? I already found the following statements:
Oracle:
select * from all_tables
select * from user_tables
SQLserver:
select * from sysobjects where type'='U'
So getting the tablenames isn't the problem. The question is how the get the matching columns with their type and value.
Tnx.
View 2 Replies
View Related
Jan 22, 2007
I have a query that lists the names of all employees and the number of training modules they have sat. The query is below:
SELECT distinct pps_principals.name AS principals_name,
COUNT(*) AS coursecount
FROM (PPS_SCOS JOIN PPS_TRANSCRIPTS ON PPS_SCOS.SCO_ID = PPS_TRANSCRIPTS.SCO_ID)
JOIN PPS_PRINCIPALS ON PPS_TRANSCRIPTS.PRINCIPAL_ID = PPS_PRINCIPALS.PRINCIPAL_ID AND PPS_TRANSCRIPTS.STATUS like '[PCF]'
AND PPS_TRANSCRIPTS.TICKET not like 'l-%'
and pps_scos.name like 'MT%'
and pps_principals.login like '%testlogin%'
and pps_transcripts.date_created between '2006-10-01' and '2007-09-30'
GROUP BY pps_principals.name
ORDER BY coursecount desc
The cont goes all the way down to those who have sat 1 module.
I now however need to be able to report all those names of individuals who have sat 0 courses.
Any help appreciated.
View 4 Replies
View Related
Mar 30, 2008
sample Table and records.
id uname punchdate punchtime
1 Â A Â Â Â Â 1/1/2007Â Â 7:00am
1 Â A Â Â Â Â 1/2/2007Â Â 8:00am
1 Â A Â Â Â Â 1/4/2007Â Â 7:30am
1 Â A Â Â Â Â 1/6/2007Â Â 7:40am
let say i want to get a result which punchdate is from 1/1/2007 to 1/8/2007, how can i get a result like this one.?
1 Â Â AÂ Â 1/1/2007 Â Â 7:00am
1 Â Â AÂ Â 1/2/2007 Â Â 8:00am
1 Â Â AÂ Â 1/3/2007 Â Â <null>
1 Â Â AÂ Â 1/4/2007 Â Â 7:30am
1 Â Â A Â Â 1/5/2007 Â Â <null>
1 Â Â A Â Â 1/6/2007 Â Â 7:40am
1 Â Â A Â Â 1/7/2007Â Â <null>
1 Â Â A Â Â 1/8/2007 Â Â <null>
listing all data even if theres no punchdate and time in the table.
View 2 Replies
View Related
Jul 20, 2005
Still using SQL7.I am wondering how come there is not an Information_Schema view thatlists indexes? Information_Schema is supposed to be the safest way toobtain information on metadata, but it appears that the only way toget a list of indexes is with a system stored proc.
View 1 Replies
View Related