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


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

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

Posted By:      Posted Date: September 01, 2010    Points: 0   Category :Sql Server
 
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:'-   


View Complete Post


More Related Resource Links

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

  
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?

Using equal operator in transact-SQL for ntext datatype column

  
Hi, I've a problem with using equal operator in transact-SQL for ntext datatype column. (SQL Server 2000) I'm using the following SQL command text. use NorthwindSelect * from Categorieswhere Description ='Seaweed and fish' If I use 'like' operator intead of '=' then the qurey retuns correct value. Any idea about this? Any help is appreciated. Regards, Julia

send records as weblinks through send mail task in SSIS?

  
Hi All, i have a table with two columns and two records as follows. TypeOfReport                       Links InvalidRecords                http://ReportInvalid MissingRecords               http://ReportMissing --------------------- I have a package with execute sql task selecting * from the table above, full result set selected and an object variable created, it works good. but now when i connect it with send mail task, i wanna send email like Subject : Reports On InvalidRecords and MissingRecords MessageText : Links for the Reports : http://ReportInvalid                                                     : http://ReportMissing Can somebone help me with it. NOTE : i tried creating user and object variable but its good if i have only one record in table. i tried creating 2 user and 2 object variables as well but didnt work. Thanks

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

how to get datatype a column in sqlserver ?

  
hi all I want have datatype a field in sqlserver how to get it with (T-sql) thank you

how to retrieve various date format from datetime datatype column

  

first table

Area_code (varchar)    Loan_date (datetime)

USA                             9/21/2009  12:00:00 AM

CAN                            10/22/2010  12:00:00 AM

ARG                            12/23/2009 12:00:00 AM

Second table

Area_code (varchar)    Date_format(varchar)

USA                             dd/mm/yy

CAN                             yy.d.m

ARG                            yy'?'d'?'m'?'

I want to add Loan_date column in second t

how to retrieve various date format from datetime datatype column

  

first table

Area_code (varchar)    Loan_date (datetime)

USA                             9/21/2009  12:00:00 AM

CAN                            10/22/2010  12:00:00 AM

ARG                            12/23/2009 12:00:00 AM

Second table

Area_code (varchar)    Date_format(varchar)

USA                             dd/mm/yy

CAN                             yy.d.m

ARG                            yy'?'d'?'m'?'

I want to add Loan_date column in second table and nee

get database column datatype from metadata

  

Is there a way to get the database column DataType length information given a table's EntityType by sql query?

 

Example like: varchar(MAX), nvarchar(255),decimal(16, 4) .....

 

I need that query for documentation purpose.


Meng Chew

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:

"

ODBC API to retrieve User-Defined DataType of a Column in a ResultSet ?

  

Hi,

ODBC APIs such as SQLDescribeCol(), SQLColAttribute() could be used to retrieve SQLDataType of a particular column in a ResultSet.

Similarly, Is there any ODBC API which could be used to retrieve User-Defined DataType of a particular column in a ResultSet?

-Vengatesh

 


Finding records using time datatype

  

I need to find rows in a table that have StartTime and EndTime that fall between sent start and end time parameters.  Below is the design of the table I want to search and below it is an example of a SELECT statement.  I need to add to the SELECT another condition (e.g. AND StartTime BETWEEN @StartTime AND @EndTime OR EndTime BETWEEN @StartTime AND @EndTime).  Any help is appreciated.

CREATE TABLE [dbo].[CareScheduleDetail](
 [CareScheduleDetailID] [int] IDENTITY(1,1) NOT NULL,
 [CareScheduleID] [int] NOT NULL,
 [WorkDay] [tinyint] NOT NULL,
 [StartTime] [time](7) NULL,
 [EndTime] [time](7) NULL,
 [SvcType] [varchar](4) NULL,
 [Effective] [date] NULL,
 [Ended] [date] NULL)

 

SELECT     WorkDay, StartTime, EndTime
FROM         dbo.CareScheduleDetail
WHERE     (Ended IS NULL)


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

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.

 

 


Declaring a foreign key to a column of 'formula' datatype

  
I have a primary key declared as 'Computed'. Trying to relate a foreign key to this column in the Database Diagram, it complains on data types being different. Declaring the Foreign key as nvarchar or varchar did not help. When declaring it as 'Computed', column was not available for selection as a foreign key. Any advice?
Baruch Barness

To Update a Binary datatype column using a query from MSAccess:

  

Hi,

I have MSAccess as front-end application and SQL Server as the database. I need to update a column of varbinary datatype using the MSAccess application.

The below is the code snippet i work on:

===============================================================================================

If StrComp(Nz(rsDst!destination_column, ""), Nz(rsSrc!source_column, ""), vbBinaryCompare) <> 0 Then
     
      strSQL = "UPDATE tablename SET " & _
                   "destination_column = '" & Nz(rsSrc!source_column, "") & "'" & _
                   "WHERE case_party.file_id= " & rsSrc!file_id & " " & _
      DoCmd.SetWarnings True
      DoCmd.RunSQL strSQL
      DoCmd.SetWarnings True
End If     

==============================================================================

I am getting an error with the above code. The error mentioned is synta

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.

ASP.NET GridView - edit records using JQuery Dialog

  
There are many ways in which you could modify modular data in Grid View:
1. Inline by making rows editable when u click on Edit
2. By using separate pages for Edit
3. By using popups/dialogs for adding/editing
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