TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Aruljothy Sundaramoorthy
NA
311
49.2k
Error while using While loop
Jan 12 2020 3:32 AM
This query throws error as "
Msg 156, Level 15, State 1, Line 7
Incorrect syntax near the keyword 'WHERE'."
please help to resolve this issue.
DECLARE @Counter INT
SET @Counter=1
DECLARE @devicemaxNumber INT
SET @devicemaxNumber=72;
WHILE ( @Counter <= @devicemaxNumber)
BEGIN
PRINT 'select * from Device'+@counter+ WHERE 'Inverter'+@counter+ .localcol between '2020-01-10 00:00:00' and '2020-01-10 23:59:59'
SET @Counter = @Counter + 1
END
Reply
Answers (
3
)
how to write this query for good performance ?
How to convert values String to numeric?