.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

can i use nvarchar(300) for a column having records as website links?

Posted By:      Posted Date: August 30, 2010    Points: 0   Category :Sql Server
 
Hi guys, small question. is it good to use nvarchar(300) for a column having records as website links. i was told the size may exceed 255 characters. so just thinking is it possible?


View Complete Post


More Related Resource Links

Bug: Does not change column type from nvarchar to ntext

  

Scenario: If you create a table with a column of type nvarchar, populate it with some content and try to modify it using the WebMatrix editor, from nvarchar to ntext, it does not display any error message or warning that this is not possible. It silently saves and reverts the change, back to nvarchar. Wasted some hours on this issue as I thought my column was ntext, but in fact was still nvarchar.

Expected behavior: It should change to ntext, or if SQL CE doesn't support that, it should notify the user that no change was applied.


How to save records with autogenerated html links in Sql database?

  

Hi I would like to create a database where users can search for multiple fields. For example: if the record is personal details info like name, address, phone number and email id i would like to generate link for this automatically with the fields using stored procedure.. Is that possible.? If so can anybody provide me with the line of code or guideline on how to do that?

Any help much appreciated. Thanks


How to save records with autogenerated html links in Sql database?

  
Hi I would like to create a database where users can search for multiple fields. For example: if the record is personal details info like name, address, phone number and email id i would like to generate link for this automatically with the fields using stored procedure.. Is that possible.? If so can anybody provide me with the line of code or guideline on how to do that? Any help much appreciated. Thanks

What can be the datatype for a column having records as weblinks?

  
Hi, i am trying to insert records in a column having records as weblinks but it gives me following error. --------------------- Msg 128, Level 15, State 1, Line 2 The name "www.yahoo.com" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted. -------------------------------- NOTE : i have tried nvarchar(2083) but still giving me the same error. but if i try insert something like http://yahoo.com i get ERROR : incorrect syntax near 'http:'-   

MULTIPLE RECORDS SINGLE COLUMN SQL SERVER 2000

  
Hi Friends, I am creating an application for a jewellery shop (MINOR PROJECT) in VB.Net but my problem is that I dont know how to insert multiple records for same bill number. consider the following condition Bill Number Customer Name   ............................................... Customer Address ................................................ S.No                 Item name                Rate    Qty                            Total 1                      abc                            5        5                                 25 2                 &nb

Searching a NVarChar Column with multiple wildcards returns all rows

  
I'm building a stored procedure to return a set of records, yes nothing big. The column is an NVarchar column and I'm using a select statement of Select * from Table1 where Column1 Like @Column1 Table is currently one record containing the words:  ***Some Test Word***  Is my test word I've set the value of @Column1 to: Some - no records returned Some% - no records returned %Some% - 1 record returned  % - 1 record returned *% - no records returned %*% - 1 record returned %Not Here% - 1 record returned   Can someone tell me why if I have a leading and trailing wildcard I will get all records returned?  Does it have something to do with the '*' characters in the field because some of my users are using these characters. I've also tried changing the select to: where RTRIM(Column1) Like @Column1 with the same result and where RTRIM(Column1) Like N'%' + @Column1 with the same result   What way should I give a user the way to search for a substring inside of an NVarchar field? Oh, I tried using the Substring function and got the same result. Thanks Mike    

Routing of Records to a particular folder (in a hiearchy) based on contents of a metadata column

  

Hi, i'm looking for ideas to solve a problem that is roadblocking our sharepoint 2010 records management implementation.  We have set up our sharepoint 2010 records center to mimic our existing folder based records management system.  We would like to stamp each of our documents with a piece of meta data (called classification) which contains the path to the records center folder in which this document should reside.  Our users are familiar with this structure and we can setup defaults for a lot of documents so getting the value in the meta data is not a big issue.

The issue is that we would like to create a content organizer rule that would forward a document to a path defined in a meta data column to the matching column in the records center.  I don't beleive this is possible OOTB but i would love to be proven wrong.  I don't want to manually have to create a rule for every folder / meta data value combination because there are thousdand of folders in the existing records center folder.

I'm open to developing a custom solution to this problem (or hiring someone to doe this), however not sure where to start... use the content oganizer object or a sharepoint timer job?  Don't want to have to reinvent the wheel...

here is and example of what i mean by the metadata / folder pair

metadata:

"

How to add a row number column base on duplicated records that currently been ordered.

  

Hi,

I want to insert a page_number in a record that continuously count base on duplicate in a column. example output:

ID PAGE_ORDER PAGE_NUMBER 
1     7    1 
2     7    1 
3     7    1 
4     7    1 
5  7    1 
6  10    2 
7  10    2 
8  10    2 
9  10    2 
10  10    2 
11  13    3 
12  13    3 
13  13    3 
14  13    3 
15  13    3 
16  9    4 
17  9    4 
18  9    4 
19  9    4 
20  9    4 
21  16    5 
22  16    5 
23  16    5 
24  16    5 
25  16    5 
26  11    6 
27  11    6 
28  11    6 
29  11    6 
30  11    6 
31  12    7 
32  12    7 
33  12    7 
34  12    7 
35  12    7 
36  4    8 
37  4    8 
38  4    8 
39  4    8 
40  4    8 
41  5    9 
42  5    9 
43  5    9 
44  5    9 
45  5    9 
46  14    10 
47  14    10 
48  14    10
49  14    10
50  14    10
51  15    11 
52  15    11 
53  15    11 
54  15    11 
55  15    11 
56  6    12 
57  6    12 
58  6    12 
59  6    12 
60  6    12 
61  1    13 
62  1    13 
63  1    13 
64  1    13 
65  1    13 
66  2    14 
67  2    14 
68  2    14 
69  2    14 
70  2    14 
71  8    15 
72  8    15 
73  8    15 
74  8    15 
75  8    15 
76  3    16 
77  3    16 
78  3    16 
79  3    16 
80  3    16

How can I add the page_number column just like

Convert NVARCHAR column to DateTime - SQL Server

  

Hi there,

Have spent few hours to get this working. I like to get help now. Please note MONTH AND DATES stored in single or double digits as they occur.

Unfortunately DATE TIME is stored in NVARCHAR Data type column as 2/9/2010,  22/10/2010 etc. Following UK Date here.

It is required to pull the data to COUNT No. of Expired. Obviously below one fails.

--AS Date AND Month stored in Single digits AND double digits , below statement 
--thorws Arthmetic overflow exception
SUM(CASE WHEN CONVERT(DATETIME,ExpiryDate,103) >= (CONVERT(datetime,'2010-01-07',103)) AND    
 CONVERT(DATETIME,ExpiryDate,103) < dateadd(month,1,(convert(datetime,'2010-01-09', 103))) THEN 1 ELSE 0 END) AS Expired  


 


Convert NVARCHAR column data into DATETIME - SQL Server 2000

  

ExpiryDate column in Table Data Type is NVARCHAR , storing Dates ONLY without time as 2/10/2010 , 12/10/2010 IN DD/MM/YYYY FORMAT.

NOW IT IS REQUIERD TO RETRIEVE ALL RECORDS WHERE EXPIRYDATE BETWEEN USER PASSED START MONTH,START YEAR AND END MONTH, END YEAR.

USING SQL SERVER 2000

SUM(CASE WHEN CONVERT(datetime,a.expirydate,103) >= (CONVERT(datetime,'2010-01-07',103)) AND 
		CONVERT(DATETIME,a.ExpiryDate,103) < dateadd(month,1,(convert(datetime,'2010-01-09', 103))) THEN 1 ELSE 0 END) AS Expired

 

Your help is greatly appreciated. Spent hours to get this resolved.


A

Search for Clustered Index in database on varchar, nvarchar column

  

Hi,

I have very big database, i am running a Re-index job and it's keep failing throwing everyday error stating "Online index operation cannot be performed on clustered index as index contains column of data type text, nvarchar.

is there any way i can search and change all such datatype of culstered into non-clustered indexes or any better solution i have.


Write column data from another website

  

I want to write data to file txt, It's ok !

But I only want to write data in red frame as picture.

Maybe is It not tag html ?  Because file text get all tag HTML, But I want to get Numbers for mobile phone.

Help me ! My code here : http://www.4shared.com/file/sAoasNMU/wrcode.html


How to convert a column of "Apr 14 2004 12:00AM" nvarchar format to "14-Apr-2004" nvarchar format in

  

I have couple columns with "Apr 14 2004 12:00AM" nvarchar format in a table. I need to convert to "14-Apr-2004" nvarchar format. How can I do that? These are not in datetime format, and I have to get the 12:00am timing out of the column. There are many columns with many rows of data. Hope someone give me some idea, thanks!


Prevent UnUsed space of nvarchar column

  

Hi

Suppose i have table like this:

declare
 myTable table
(
id int not null,
myCol varchar(100) not null
)

myTable may have over 1,000,000 recordes. but in most of them length of myCol is lower than 20 char. So most of myCol remain unused. How can i prevent this garbage?

Best. Morteza


application that will crawl a website and note links

  

Does anyone know of an application either web online, or desktop that will crawl a website and take note of all of the links that the site has? Ideally I would like to get all of the links and store them in an XML or text file.

I have seen some sites that do a basic site map online, but they do not crawl into the child links on a page.

Ralph 


caml query - group by column and get count of records

  

Hi,

I want to group by on column name and get the count of records returned.

 

 


Tooltip for GridView Column Headers (ASP.Net)

  
I just wanted to add auto tooltips for my GridView headers. There are couple of ways but I don't want to use javascript and wanted to use simple 'title' attribute. It took couple of hours to get the working code supporting sortable columns. I thought it will be very useful for others. Here's the code and logic behind it.
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend